/* Vesa Contact — pairs with templates/contact.php */

.page-contact {
    color: #1a1a1a;
}

.page-contact .container-lg {
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* ── Hero ────────────────────────────────────────────── */
.contact-hero {
    padding: 64px 0 40px;
    text-align: center;
    border-bottom: 1px solid #ececec;
}

.contact-hero__title {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1.1;
}

.contact-hero__lead {
    margin: 0 auto;
    max-width: 720px;
    font-size: 15px;
    line-height: 1.6;
    color: #555;
}

/* ── Body grid ───────────────────────────────────────── */
.contact-body {
    padding: 56px 0 88px;
}

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 64px;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
}

/* ── Info column ─────────────────────────────────────── */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.contact-block {
    position: relative;
    padding: 0 0 32px;
    border-bottom: 1px solid #ececec;
}

.contact-info > .contact-block:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.contact-block__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 16px;
    background: #fafafa;
    border-radius: 50%;
    color: #1a1a1a;
}

.contact-block__title {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    color: #1a1a1a;
    line-height: 1.2;
}

.contact-block__hours {
    margin: 0 0 8px;
    font-size: 13px;
    color: #777;
    line-height: 1.5;
}

.contact-block__phone {
    display: inline-block;
    color: #1a1a1a;
    font-size: 22px;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: .02em;
    transition: color .15s ease;
}

.contact-block__phone:hover {
    color: #214af1;
}

.contact-block__body {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.6;
    color: #555;
}

.contact-block__list {
    margin: 0;
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 8px 20px;
    font-size: 14px;
    line-height: 1.5;
}

.contact-block__list dt {
    margin: 0;
    color: #888;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding-top: 2px;
}

.contact-block__list dd {
    margin: 0;
    color: #1a1a1a;
}

.contact-block__list dd a {
    color: #1a1a1a;
    text-decoration: none;
    border-bottom: 1px solid #d8d8d8;
    transition: color .15s ease, border-color .15s ease;
}

.contact-block__list dd a:hover {
    color: #214af1;
    border-bottom-color: #214af1;
}

.contact-block__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1a1a1a;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-decoration: none;
    border-bottom: 1px solid #1a1a1a;
    padding-bottom: 2px;
    transition: color .15s ease, border-color .15s ease, gap .15s ease;
}

.contact-block__link:hover {
    color: #214af1;
    border-bottom-color: #214af1;
    gap: 10px;
}

/* ── Form column — premium minimalist (Apple/Stripe inspired) ── */
.contact-form {
    padding: 44px 44px 48px;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .02), 0 4px 24px rgba(0, 0, 0, .04);
}

.contact-form__title {
    margin: 0 0 8px;
    font-size: clamp(22px, 2.4vw, 28px);
    font-weight: 600;
    line-height: 1.2;
    color: #1a1a1a;
    letter-spacing: -.01em;
}

