/* QuinKart Auth & Dashboard - High End CSS */

/* ━━━ GLOBAL MODAL OVERLAY ━━━ */
.qkad-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: qkad-fade-in 0.3s forwards;
}

@keyframes qkad-fade-in {
    to { opacity: 1; }
}

.qkad-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 32px;
    color: #282c3f;
    cursor: pointer;
    z-index: 100;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}
.qkad-modal-close:hover {
    color: #ff3e6c;
}

/* Modifying the wrapper to act as the modal card */
.qkad-auth-modal {
    margin: 0 !important;
    min-height: auto !important;
    width: 90%;
    max-width: 850px !important;
    transform: translateY(30px) scale(0.95);
    animation: qkad-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2) !important;
}

@keyframes qkad-slide-up {
    to { 
        transform: translateY(0) scale(1); 
    }
}

/* Mobile specific: Bottom sheet */
@media (max-width: 767px) {
    .qkad-modal-overlay {
        align-items: flex-end; /* Align to the bottom like Myntra app */
    }
    .qkad-auth-modal {
        width: 100%;
        max-width: 100% !important;
        border-radius: 24px 24px 0 0 !important;
        transform: translateY(100%);
        animation: qkad-slide-up-mobile 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
    @keyframes qkad-slide-up-mobile {
        to { transform: translateY(0); }
    }
}

.qkad-auth-wrapper {
    display: flex;
    min-height: 80vh;
    background: #fff;
    font-family: 'Poppins', sans-serif;
    border-radius: 12px;
    box-shadow: 0 4px 40px rgba(0,0,0,0.06);
    overflow: hidden;
    margin: 40px auto;
    max-width: 1000px;
}

/* ━━━ BANNER PORTION ━━━ */
.qkad-auth-banner {
    flex: 1;
    background: linear-gradient(135deg, #ff3e6c 0%, #ff7b54 100%);
    position: relative;
    display: none;
    align-items: center;
    justify-content: center;
    text-align: center;
}

@media (min-width: 768px) {
    .qkad-auth-banner {
        display: flex; /* Only show on desktop */
    }
}

.qkad-brand-overlay h1 {
    color: #fff;
    font-size: 42px;
    font-family: 'Playfair Display', serif;
    font-weight: 800;
    margin: 0 0 10px 0;
}
.qkad-brand-overlay p {
    color: rgba(255,255,255,0.9);
    font-size: 15px;
}

/* ━━━ FORM PORTION ━━━ */
.qkad-auth-container {
    flex: 1;
    padding: 40px 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.qkad-auth-card {
    width: 100%;
    max-width: 400px;
}

.qkad-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #282c3f;
    margin: 0 0 8px 0;
}

.qkad-header p {
    font-size: 14px;
    color: #696e79;
    margin: 0 0 35px 0;
    line-height: 1.5;
}

/* ━━━ INPUT GOURP ━━━ */
.qkad-input-group {
    display: flex;
    align-items: center;
    height: 52px;
    border: 1px solid #d4d5d9;
    border-radius: 4px;
    padding: 0 15px;
    transition: border-color 0.2s;
    background: #fff;
}

.qkad-input-group:focus-within {
    border-color: #ff3e6c;
}

.qkad-phone-prefix {
    font-weight: 600;
    font-size: 15px;
    color: #282c3f;
    padding-right: 12px;
}

.qkad-divider {
    width: 1px;
    height: 24px;
    background: #d4d5d9;
    margin-right: 15px;
}

#qkad-phone {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    font-weight: 600;
    color: #282c3f;
    background: transparent;
    padding: 0;
}

/* ━━━ TERMS ━━━ */
.qkad-terms {
    font-size: 12px;
    color: #94969f;
    margin: 24px 0;
    line-height: 1.5;
}
.qkad-terms a {
    color: #ff3e6c;
    text-decoration: none;
    font-weight: 600;
}

/* ━━━ BUTTONS ━━━ */
.qkad-btn-primary {
    width: 100%;
    height: 50px;
    background: #ff3e6c;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s background;
}

.qkad-btn-primary:active {
    background: #e6315a;
}
.qkad-btn-primary:disabled {
    background: #f1f2f4;
    color: #a9abb3;
    cursor: not-allowed;
}

.qkad-otp-input {
    width: 100%;
    height: 52px;
    border: 1px solid #d4d5d9;
    border-radius: 4px;
    padding: 0 15px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 15px;
    color: #282c3f;
    text-align: center;
    outline: none;
}
.qkad-otp-input:focus { border-color: #ff3e6c; }

/* ━━━ UTILITIES ━━━ */
.qkad-hidden { display: none !important; }
.qkad-hr { border: 0; border-top: 1px solid #eaeaec; margin: 30px 0; }

#qkad-message-box {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 600;
    background: #fee2e2;
    color: #dc2626;
}
.qkad-message-success {
    background: #dcfce7 !important;
    color: #166534 !important;
}

/* ━━━ SPINNER ━━━ */
@keyframes qkad-spin {
    to { transform: rotate(360deg); }
}
.qkad-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: qkad-spin 0.8s linear infinite;
    position: absolute;
}
.qkad-btn-primary:disabled .qkad-spinner {
    border: 2px solid rgba(0,0,0,0.1);
    border-top-color: #a9abb3;
}
