/**
 * Contact page (Figma)
 */

#main .ye-contact-page {
    background: #edf0f3;
    background: var(--primary-light, #edf0f3);
    min-height: 50vh;
}

.ye-contact-hero.ye-discover-hero {
    --ye-discover-navy: #081b33;
}

.ye-contact-form__submit:not(:disabled) {
    pointer-events: auto;
    cursor: pointer;
}

.ye-contact-page {
    --ye-discover-hero-height: var(--inner-banner-img);
    background: var(--primary-light);
}

.ye-contact-shell {
    width: var(--container-width);
    margin: 0 auto;
    padding: var(--container-padding-tb) var(--container-padding-lr);
    max-width: 100%;
}

.ye-contact-card {
    background: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    padding: 18px 36px 36px;
}

.ye-contact-card__head {
    text-align: left;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.ye-contact-card__title {
    margin: 0 0 10px;
    font-size: var(--font-size-28);
    font-weight: 600;
    color: var(--gray-color);
}

.ye-contact-card__subtitle {
    margin: 0;
    font-size: var(--font-size-18);
    line-height: 26px;
    color: var(--gray-color);    
    margin-inline: auto;
}

.ye-contact-thankyou {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 24px;
    padding: 18px 20px;
    padding-right: 44px;
    border-radius: 14px;
    background: var(--primary-light, #edf0f3);
    position: relative;
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.3s ease, margin 0.3s ease, padding 0.3s ease;
}

.ye-contact-thankyou--dismissed {
    opacity: 0;
    transform: translateY(-6px);
    max-height: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    pointer-events: none;
}

.ye-contact-thankyou__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: block;
}

.ye-contact-thankyou__content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.ye-contact-thankyou__close {
    position: absolute;
    top: 0px;
    right: 10px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--primary-color, #081b33);
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
    pointer-events: auto;
    transition: background 0.15s ease, color 0.15s ease;
}

.ye-contact-thankyou__close:hover,
.ye-contact-thankyou__close:focus-visible {
    background: rgba(8, 27, 51, 0.08);
    outline: none;
}

.ye-contact-thankyou__title {
    margin: 0;
    font-size: var(--font-size-18, 18px);
    font-weight: var(--font-weight-700, 700);
    line-height: 1.3;
    color: var(--primary-color, #081b33);
}

.ye-contact-thankyou__message {
    margin: 0;
    font-size: var(--font-size-14, 14px);
    font-weight: var(--font-weight-400, 400);
    line-height: 1.45;
    color: var(--gray-color, #333333);
}

.ye-contact-flash {
    margin: 0 0 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
}

.ye-contact-flash--success {
    color: #065f46;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.ye-contact-flash--error {
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.ye-contact-form__row {
    display: grid;
    gap: 16px;
}

.ye-contact-form__row--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
    .ye-contact-form__row--three {
        grid-template-columns: 1fr;
    }
}

.ye-contact-form .ye-login-modal__field.ye-float-field,
.ye-contact-form .ye-float-field {
    position: relative;
}

/* Floating labels: hide native placeholder so it does not overlap typed text. */
.ye-contact-form .ye-float-field__wrap .ye-login-modal__input::placeholder {
    color: transparent;
    opacity: 0;
}

.ye-contact-form .ye-float-field__wrap .ye-login-modal__input {
    min-height: 3.25rem;
}

.ye-contact-form .ye-float-field__wrap.is-filled .ye-login-modal__input,
.ye-contact-form .ye-float-field__wrap:focus-within .ye-login-modal__input,
.ye-contact-form .ye-float-field__wrap:has(.ye-login-modal__input:not(:placeholder-shown)) .ye-login-modal__input {
    padding-top: 1.125rem;
    padding-bottom: 0.625rem;
    line-height: 1.35;
}

.ye-contact-form .ye-float-field__label {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    z-index: 2;
    margin: 0;
    max-width: calc(100% - 1.5rem);
    overflow: hidden;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.2;
    color: #9ca3af;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
    background: transparent;
    transform: translateY(-50%);
    transition:
        top 0.15s ease,
        transform 0.15s ease,
        font-size 0.15s ease,
        color 0.15s ease,
        background 0.15s ease;
}

.ye-contact-form .ye-float-field__wrap.is-filled .ye-float-field__label,
.ye-contact-form .ye-float-field__wrap:focus-within .ye-float-field__label,
.ye-contact-form .ye-float-field__wrap:has(.ye-login-modal__input:not(:placeholder-shown)) .ye-float-field__label {
    top: 0;
    left: 0.75rem;
    max-width: calc(100% - 1.5rem);
    padding: 0 0.3rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--icon-color);
    background: var(--white-color);
    transform: translateY(-50%);
}

.ye-contact-form__message .ye-float-field__label {
    top: 1.25rem;
    transform: translateY(0);
}

.ye-contact-form__message .ye-float-field__wrap.is-filled .ye-float-field__label,
.ye-contact-form__message .ye-float-field__wrap:focus-within .ye-float-field__label,
.ye-contact-form__message .ye-float-field__wrap:has(.ye-login-modal__input:not(:placeholder-shown)) .ye-float-field__label {
    top: 0;
    transform: translateY(-50%);
}

.ye-contact-form__message .ye-login-modal__input,
.ye-contact-form__textarea {
    min-height: 160px;
    resize: vertical;
}

.ye-contact-form__captcha {
    margin-top: 4px;
}

.ye-contact-form__captcha-note {
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--gray-color);
}

.ye-contact-form__captcha--loading .ye-contact-form__captcha-note::after {
    content: ' Verifying…';
    font-weight: 600;
}

.ye-contact-form__captcha--ready .ye-contact-form__captcha-note::after {
    content: ' Ready.';
    font-weight: 600;
    color: #065f46;
}

.ye-contact-form__captcha--failed .ye-contact-form__captcha-note {
    color: #991b1b;
}

.ye-contact-form__actions {
    margin-top: 0;
}

.ye-contact-form__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 155px;
    padding: 14px 50px;
    border: none;
    border-radius: 999px;
    background: var(--primary-color);
    color: var(--white-color);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease;
}

.ye-contact-form__submit:hover:not(:disabled) {
    background: var(--primary-light);
    color:var(--primary-color) ;
}

.ye-contact-form__submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Validation: show messages only, not red field borders. */
.ye-contact-form .ye-login-modal__input--invalid,
.ye-contact-form .ye-float-field__wrap--invalid .ye-login-modal__input {
    border-color: var(--border-color) !important;
    box-shadow: none;
}

.ye-contact-form .ye-float-field__wrap--invalid .ye-float-field__label {
    color: #9ca3af;
}

.ye-contact-form .ye-float-field__wrap.is-filled .ye-float-field__wrap--invalid .ye-float-field__label,
.ye-contact-form .ye-float-field__wrap:focus-within .ye-float-field__wrap--invalid .ye-float-field__label {
    color: var(--icon-color);
}

@media (max-width: 640px) {
    .ye-contact-card {
        padding: 24px 20px 28px;
    }

    .ye-contact-shell {
        padding: 32px 16px 40px;
    }
}
