/**
 * Customer Login System - Styles v2
 * File: login-style.css
 * Colors: Title #000066 | Border/Button #990066
 */

/* ============================================================
   RESET DEFAULTS — prevent theme conflicts
   ============================================================ */
#cls-overlay,
#cls-overlay * {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ============================================================
   OVERLAY — hide WC login behind, center modal
   ============================================================ */
#cls-overlay {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.45) !important;
    z-index: 999999 !important;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

#cls-overlay.cls-open {
    display: flex !important;
}

/* ============================================================
   MODAL CARD
   ============================================================ */
.cls-card {
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    padding: 36px 28px 28px;
    position: relative;
    box-shadow: 0 24px 64px rgba(0,0,0,0.18);
    animation: cls-pop 0.28s cubic-bezier(0.34,1.4,0.64,1) both;
}

@keyframes cls-pop {
    from { opacity: 0; transform: scale(0.92) translateY(16px); }
    to   { opacity: 1; transform: scale(1)    translateY(0); }
}

/* ============================================================
   CLOSE BUTTON — top-right corner
   ============================================================ */
#cls-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 30px;
    height: 30px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #666;
    line-height: 1;
    padding: 0;
    transition: background 0.2s;
    z-index: 2;
}

#cls-close:hover { background: #e0e0e0; }

/* ============================================================
   LOGO
   ============================================================ */
.cls-logo {
    text-align: center;
    margin-bottom: 18px;
}

.cls-logo img {
    max-height: 52px;
    width: auto;
    display: inline-block;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.cls-title {
    font-size: 19px;
    font-weight: 700;
    color: #000066;
    text-align: center;
    margin: 0 0 6px;
    line-height: 1.3;
}

.cls-subtitle {
    font-size: 13px;
    color: #888;
    text-align: center;
    margin: 0 0 22px;
    line-height: 1.5;
}

.cls-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}

/* ============================================================
   PHONE INPUT WITH +880 PREFIX
   ============================================================ */
.cls-phone-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid #990066;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 18px;
    background: #fff;
    transition: box-shadow 0.2s;
}

.cls-phone-wrap:focus-within {
    box-shadow: 0 0 0 3px rgba(153,0,102,0.12);
}

.cls-phone-prefix {
    padding: 0 10px 0 14px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    border-right: 1.5px solid #e0e0e0;
    height: 46px;
    display: flex;
    align-items: center;
    background: #fafafa;
    white-space: nowrap;
    user-select: none;
}

#cls-phone {
    flex: 1;
    border: none;
    outline: none;
    height: 46px;
    padding: 0 14px;
    font-size: 15px;
    color: #222;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
}

#cls-phone::placeholder {
    color: #bbb;
}

/* ============================================================
   STANDARD INPUT
   ============================================================ */
.cls-input {
    width: 100%;
    height: 46px;
    border: 1.5px solid #990066;
    border-radius: 10px;
    padding: 0 42px 0 14px;
    font-size: 15px;
    color: #222;
    outline: none;
    background: #fff;
    margin-bottom: 14px;
    transition: box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
    display: block;
}

.cls-input:focus {
    box-shadow: 0 0 0 3px rgba(153,0,102,0.12);
}

.cls-pass-wrap {
    position: relative;
    margin-bottom: 14px;
}

.cls-pass-wrap .cls-input {
    margin-bottom: 0;
}

.cls-eye-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #aaa;
    font-size: 17px;
    line-height: 1;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.cls-btn {
    display: block;
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.2px;
    margin-top: 4px;
}

.cls-btn-primary {
    background: #990066;
    color: #fff;
}

.cls-btn-primary:hover:not(:disabled) {
    background: #7a0050;
    transform: translateY(-1px);
}

.cls-btn-primary:disabled {
    background: #ccc;
    color: #999;
    cursor: not-allowed;
    transform: none;
}

/* ============================================================
   OTP BOXES
   ============================================================ */
.cls-otp-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 8px;
}

.cls-otp-box {
    width: 58px;
    height: 58px;
    border: 1.5px solid #990066;
    border-radius: 12px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: #000066;
    outline: none;
    background: #fff;
    transition: box-shadow 0.2s, border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
    caret-color: #990066;
}

.cls-otp-box:focus {
    box-shadow: 0 0 0 3px rgba(153,0,102,0.15);
    border-color: #990066;
}

/* OTP hint row (digits shown below boxes) */
.cls-otp-hint {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 16px;
    min-height: 22px;
}

.cls-otp-hint span {
    width: 58px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #990066;
    letter-spacing: 1px;
    opacity: 0;
    transition: opacity 0.4s;
}

.cls-otp-hint.cls-visible span {
    opacity: 1;
}

/* ============================================================
   TIMER
   ============================================================ */
.cls-timer {
    text-align: center;
    font-size: 13px;
    color: #990066;
    font-weight: 500;
    margin-top: 12px;
}

/* ============================================================
   OTP SENT INFO
   ============================================================ */
.cls-otp-sent {
    font-size: 13px;
    color: #555;
    text-align: center;
    margin-bottom: 16px;
    line-height: 1.5;
}

.cls-otp-sent strong { color: #000066; }

.cls-change-num {
    color: #990066;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    margin-left: 4px;
}

.cls-change-num:hover { text-decoration: underline; }

/* ============================================================
   PHONE DISPLAY (in password/set-pass steps)
   ============================================================ */
.cls-phone-show {
    text-align: center;
    font-size: 13px;
    color: #666;
    margin-bottom: 16px;
}

.cls-phone-show strong { color: #000066; }

/* ============================================================
   FORGOT PASSWORD LINK
   ============================================================ */
.cls-forgot {
    display: block;
    text-align: center;
    font-size: 13px;
    color: #990066;
    cursor: pointer;
    margin-top: 12px;
    text-decoration: none;
    background: none;
    border: none;
    width: 100%;
    padding: 0;
}

.cls-forgot:hover { text-decoration: underline; }

/* ============================================================
   ERROR / NOTICE
   ============================================================ */
.cls-notice {
    border-radius: 8px;
    padding: 10px 13px;
    font-size: 13px;
    margin-bottom: 14px;
    display: none;
    line-height: 1.5;
}

.cls-notice.cls-error {
    background: #fff0f0;
    border: 1px solid #ffcaca;
    color: #c0392b;
    display: block;
}

.cls-notice.cls-warn {
    background: #fffbe6;
    border: 1px solid #ffe58f;
    color: #856404;
    display: block;
}

/* ============================================================
   LOADING SPINNER (inside button)
   ============================================================ */
.cls-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: cls-spin 0.65s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes cls-spin { to { transform: rotate(360deg); } }

/* ============================================================
   HIDE DEFAULT WC LOGIN FORM
   ============================================================ */
.woocommerce-account:not(.logged-in) .woocommerce-MyAccount-content,
.woocommerce-account:not(.logged-in) .woocommerce-form-login,
.woocommerce-account:not(.logged-in) .woocommerce-form-register,
.woocommerce-account:not(.logged-in) .u-column1,
.woocommerce-account:not(.logged-in) .u-column2 {
    display: none !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 440px) {
    .cls-card {
        padding: 28px 18px 22px;
        border-radius: 16px;
    }

    .cls-otp-box {
        width: 50px;
        height: 50px;
        font-size: 19px;
        border-radius: 10px;
    }

    .cls-otp-hint span {
        width: 50px;
    }

    .cls-otp-row { gap: 8px; }
    .cls-otp-hint { gap: 8px; }

    .cls-title { font-size: 17px; }
}