/**
 * MyAuth Styles
 * File: assets/myauth.css
 *
 * TAB PANEL VISIBILITY STRATEGY
 * ─────────────────────────────
 * Panels start hidden via CSS: .myauth-tab-panel { display: none }
 * myauth.js uses explicit .css('display','block') / .css('display','none')
 * to show/hide panels — NEVER jQuery.hide() / .show() / .fadeIn() which
 * would corrupt jQuery's internal olddisplay and break subsequent show calls.
 */

/* ===== CONTAINER STYLES ===== */
.myauth-login-container,
.myauth-register-container,
.myauth-woocommerce-wrapper {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
}

/* ===== MAIN TABS: LOGIN / REGISTER (My Account page) ===== */
.myauth-main-tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 0;
    background: #f8f8f8;
}

.myauth-main-tab {
    flex: 1;
    padding: 18px 20px;
    text-align: center;
    cursor: pointer;
    background: #f8f8f8;
    border: none;
    border-bottom: 3px solid transparent;
    color: #666;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.25s ease;
}

.myauth-main-tab:hover {
    background: #ececec;
    color: #333;
}

.myauth-main-tab.active {
    background: #fff;
    color: #1e73be;
    border-bottom-color: #1e73be;
}

.myauth-main-panel {
    padding-top: 20px;
}

/* ===== SUB-TAB NAVIGATION ===== */
.myauth-tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 30px;
    background: #f8f8f8;
    flex-wrap: wrap;
    gap: 0;
}

.myauth-tab {
    flex: 1;
    padding: 15px 20px;
    text-align: center;
    cursor: pointer;
    background: #f8f8f8;
    border: none;
    border-bottom: 3px solid transparent;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    transition: all 0.3s ease;
    min-width: 120px;
}

.myauth-tab:hover {
    background: #ececec;
    color: #333;
}

.myauth-tab.active {
    background: #fff;
    color: #1e73be;
    border-bottom-color: #1e73be;
    font-weight: 600;
}

/* ===== TAB CONTENT PANELS ===== */
.myauth-tab-content {
    position: relative;
}

/*
 * Panels hidden by default. JS controls visibility with explicit .css() calls.
 * .myauth-tab-pane is a legacy alias kept for backwards compatibility.
 */
.myauth-tab-panel,
.myauth-tab-pane {
    display: none;
}

.myauth-tab-panel.active,
.myauth-tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ===== MULTI-STEP FORMS (OTP) ===== */
.myauth-step {
    display: none;
}

.myauth-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.myauth-info {
    padding: 12px 15px;
    background: #f0f7ff;
    border: 1px solid #d0e7ff;
    border-radius: 4px;
    margin-bottom: 20px;
    color: #333;
}

.myauth-info .myauth-phone-display,
.myauth-info .myauth-email-display {
    font-weight: 600;
    color: #1e73be;
}

.myauth-info a {
    color: #1e73be;
    text-decoration: none;
    margin-left: 10px;
    font-size: 13px;
}

.myauth-info a:hover {
    text-decoration: underline;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== FORM STYLES ===== */
.myauth-form {
    width: 100%;
}

.myauth-tab-panel h3,
.myauth-tab-pane h3,
.myauth-form h3,
.myauth-step h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
}

.myauth-tab-panel > p,
.myauth-tab-pane > p,
.myauth-step > p:first-of-type {
    margin-bottom: 25px;
    color: #666;
}

/* ===== FORM FIELDS ===== */
.myauth-field {
    margin-bottom: 20px;
}

.myauth-field label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.myauth-field input[type="text"],
.myauth-field input[type="email"],
.myauth-field input[type="tel"],
.myauth-field input[type="password"],
.myauth-field input[type="date"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.myauth-field input:focus {
    outline: none;
    border-color: #1e73be;
    box-shadow: 0 0 0 2px rgba(30, 115, 190, 0.1);
}

.myauth-field small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #999;
    font-style: italic;
}

/* ===== FORM ROWS ===== */
.myauth-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 0;
}

.myauth-field-half {
    flex: 1;
    margin-bottom: 20px;
}

/* ===== CHECKBOX ===== */
.myauth-field-checkbox label,
.myauth-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.myauth-field-checkbox input[type="checkbox"],
.myauth-checkbox input[type="checkbox"] {
    margin-top: 3px;
    width: auto;
}

/* ===== BUTTONS ===== */
.myauth-submit {
    margin-top: 25px;
    margin-bottom: 15px;
}

.myauth-submit button,
.myauth-form button[type="submit"],
.myauth-form .button {
    width: 100%;
    padding: 14px 20px;
    background: #1e73be;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    font-family: inherit;
}

.myauth-submit button:hover,
.myauth-form button[type="submit"]:hover,
.myauth-form .button:hover {
    background: #165a92;
}

.myauth-submit button:disabled,
.myauth-form button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.button-link {
    background: none !important;
    border: none;
    padding: 10px;
    color: #1e73be;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
}

.button-link:hover {
    background: none !important;
    color: #165a92;
}

/* ===== MESSAGES ===== */
.myauth-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 4px;
    display: none;
}

.myauth-message.success {
    display: block;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.myauth-message.error {
    display: block;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* ===== REGISTER/LOGIN LINK ===== */
.myauth-register-link,
.myauth-login-link {
    margin-top: 20px;
    text-align: center;
    color: #666;
}

.myauth-register-link a,
.myauth-login-link a {
    color: #1e73be;
    text-decoration: none;
    font-weight: 600;
}

.myauth-register-link a:hover,
.myauth-login-link a:hover {
    text-decoration: underline;
}

/* ===== PAGE TITLE ===== */
.myauth-page-title {
    margin-bottom: 10px;
    font-size: 28px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== XOOTIX FORM OVERRIDES ===== */
.myauth-tab-panel span.xoo-ml-or,
.myauth-tab-pane span.xoo-ml-or {
    display: none !important;
}

.myauth-tab-panel button.xoo-ml-open-lwo-btn,
.myauth-tab-pane button.xoo-ml-open-lwo-btn {
    width: 100%;
    max-width: 100%;
    margin: 10px 0;
}

.myauth-tab-panel form.xoo-lwo-form,
.myauth-tab-pane form.xoo-lwo-form {
    width: 100%;
    margin-top: 10px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .myauth-tab {
        padding: 12px 10px;
        font-size: 12px;
        min-width: 100px;
    }
    .myauth-main-tab {
        padding: 14px 10px;
        font-size: 14px;
    }
    .myauth-login-container,
    .myauth-register-container,
    .myauth-woocommerce-wrapper {
        padding: 15px;
    }
    .myauth-form-row {
        flex-direction: column;
        gap: 0;
    }
    .myauth-tab-panel h3,
    .myauth-tab-pane h3,
    .myauth-step h3 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .myauth-tabs {
        flex-direction: column;
    }
    .myauth-tab {
        flex: 1 1 100%;
        min-width: 100%;
        border-bottom: 1px solid #ddd;
    }
    .myauth-tab.active {
        border-bottom: 3px solid #1e73be;
    }
    .myauth-main-tabs {
        flex-direction: column;
    }
    .myauth-main-tab {
        flex: 1 1 100%;
    }
    .myauth-login-container,
    .myauth-register-container,
    .myauth-woocommerce-wrapper {
        padding: 10px;
    }
}