/* =========================================================
   AQUAVIT CATALOG — CONTACT FORM
   ========================================================= */

.aqv-contact {
    width: 100%;
    max-width: 700px;

    margin: 40px auto 64px;
    padding: 38px 42px;

    box-sizing: border-box;

    background: #ffffff;

    border: 1px solid #e1e5eb;
    border-radius: 16px;

    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.045);
}

.aqv-contact *,
.aqv-contact *::before,
.aqv-contact *::after {
    box-sizing: border-box;
}


/* =========================================================
   HEADING / INTRO
   ========================================================= */

.aqv-contact__title {
    margin: 0 0 14px;

    color: #1f2937;

    font-size: 30px;
    line-height: 1.2;
    font-weight: 700;
}

.aqv-contact__intro {
    margin: 0 0 28px;

    color: #4b5563;

    font-size: 15px;
    line-height: 1.65;
}


/* =========================================================
   FORM LAYOUT
   ========================================================= */

.aqv-contact__form {
    display: flex;
    flex-direction: column;

    width: 100%;
    margin: 0;
    padding: 0;
}


/* Labels */

.aqv-contact__form > label,
.aqv-contact__page-url > label {
    display: block;

    margin: 19px 0 8px;

    color: #252b33;

    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;
}


/* Inputs */

.aqv-contact__form > input:not([type="hidden"]),
.aqv-contact__form > select,
.aqv-contact__form > textarea,
.aqv-contact__page-url > input {
    display: block;

    width: 100%;
    max-width: 100%;

    margin: 0;
    padding: 12px 14px;

    border: 1px solid #d1d5db;
    border-radius: 8px;

    background: #ffffff;
    color: #1f2937;

    font-family: inherit;
    font-size: 15px;
    line-height: 1.45;

    box-shadow: none;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}


/* Focus */

.aqv-contact__form > input:focus,
.aqv-contact__form > select:focus,
.aqv-contact__form > textarea:focus,
.aqv-contact__page-url > input:focus {
    outline: none;

    border-color: #64748b;

    box-shadow:
        0 0 0 3px rgba(100, 116, 139, 0.12);
}


/* Subject */

.aqv-contact__form > select {
    min-height: 48px;

    cursor: pointer;
}


/* Message */

.aqv-contact__form > textarea {
    min-height: 165px;

    resize: vertical;
}


/* =========================================================
   OPTIONAL PAGE URL
   ========================================================= */

.aqv-contact__page-url {
    display: block;
    width: 100%;
}

/*
 * Важно: CSS не должен перебивать HTML hidden.
 */
.aqv-contact__page-url[hidden] {
    display: none !important;
}

.aqv-contact__hint {
    margin: 7px 0 0;

    color: #6b7280;

    font-size: 12px;
    line-height: 1.5;
}


/* =========================================================
   PRIVACY NOTE
   ========================================================= */

.aqv-contact__privacy {
    margin: 20px 0 18px;

    color: #6b7280;

    font-size: 12px;
    line-height: 1.6;
}


/* =========================================================
   SUBMIT BUTTON
   ========================================================= */

.aqv-contact__form > button[type="submit"] {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 48px;

    padding: 12px 20px;

    border: 1px solid #111827;
    border-radius: 8px;

    background: #111827;
    color: #ffffff;

    font-family: inherit;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 600;

    cursor: pointer;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease;
}

.aqv-contact__form > button[type="submit"]:hover {
    background: #374151;
    border-color: #374151;
}

.aqv-contact__form > button[type="submit"]:focus-visible {
    outline: 3px solid rgba(100, 116, 139, 0.35);
    outline-offset: 3px;
}


/* =========================================================
   SUCCESS / ERROR
   ========================================================= */

.aqv-contact__success,
.aqv-contact__error {
    margin: 0 0 22px;
    padding: 13px 16px;

    border-radius: 8px;

    font-size: 14px;
    line-height: 1.5;
}

.aqv-contact__success {
    background: #ecfdf3;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.aqv-contact__error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .aqv-contact {
        margin: 22px auto 46px;
        padding: 24px 19px;

        border-radius: 12px;
    }

    .aqv-contact__title {
        font-size: 26px;
    }

    .aqv-contact__intro {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .aqv-contact__form > input:not([type="hidden"]),
    .aqv-contact__form > select,
    .aqv-contact__form > textarea,
    .aqv-contact__page-url > input {
        font-size: 16px;
    }
}


.aqv-contact__photo input:focus,
.aqv-contact__photo select:focus,
.aqv-contact__photo textarea:focus {
    outline: none;
    border-color: #64748b;
    box-shadow: 0 0 0 3px rgba(100, 116, 139, .12);
}

.aqv-contact__photo-mode {
    margin-top: 8px;
}

.aqv-contact__license {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin: 20px 0 0;
    font-size: 13px;
    line-height: 1.6;
    color: #374151;
    cursor: pointer;
}

