/*
 * Swiss Audiomarkt – E-Mail-Kontaktformular
 * AdForest Child-Theme
 */

/* E-Mail-Button in der Verkäuferbox */
.ad-owner-detail-box .sam-email-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 46px;
    margin: 12px 0 0;
    padding: 12px 18px;
    border: 0;
    border-radius: 8px;
    background: #7546c8;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.ad-owner-detail-box .sam-email-button:hover {
    background: #6034ae;
    color: #fff;
    transform: translateY(-1px);
}

.ad-owner-detail-box .sam-email-button:focus-visible {
    outline: 3px solid #b99ae9;
    outline-offset: 3px;
}

/* Popup-Hintergrund */
.sam-email-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.sam-email-modal.sam-email-visible {
    display: flex;
}

.sam-email-overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 18, 35, .65);
    backdrop-filter: blur(4px);
}

body.sam-email-open {
    overflow: hidden;
}

/* Popup-Fenster */
.sam-email-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    padding: 32px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
}

.sam-email-dialog h3 {
    margin: 0 35px 8px 0;
    color: #25213b;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
}

.sam-email-intro {
    margin: 0 0 24px;
    color: #696577;
    font-size: 14px;
    line-height: 1.6;
}

.sam-email-close {
    position: absolute;
    top: 16px;
    right: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f3f1f7;
    color: #4a4457;
    font-size: 26px;
    cursor: pointer;
}

.sam-email-close:hover {
    background: #e8e1f4;
}

/* Formularfelder */
#sam-email-form label {
    display: block;
    margin: 0 0 7px;
    color: #302b3b;
    font-size: 13px;
    font-weight: 600;
}

#sam-email-form input:not([type="hidden"]),
#sam-email-form textarea {
    display: block;
    width: 100%;
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid #dedbe6;
    border-radius: 8px;
    background: #fff;
    color: #25213b;
    font: inherit;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color .2s ease, box-shadow .2s ease;
}

#sam-email-form textarea {
    min-height: 120px;
    resize: vertical;
}

#sam-email-form input:focus,
#sam-email-form textarea:focus {
    outline: none;
    border-color: #7546c8;
    box-shadow: 0 0 0 3px rgba(117, 70, 200, .12);
}

/* Honeypot */
.sam-email-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Statusmeldungen */
.sam-email-feedback {
    margin-bottom: 12px;
    font-size: 13px;
    line-height: 1.5;
}

.sam-email-feedback:empty {
    display: none;
}

.sam-email-success {
    color: #167347;
}

.sam-email-error {
    color: #c62828;
}

/* Senden-Button */
#sam-email-form .sam-email-submit {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 12px 20px;
    border: 0;
    border-radius: 8px;
    background: #7546c8;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s ease;
}

#sam-email-form .sam-email-submit:hover:not(:disabled) {
    background: #6034ae;
}

#sam-email-form .sam-email-submit:disabled {
    opacity: .7;
    cursor: not-allowed;
}

/* Smartphone */
@media (max-width: 575px) {
    .sam-email-modal {
        padding: 12px;
    }

    .sam-email-dialog {
        max-height: calc(100dvh - 24px);
        padding: 25px 20px;
        border-radius: 12px;
    }

    .sam-email-dialog h3 {
        font-size: 21px;
    }
}

/* Swiss Audiomarkt – Designanpassung */

/* E-Mail-Button in der Verkäuferbox */
.ad-owner-detail-box .sam-email-button {
    background: #382451;
    border-radius: 4px;
}

.ad-owner-detail-box .sam-email-button:hover {
    background: #4B326B;
}

/* Popup-Fenster */
.sam-email-dialog {
    border-radius: 4px;
}

/* Eingabefelder */
#sam-email-form input:not([type="hidden"]),
#sam-email-form textarea {
    border-radius: 4px;
}

/* Nachricht senden */
#sam-email-form .sam-email-submit {
    background: #382451;
    border-radius: 4px;
}

#sam-email-form .sam-email-submit:hover:not(:disabled) {
    background: #4B326B;
}

/* Schliessen-Button */
.sam-email-close {
    border-radius: 4px;
}

/* Mobile */
@media (max-width: 575px) {
    .sam-email-dialog {
        border-radius: 4px;
    }
}
