﻿/* ==========================================================================
   Bespeak Form 2 — Mobile & Tablet Responsive
   
   IMPORTANT: This file ONLY handles layout. It does NOT override 
   input padding, input height, or SVG icon sizing — those are 
   controlled by form-2.css and must not be touched.
   
   Link AFTER all other stylesheets:
   <link href="~/assets/css/bespeak/bespeak-form-2.css" rel="stylesheet" />
   ========================================================================== */


/* ==========================================================================
   0. CROSS-PLATFORM BASE FIXES
   ========================================================================== */

/* iOS Safari default input styling reset */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="search"],
textarea,
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* iOS zoom prevention — inputs below 16px trigger auto-zoom */
@media (max-width: 991px) {
    .form-form .form-form-wrap form .field-wrapper input,
    .form-form .form-form-wrap form .field-wrapper input.form-control {
        font-size: 16px !important;
    }
}

/* Notched iOS devices (iPhone X+, Dynamic Island) */
@supports (padding: env(safe-area-inset-top)) {
    body.form {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}

/* Prevent horizontal overflow */
body.form {
    overflow-x: hidden;
    width: 100%;
}

/* Remove tap highlight on touch devices */
a, button, input, label, .btn {
    -webkit-tap-highlight-color: transparent;
}

/* 44px minimum tap targets for touch devices */
@media (pointer: coarse) {
    .btn,
    .forgot-pass-link,
    #eye-closed,
    #eye-open {
        min-height: 24px;
        min-width: 24px;
    }
}

/* ----- Eye Toggle Icon — position & CI colour override ----- */
/* CI: Bespeak Greige 01 #6C655C */
.form-form .form-form-wrap form .field-wrapper svg.feather-eye.db-login {
    color: #6C655C !important;
    fill: rgba(108, 101, 92, 0.08);
}

.form-form .form-form-wrap form .field-wrapper svg.feather-eye.db-login {
    position: absolute;
    top: 56px;
    right: 13px;
    /* color: #888ea8; */
    /* fill: rgba(0, 23, 55, 0.08); */
    width: 17px;
    /* cursor: pointer; */
}

/* ----- Lock Icon — vertical alignment ----- */
.form-form .form-form-wrap form .field-wrapper svg.feather-lock.db-login {
    top: 50%;
}


/* ==========================================================================
   1. MOBILE — max-width: 575px
   ========================================================================== */