.aqv-contact__license input[type="checkbox"] {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    margin: 2px 0 0;
    accent-color: #111827;
}

.aqv-contact__photo .aqv-contact__hint {
    margin: 7px 0 0;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.5;
}

@media (max-width: 600px) {
    .aqv-contact__photo {
        padding: 17px 14px;
    }
    .aqv-contact__photo input:not([type="checkbox"]),
    .aqv-contact__photo select,
    .aqv-contact__photo textarea {
        font-size: 16px;
    }
}

/* =========================================================
   CONTACT FORM — PHOTO SUBMISSION
   ========================================================= */

/*
 * Главный блок Photo submission.
 */
.aqv-contact__photo {
    display: block;

    width: 100%;
    min-width: 0;

    margin: 26px 0 4px;
    padding: 18px 20px 22px;

    box-sizing: border-box;

    border: 1px solid #e1e5eb;
    border-radius: 10px;

    background: #fafbfc;
}


/*
 * Обязательно сохраняем работу HTML hidden.
 */
.aqv-contact__photo[hidden],
.aqv-contact__photo-mode[hidden] {
    display: none !important;
}


/* Заголовок Photo submission */

.aqv-contact__photo > legend {
    padding: 0 8px;

    color: #1f2937;

    font-family: inherit;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 700;
}


/* =========================================================
   LABELS
   ========================================================= */

.aqv-contact__photo > label:not(.aqv-contact__license),
.aqv-contact__photo-mode > label:not(.aqv-contact__license) {
    display: block;

    width: 100%;

    margin: 19px 0 8px;

    color: #252b33;

    font-family: inherit;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;
}


/* Первое поле — без большого верхнего отступа */

.aqv-contact__photo > legend + label {
    margin-top: 9px;
}


/* =========================================================
   INPUTS / SELECT / TEXTAREA
   ========================================================= */

.aqv-contact__photo input:not(
    [type="checkbox"]
):not(
    [type="file"]
),
.aqv-contact__photo select,
.aqv-contact__photo textarea {
    display: block;

    width: 100%;
    max-width: 100%;
    min-width: 0;

    margin: 0;
    padding: 12px 14px;

    box-sizing: border-box;

    border: 1px solid #d1d5db;
    border-radius: 8px;

    background: #ffffff;
    color: #1f2937;

    font-family: inherit;
    font-size: 15px;
    line-height: 1.45;

    box-shadow: none;
}


/* Dropdown */

.aqv-contact__photo select {
    min-height: 48px;
    cursor: pointer;
}


/* Permission details */

.aqv-contact__photo textarea {
    min-height: 100px;
    resize: vertical;
}


/* =========================================================
   CONDITIONAL SECTIONS
   ========================================================= */

.aqv-contact__photo-mode {
    width: 100%;
    min-width: 0;

    margin-top: 4px;
}


/* =========================================================
   PHOTO UPLOAD
   ========================================================= */

.aqv-contact__photo input[type="file"] {
    display: block;

    width: 100%;
    max-width: 100%;

    padding: 12px;

    box-sizing: border-box;

    border: 1px dashed #cbd5e1;
    border-radius: 8px;

    background: #ffffff;
    color: #374151;

    font-family: inherit;
    font-size: 13px;

    cursor: pointer;
}


.aqv-contact__photo input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 8px 12px;

    border: 1px solid #d1d5db;
    border-radius: 6px;

    background: #f8fafc;
    color: #1f2937;

    font-family: inherit;
    font-size: 12px;
    font-weight: 600;

    cursor: pointer;
}


/* =========================================================
   LICENSE / COPYRIGHT AGREEMENT
   ========================================================= */

.aqv-contact__license {
    display: flex !important;
    align-items: flex-start;

    width: 100%;

    gap: 11px;

    margin: 23px 0 0;
    padding: 15px;

    box-sizing: border-box;

    border: 1px solid #e1e5eb;
    border-radius: 8px;

    background: #ffffff;

    color: #374151;

    font-family: inherit;
    font-size: 13px;
    line-height: 1.6;

    cursor: pointer;
}


.aqv-contact__license input[type="checkbox"] {
    flex: 0 0 17px;

    width: 17px;
    height: 17px;

    margin: 3px 0 0;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .aqv-contact__photo {
        padding: 16px 14px 20px;
    }

    .aqv-contact__photo input:not([type="checkbox"]),
    .aqv-contact__photo select,
    .aqv-contact__photo textarea {
        font-size: 16px;
    }

    .aqv-contact__license {
        padding: 12px;
    }
}

/* Cloudflare Turnstile */

.aqv-contact__turnstile {
    margin: 20px 0 12px;
}

/* =========================================================
   CONTACT — AUTOMATIC PAGE URL
   ========================================================= */

.aqv-contact .aqv-contact__page-url input[readonly],
.aqv-contact .aqv-contact__page-url input[readonly]:focus {
    background: #f3f4f6;
    color: #667085;

    border-color: #d7dce3;
    box-shadow: none;

    cursor: default;
}