.contact-form__lead {
    margin: 0 0 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f3f3f3;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* ── CF7 base form ── */
.contact-form__wrap .wpcf7-form,
.contact-form__wrap form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.contact-form__wrap p {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Section headings inside the form (H2/H3/H4) ── */
.contact-form__wrap h2,
.contact-form__wrap h3,
.contact-form__wrap h4 {
    margin: 16px 0 4px;
    padding: 0 0 14px;
    border-bottom: 1px solid #f0f0f0;
    color: #1a1a1a;
    font-weight: 600;
    line-height: 1.3;
}

.contact-form__wrap h2 {
    font-size: 18px;
    letter-spacing: -.01em;
}

.contact-form__wrap h3 {
    font-size: 16px;
}

.contact-form__wrap h4 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #777;
    border-bottom: 0;
    padding-bottom: 0;
}

/* First heading in the form doesn't need extra top space */
.contact-form__wrap .wpcf7-form > h2:first-child,
.contact-form__wrap .wpcf7-form > h3:first-child,
.contact-form__wrap .wpcf7-form > h4:first-child,
.contact-form__wrap form > h2:first-child,
.contact-form__wrap form > h3:first-child,
.contact-form__wrap form > h4:first-child {
    margin-top: 0;
}

/* Paragraph helper text inside the form */
.contact-form__wrap > p,
.contact-form__wrap .wpcf7-form > p:not(:has(input)):not(:has(textarea)):not(:has(select)):not(:has(button)) {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* Account for CF7 inserting <br> between label text and the input wrapper */
.contact-form__wrap label br {
    display: none;
}

/* Labels above inputs, refined */
.contact-form__wrap label {
    display: block;
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
    line-height: 1.4;
}

/* Extra breathing room inside the label wrapper so the input doesn't hug the text */
.contact-form__wrap label > .wpcf7-form-control-wrap,
.contact-form__wrap label > input,
.contact-form__wrap label > select,
.contact-form__wrap label > textarea {
    margin-top: 8px;
    display: block;
}

/* ── Inputs ── */
.contact-form__wrap input[type="text"],
.contact-form__wrap input[type="email"],
.contact-form__wrap input[type="tel"],
.contact-form__wrap input[type="url"],
.contact-form__wrap input[type="number"],
.contact-form__wrap select,
.contact-form__wrap textarea {
    width: 100%;
    height: 56px;
    padding: 0 18px;
    background: #fafafa;
    border: 1px solid transparent;
    border-radius: 6px;
    font-family: inherit;
    font-size: 15px;
    color: #1a1a1a;
    transition: background .15s ease, border-color .18s ease, box-shadow .18s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
            appearance: none;
}

.contact-form__wrap textarea {
    height: auto;
    min-height: 180px;
    padding: 16px 18px;
    line-height: 1.6;
    resize: vertical;
}

.contact-form__wrap input::placeholder,
.contact-form__wrap textarea::placeholder {
    color: #aaa;
}

.contact-form__wrap input:hover,
.contact-form__wrap select:hover,
.contact-form__wrap textarea:hover {
    background: #f5f5f5;
}

.contact-form__wrap input:focus,
.contact-form__wrap select:focus,
.contact-form__wrap textarea:focus {
    outline: none;
    background: #fff;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 4px rgba(33, 74, 241, .12);
}

/* Native select chevron */
.contact-form__wrap select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 14px;
    padding-right: 44px;
}

.contact-form__wrap .wpcf7-form-control-wrap {
    display: block;
}

/* ── Submit button — premium dark with arrow that slides ── */
.contact-form__wrap input[type="submit"],
.contact-form__wrap .wpcf7-submit {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: auto;
    align-self: flex-start;
    height: 56px;
    padding: 0 40px;
    margin-top: 16px;
    background: #1a1a1a;
    color: #fff;
    border: 0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .02em;
    cursor: pointer;
    transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
    box-shadow: 0 4px 12px rgba(26, 26, 26, .15);
    overflow: hidden;
}

.contact-form__wrap input[type="submit"]:hover,
.contact-form__wrap .wpcf7-submit:hover {
    background: #214af1;
    box-shadow: 0 6px 18px rgba(33, 74, 241, .25);
    transform: translateY(-1px);
}

.contact-form__wrap input[type="submit"]:active,
.contact-form__wrap .wpcf7-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(26, 26, 26, .15);
}

.contact-form__wrap input[type="submit"]:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* ── Response messages ── */
.contact-form__wrap .wpcf7-response-output {
    margin: 20px 0 0 !important;
    padding: 14px 18px !important;
    border: 1px solid #ececec !important;
    border-radius: 6px;
    background: #fafafa;
    font-size: 14px;
    line-height: 1.5;
}

.contact-form__wrap .wpcf7-mail-sent-ok .wpcf7-response-output {
    border-color: #c5e8c8 !important;
    color: #1f5e25;
    background: #f4faf5;
}

.contact-form__wrap .wpcf7-validation-errors .wpcf7-response-output,
.contact-form__wrap .wpcf7-mail-sent-ng .wpcf7-response-output {
    border-color: #f5c2c2 !important;
    color: #8e1c1c;
    background: #fdf6f6;
}

.contact-form__wrap .wpcf7-not-valid-tip {
    margin-top: 6px !important;
    font-size: 12px;
    color: #c93535;
}

.contact-form__wrap .wpcf7-not-valid {
    background: #fef7f7 !important;
    border-color: #f5c2c2 !important;
}

.contact-form__wrap .wpcf7-not-valid:focus {
    box-shadow: 0 0 0 4px rgba(201, 53, 53, .12) !important;
}

.contact-form__wrap .wpcf7-spinner {
    display: inline-block;
    margin-left: 12px;
    vertical-align: middle;
    background: rgba(255, 255, 255, .5);
}