@media (max-width: 575px) {

    /* --- Form Container — full width, scroll naturally --- */
    .form-container.outer {
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding: 24px 16px;
        min-height: 100vh;
        min-height: 100dvh;
        overflow-y: auto;
        background-color: #FFFFFF !important;
    }

    body.form {
        background-color: #FFFFFF !important;
    }

    .form-form {
        width: 100% !important;
        min-width: unset !important;
        max-width: 100% !important;
    }

        .form-form .form-form-wrap {
            width: 100% !important;
            min-width: unset !important;
            max-width: 100% !important;
            padding: 0 !important;
        }

            .form-form .form-form-wrap .form-container {
                width: 100% !important;
                max-width: 100% !important;
                min-height: 0 !important;
            }

                .form-form .form-form-wrap .form-container .form-content {
                    padding: 28px 20px !important;
                    border-radius: 0.25rem !important;
                    box-shadow: none !important;
                }

    /* --- Typography --- */
    .form-content h1.bespeak-text-1 {
        font-size: 1.5rem !important;
        letter-spacing: 0.05rem;
        margin-bottom: 8px;
    }

    .form-content > p {
        font-size: 0.85rem !important;
        line-height: 1.5;
    }

    /* --- Field spacing --- */
    .form-form .form-form-wrap form .field-wrapper {
        margin-bottom: 12px;
    }

        .form-form .form-form-wrap form .field-wrapper label {
            font-size: 13px !important;
        }

        /* --- Forgot Password Link --- */
        .form-form .form-form-wrap form .field-wrapper a.forgot-pass-link {
            font-size: 12px !important;
            min-height: 44px;
            display: flex;
            align-items: center;
        }

        /* --- Buttons — full width on mobile --- */
        .form-form .form-form-wrap form .field-wrapper .btn.bespeak-btn-1,
        .social .field-wrapper .btn.bespeak-btn-1 {
            width: 100% !important;
            padding: 12px 20px !important;
            font-size: 14px !important;
            min-height: 48px;
        }

    /* --- Divider --- */
    .form-form .form-form-wrap form .division {
        margin-bottom: 16px !important;
        padding-bottom: 8px !important;
    }

        .form-form .form-form-wrap form .division span {
            font-size: 13px;
        }

    /* --- Validation Messages --- */
    .text-danger,
    .help-block {
        font-size: 12px !important;
    }

        .help-block ul {
            margin-left: -40px;
        }


    /* --- Registration Modal — stack vertically --- */
    #chooseRegister .modal-dialog {
        margin: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        height: 100% !important;
    }

    #chooseRegister .modal-content.register-modal-content {
        height: 100vh !important;
        height: 100dvh !important;
        border-radius: 0 !important;
        overflow-y: auto !important;
    }

    #chooseRegister .modal-content .col-md-12 {
        padding: 0 !important;
    }

        #chooseRegister .modal-content .col-md-12 > .row {
            flex-direction: column !important;
            align-items: center !important;
            justify-content: center !important;
            min-height: 100vh;
            min-height: 100dvh;
            margin: 0 !important;
        }

    /* --- Registration Modal content — full width on small phones --- */
    #chooseRegister .modal-content.register-modal-content {
        width: 100% !important;
    }

    #chooseRegister .col-md-6,
    #chooseRegister .col-md-3 {
        flex: 0 0 auto !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 12px 24px !important;
        display: flex !important;
        justify-content: center !important;
    }

    #chooseRegister .card.component-card_9 {
        width: 100%;
        text-align: center;
    }

    #chooseRegister h1.card-title {
        font-size: 2rem !important;
        font-weight: 900;
        padding-left: 0 !important;
    }

    /* Close button — top-right on mobile */
    #chooseRegister .col-md-3:last-child {
        position: absolute !important;
        top: 16px !important;
        right: 16px !important;
        bottom: auto !important;
        width: auto !important;
        padding: 0 !important;
    }

    #chooseRegister .close {
        position: static !important;
        font-size: 36px !important;
        bottom: auto !important;
    }


    /* --- "Best on Desktop" Modal --- */
    #isNotDesktop .modal-dialog {
        margin: 16px !important;
        max-width: calc(100% - 32px) !important;
    }

    #isNotDesktop .modal-body {
        padding: 16px !important;
    }

    #isNotDesktop .form-content.row {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
    }

    #isNotDesktop .col-md-3 {
        flex: 0 0 60px !important;
        max-width: 60px !important;
        padding: 0 8px 0 0 !important;
    }

    #isNotDesktop .col-md-9 {
        flex: 1 !important;
        max-width: calc(100% - 60px) !important;
        margin-left: 0 !important;
    }

    .better-experience-img {
        width: 100% !important;
    }

    .better-experience-title {
        font-size: 18px !important;
        margin-top: 0 !important;
    }

    .better-experience-desktop {
        font-size: 11px !important;
        margin-left: 0 !important;
    }


    /* --- Footer --- */
    .footer-wrapper {
        padding: 10px 16px !important;
        flex-direction: column;
        text-align: center;
    }

        .footer-wrapper .footer-section p {
            font-size: 11px !important;
        }

        .footer-wrapper .footer-section.f-section-1 .row {
            justify-content: center !important;
        }


    /* --- Eye Toggle Icon — mobile top override --- */
    .form-form .form-form-wrap form .field-wrapper svg.feather-eye.db-login {
        position: absolute;
        top: 62%;
        right: 13px;
        /* color: #888ea8; */
        /* fill: rgba(0, 23, 55, 0.08); */
        width: 17px;
        /* cursor: pointer; */
    }

    /* --- Lock Icon — mobile vertical alignment --- */
    .form-form .form-form-wrap form .field-wrapper svg.feather-lock.db-login {
        top: 60%;
    }
}


/* ==========================================================================
   2. TABLET — 576px to 991px
   ========================================================================== */

@media (min-width: 576px) and (max-width: 991px) {

    /* --- Form Container --- */
    .form-container.outer {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 32px;
        min-height: 100vh;
        min-height: 100dvh;
        overflow-y: auto;
        background-color: #FFFFFF !important;
    }

    body.form {
        background-color: #FFFFFF !important;
    }

    .form-form {
        width: 100% !important;
        max-width: 480px !important;
        min-width: unset !important;
    }

        .form-form .form-form-wrap {
            width: 100% !important;
            max-width: 480px !important;
            min-width: unset !important;
            padding: 0 !important;
        }

            .form-form .form-form-wrap .form-container {
                width: auto !important;
                min-height: 0 !important;
            }

                .form-form .form-form-wrap .form-container .form-content {
                    padding: 36px 32px !important;
                    border-radius: 0.25rem !important;
                }

    /* --- Typography --- */
    .form-content h1.bespeak-text-1 {
        font-size: 1.75rem !important;
        margin-bottom: 10px;
    }

    .form-content > p {
        font-size: 0.9rem !important;
    }

    /* --- Buttons — full width on tablet --- */
    .form-form .form-form-wrap form .field-wrapper .btn.bespeak-btn-1,
    .social .field-wrapper .btn.bespeak-btn-1 {
        width: 100% !important;
        padding: 12px 24px !important;
        font-size: 14px !important;
        min-height: 48px;
    }

    /* --- Forgot Password --- */
    .form-form .form-form-wrap form .field-wrapper a.forgot-pass-link {
        font-size: 12px !important;
    }


    /* --- Registration Modal — keep desktop layout on tablet --- */
    #chooseRegister .modal-dialog {
        margin: 0 !important;
        max-width: 100% !important;
    }

    #chooseRegister .modal-content .col-md-12 {
        height: 44vh !important;
        height: 44dvh !important;
    }

        #chooseRegister .modal-content .col-md-12 > .row {
            flex-direction: row !important;
            flex-wrap: nowrap !important;
            align-items: center !important;
            justify-content: center !important;
            height: 100% !important;
            min-height: 0 !important;
        }

    #chooseRegister .col-md-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
    }

    #chooseRegister .col-md-3 {
        flex: 0 0 25% !important;
        max-width: 25% !important;
        width: 25% !important;
    }

    #chooseRegister h1.card-title {
        font-size: 3rem !important;
    }

    /* --- Footer --- */
    .footer-wrapper {
        padding: 10px 24px !important;
    }
}


/* ==========================================================================
   3. SMALL DESKTOP — 992px to 1199px
   ========================================================================== */

@media (min-width: 992px) and (max-width: 1199px) {

    .form-form {
        max-width: 520px !important;
    }

        .form-form .form-form-wrap {
            max-width: 520px !important;
        }

    #chooseRegister h1.card-title {
        font-size: 4rem !important;
    }
}


/* ==========================================================================
   4. LANDSCAPE PHONE
   ========================================================================== */

@media (max-height: 500px) and (orientation: landscape) {

    .form-container.outer {
        align-items: flex-start !important;
        padding-top: 16px;
        padding-bottom: 16px;
        overflow-y: auto;
    }

    .form-form .form-form-wrap .form-container .form-content {
        padding: 20px 24px !important;
    }

    .form-content h1.bespeak-text-1 {
        font-size: 1.25rem !important;
        margin-bottom: 4px;
    }

    .form-content > p {
        font-size: 0.8rem !important;
        margin-bottom: 8px !important;
    }

    .form-form .form-form-wrap form .field-wrapper {
        margin-bottom: 8px;
    }

    .form-form .form-form-wrap form .division {
        margin-bottom: 8px !important;
        padding-bottom: 4px !important;
    }
}


/* ==========================================================================
   5. HOVER GUARD — touch devices
   ========================================================================== */

@media (hover: none) {
    .btn.bespeak-btn-1:hover {
        background-color: #DF3546 !important;
        border-color: #DF3546 !important;
        transform: none !important;
    }

    .forgot-pass-link:hover {
        color: #A7A39D !important;
    }
}


/* ==========================================================================
   6. HIGH-DPI / RETINA
   ========================================================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .form-form .form-form-wrap form .field-wrapper svg {
        shape-rendering: geometricPrecision;
    }
}


/* ==========================================================================
   7. REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}


/* ==========================================================================
   8. VERY SMALL PHONES — max-width: 359px
   ========================================================================== */

@media (max-width: 359px) {

    .form-form .form-form-wrap .form-container .form-content {
        padding: 20px 14px !important;
    }

    .form-content h1.bespeak-text-1 {
        font-size: 1.3rem !important;
    }

    .form-content > p {
        font-size: 0.8rem !important;
    }

    .form-form .form-form-wrap form .field-wrapper label {
        font-size: 12px !important;
    }

    .form-form .form-form-wrap form .field-wrapper a.forgot-pass-link {
        font-size: 11px !important;
    }

    .form-form .form-form-wrap form .field-wrapper .btn.bespeak-btn-1,
    .social .field-wrapper .btn.bespeak-btn-1 {
        padding: 10px 16px !important;
        font-size: 13px !important;
    }

    #chooseRegister h1.card-title {
        font-size: 1.6rem !important;
    }
}