/* Checkboxes (acceptance, GDPR, multi-select) — keep native style with black accent */
.contact-form__wrap .wpcf7-acceptance,
.contact-form__wrap .wpcf7-checkbox {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-form__wrap .wpcf7-checkbox .wpcf7-list-item,
.contact-form__wrap .wpcf7-acceptance .wpcf7-list-item {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    cursor: pointer;
}

.contact-form__wrap .wpcf7-checkbox .wpcf7-list-item input[type="checkbox"],
.contact-form__wrap .wpcf7-acceptance .wpcf7-list-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: #1a1a1a;
    cursor: pointer;
    flex-shrink: 0;
}

.contact-form__wrap .wpcf7-checkbox .wpcf7-list-item-label,
.contact-form__wrap .wpcf7-acceptance .wpcf7-list-item-label {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

/* ── Radio buttons rendered as a segmented control (iOS-style toggle) ── */
.contact-form__wrap .wpcf7-radio {
    display: inline-flex;
    gap: 0;
    padding: 4px;
    background: #f3f3f3;
    border-radius: 8px;
}

.contact-form__wrap .wpcf7-radio .wpcf7-list-item {
    display: inline-flex;
    margin: 0;
    position: relative;
}

.contact-form__wrap .wpcf7-radio .wpcf7-list-item label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 28px;
    margin: 0;
    cursor: pointer;
    border-radius: 6px;
    background: transparent;
    transition: background .25s ease, color .15s ease, box-shadow .25s ease;
    user-select: none;
}

.contact-form__wrap .wpcf7-radio .wpcf7-list-item label:hover {
    background: rgba(255, 255, 255, .55);
}

/* Native radio input — visually hidden but accessible */
.contact-form__wrap .wpcf7-radio input[type="radio"] {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

.contact-form__wrap .wpcf7-radio .wpcf7-list-item-label {
    font-size: 14px;
    font-weight: 500;
    color: #555;
    text-align: center;
    line-height: 1;
    margin: 0;
    transition: color .15s ease;
}

/* Selected pill — uses :has() to detect the checked radio inside the label */
.contact-form__wrap .wpcf7-radio .wpcf7-list-item label:has(input[type="radio"]:checked) {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 1px rgba(0, 0, 0, .04);
}

.contact-form__wrap .wpcf7-radio .wpcf7-list-item label:has(input[type="radio"]:checked) .wpcf7-list-item-label {
    color: #1a1a1a;
    font-weight: 600;
}

/* Keyboard focus ring on the label when the hidden radio is focused */
.contact-form__wrap .wpcf7-radio .wpcf7-list-item label:has(input[type="radio"]:focus-visible) {
    box-shadow: 0 0 0 3px rgba(33, 74, 241, .25);
}

/* Fallback for browsers without :has() — older Safari/Firefox */
@supports not selector(:has(*)) {
    .contact-form__wrap .wpcf7-radio .wpcf7-list-item input[type="radio"]:checked + .wpcf7-list-item-label {
        color: #1a1a1a;
        font-weight: 600;
    }
}

/* ── Suggestions & Complaints variant ───────────────── */
.page-suggestions .suggestions-wrap {
    max-width: 760px;
    margin: 0 auto;
}

.page-suggestions .contact-form {
    padding: 36px 36px 40px;
}

.page-suggestions .suggestions-aside {
    margin-top: 28px;
    padding: 20px 24px;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 4px;
}

.page-suggestions .suggestions-aside__note {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

.page-suggestions .suggestions-aside__note + .suggestions-aside__note {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.page-suggestions .suggestions-aside__note a {
    color: #1a1a1a;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid #d8d8d8;
    transition: color .15s ease, border-color .15s ease;
}

.page-suggestions .suggestions-aside__note a:hover {
    color: #214af1;
    border-bottom-color: #214af1;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 990px) {
    .contact-body {
        padding: 40px 0 64px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .contact-form {
        padding: 28px 24px 32px;
    }

    .page-suggestions .contact-form {
        padding: 28px 24px 32px;
    }
}

@media (max-width: 600px) {
    .contact-hero {
        padding: 48px 0 28px;
    }

    .contact-block__phone {
        font-size: 20px;
    }

    .contact-block__list {
        grid-template-columns: 1fr;
        gap: 2px 0;
    }

    .contact-block__list dt {
        margin-top: 14px;
    }

    .contact-block__list dt:first-of-type {
        margin-top: 0;
    }
}
