/**
 * Mariyas Naturals — Custom Login/Register Styles v2.0
 * Pixel-perfect match to the approved design
 * WooCommerce + Woodmart + SMSAlert + Google Login
 */

/* ═══════════════════════════════════════════
   GOOGLE FONTS — Poppins for UI, Playfair Display for brand
   ═══════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

/* ═══════════════════════════════════════════
   WRAPPER — centered white card
   ═══════════════════════════════════════════ */
.mariyas-login-wrapper {
    max-width: 420px;
    width: 100%;
    margin: 2rem auto;
    background: #ffffff;
    border-radius: 16px;
    padding: 32px 32px 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box;
    position: relative;
}

.mariyas-login-wrapper *,
.mariyas-login-wrapper *::before,
.mariyas-login-wrapper *::after {
    box-sizing: border-box;
}

/* ═══════════════════════════════════════════
   BRAND HEADER
   ═══════════════════════════════════════════ */
.mariyas-brand {
    text-align: center;
    margin-bottom: 24px;
}

.mariyas-brand-name {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 26px;
    font-weight: 700;
    color: #1a3a1a;
    letter-spacing: 0.02em;
    line-height: 1.2;
    margin-bottom: 4px;
}

.mariyas-brand-tagline {
    font-family: 'Poppins', sans-serif;
    font-size: 10px;
    font-weight: 500;
    color: #8c8c7a;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    line-height: 1.4;
}

/* ═══════════════════════════════════════════
   TABS
   ═══════════════════════════════════════════ */
.mariyas-login-tabs {
    display: flex;
    border-bottom: 1px solid #e5e5e0;
    margin-bottom: 20px;
    gap: 0;
}

.mariyas-tab {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 2.5px solid transparent;
    padding: 10px 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #999990;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    letter-spacing: 0.01em;
    line-height: 1.4;
    margin-bottom: -1px;
    outline: none;
}

.mariyas-tab:hover {
    color: #444440;
}

.mariyas-tab.active {
    color: #1a1a18;
    font-weight: 600;
    border-bottom-color: #25D366;
}

/* ═══════════════════════════════════════════
   TAB CONTENT
   ═══════════════════════════════════════════ */
.mariyas-tab-content {
    display: none;
}

.mariyas-tab-content.active {
    display: block;
}

/* ═══════════════════════════════════════════
   RECOMMENDED BADGE (Register tab)
   ═══════════════════════════════════════════ */
.mariyas-recommended-badge {
    display: inline-block;
    font-family: 'Poppins', sans-serif;
    font-size: 10px;
    font-weight: 600;
    color: #25D366;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 10px;
    padding: 3px 0;
}

/* ═══════════════════════════════════════════
   SECTION LABEL — "◆ QUICK LOGIN VIA WHATSAPP"
   ═══════════════════════════════════════════ */
.mariyas-section-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #666660;
    margin-bottom: 14px;
    line-height: 1.4;
}

.mariyas-diamond {
    font-size: 7px;
    color: #25D366;
    line-height: 1;
}

/* ═══════════════════════════════════════════
   SMSALERT OTP FORM OVERRIDES
   ═══════════════════════════════════════════ */
.mariyas-otp-container {
    margin-bottom: 8px;
}

/* --- Phone number input row (country code + number) --- */
.mariyas-otp-container .sa_phone_wrapper,
.mariyas-otp-container .smsalert_phone_field,
.mariyas-otp-container .phone_number_field,
.mariyas-otp-container .sa-phone-wrap {
    display: flex !important;
    align-items: stretch !important;
    gap: 0 !important;
    width: 100% !important;
}

/* Country code dropdown */
.mariyas-otp-container select,
.mariyas-otp-container .country_code_select,
.mariyas-otp-container .sa_country_code,
.mariyas-otp-container select.sa_country_code {
    background: #f5f5f0 !important;
    border: 1.5px solid #ddddd5 !important;
    border-right: none !important;
    border-radius: 10px 0 0 10px !important;
    padding: 12px 8px 12px 12px !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #1a1a18 !important;
    min-width: 70px !important;
    max-width: 80px !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    outline: none !important;
    height: auto !important;
    line-height: 1.4 !important;
}

/* Phone number input */
.mariyas-otp-container input[type="tel"],
.mariyas-otp-container input[type="text"],
.mariyas-otp-container input[type="number"],
.mariyas-otp-container .smsalert_phone_field input,
.mariyas-otp-container #sa_phone_number,
.mariyas-otp-container .phone_number_field input,
.mariyas-otp-container input.sa_phone_field {
    flex: 1 !important;
    width: 100% !important;
    background: #ffffff !important;
    border: 1.5px solid #ddddd5 !important;
    border-radius: 0 10px 10px 0 !important;
    padding: 12px 14px !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #1a1a18 !important;
    outline: none !important;
    height: auto !important;
    line-height: 1.4 !important;
    transition: border-color 0.2s !important;
}

.mariyas-otp-container input[type="tel"]::placeholder,
.mariyas-otp-container input[type="text"]::placeholder,
.mariyas-otp-container input[type="number"]::placeholder,
.mariyas-otp-container input.sa_phone_field::placeholder {
    color: #b0b0a8 !important;
    font-weight: 400 !important;
    font-size: 14px !important;
}

.mariyas-otp-container input:focus {
    border-color: #25D366 !important;
    box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.12) !important;
}

/* Standalone phone input (when no country code wrapper) */
.mariyas-otp-container > input[type="tel"],
.mariyas-otp-container > input[type="text"] {
    border-radius: 10px !important;
}

/* ═══════════════════════════════════════════
   OTP SEND BUTTON — WhatsApp green
   ═══════════════════════════════════════════ */
.mariyas-otp-container .sa-otp-btn,
.mariyas-otp-container .smsalert_otp_btn,
.mariyas-otp-container input[type="button"].sa_default_otp_btn,
.mariyas-otp-container button[type="submit"],
.mariyas-otp-container .smsalert-btn,
.mariyas-otp-container #sa_verify_btn,
.mariyas-otp-container .sa_send_otp,
.mariyas-otp-container input[type="submit"] {
    display: block !important;
    width: 100% !important;
    background-color: #25D366 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 13px 20px !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
    cursor: pointer !important;
    transition: background-color 0.2s, transform 0.1s !important;
    margin-top: 12px !important;
    line-height: 1.4 !important;
    text-align: center !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    height: auto !important;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.25) !important;
}

.mariyas-otp-container .sa-otp-btn:hover,
.mariyas-otp-container .smsalert_otp_btn:hover,
.mariyas-otp-container input[type="button"].sa_default_otp_btn:hover,
.mariyas-otp-container button[type="submit"]:hover,
.mariyas-otp-container .smsalert-btn:hover,
.mariyas-otp-container input[type="submit"]:hover {
    background-color: #1fb855 !important;
}

.mariyas-otp-container .sa-otp-btn:active,
.mariyas-otp-container .smsalert_otp_btn:active,
.mariyas-otp-container button[type="submit"]:active {
    transform: scale(0.985) !important;
}

/* ═══════════════════════════════════════════
   OTP DIGIT INPUTS
   ═══════════════════════════════════════════ */
.mariyas-otp-container .sa_otp_field input,
.mariyas-otp-container .otp_field input {
    width: 46px !important;
    height: 52px !important;
    text-align: center !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    border: 1.5px solid #ddddd5 !important;
    border-radius: 10px !important;
    margin: 0 4px !important;
    color: #1a1a18 !important;
    outline: none !important;
    transition: border-color 0.2s !important;
}

.mariyas-otp-container .sa_otp_field input:focus,
.mariyas-otp-container .otp_field input:focus {
    border-color: #25D366 !important;
    box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.12) !important;
}

/* Resend link */
.mariyas-otp-container .sa_resend,
.mariyas-otp-container .resend_otp {
    color: #25D366 !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    text-decoration: none !important;
}

.mariyas-otp-container .sa_resend:hover,
.mariyas-otp-container .resend_otp:hover {
    text-decoration: underline !important;
}

/* Hide SMSAlert's own "or" text & unnecessary labels */
.mariyas-otp-container .sa-or-text {
    display: none !important;
}

/* ═══════════════════════════════════════════
   HELPER TEXT — below OTP button
   ═══════════════════════════════════════════ */
.mariyas-helper-text {
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: #999990;
    margin-top: 8px;
    margin-bottom: 4px;
    line-height: 1.5;
    letter-spacing: 0.01em;
}

/* ═══════════════════════════════════════════
   DIVIDER — "or continue with"
   ═══════════════════════════════════════════ */
.mariyas-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
}

.mariyas-divider::before,
.mariyas-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e5e0;
}

.mariyas-divider span {
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: #999990;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════
   GOOGLE LOGIN BUTTON
   ═══════════════════════════════════════════ */
.mariyas-google-login {
    margin-bottom: 16px;
}

/* rtCamp Google Login button */
.mariyas-google-login .wp_google_login,
.mariyas-google-login .wp_google_login__button,
.mariyas-google-login .login-with-google-btn,
.mariyas-google-login .log-in-with-google-btn,
.mariyas-google-login a[class*="google"],
.mariyas-google-login button[class*="google"],
.mariyas-google-btn-fallback {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    width: 100% !important;
    background: #ffffff !important;
    color: #3c4043 !important;
    border: 1.5px solid #ddddd5 !important;
    border-radius: 10px !important;
    padding: 12px 20px !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
    height: auto !important;
    letter-spacing: 0.01em !important;
}

.mariyas-google-login .wp_google_login:hover,
.mariyas-google-login .wp_google_login__button:hover,
.mariyas-google-login a[class*="google"]:hover,
.mariyas-google-login button[class*="google"]:hover,
.mariyas-google-btn-fallback:hover {
    background: #f8f8f5 !important;
    border-color: #c5c5c0 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06) !important;
}

/* Google icon inside rtCamp button */
.mariyas-google-login .wp_google_login img,
.mariyas-google-login .wp_google_login__button img,
.mariyas-google-login a[class*="google"] img,
.mariyas-google-login button[class*="google"] img {
    width: 20px !important;
    height: 20px !important;
    vertical-align: middle !important;
}

/* Woodmart social login button */
.mariyas-google-login .wd-social-login .login-goo-link,
.mariyas-google-login .wd-social-login a {
    width: 100% !important;
    border-radius: 10px !important;
    text-align: center !important;
    padding: 12px 20px !important;
}

/* Fallback button SVG icon */
.mariyas-google-btn-fallback svg {
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   FOOTER — Terms & Privacy
   ═══════════════════════════════════════════ */
.mariyas-login-footer {
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: #999990;
    line-height: 1.65;
    padding-top: 4px;
}

.mariyas-login-footer a {
    color: #1a3a1a;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.mariyas-login-footer a:hover {
    color: #25D366;
}

/* ═══════════════════════════════════════════
   NOTE (placeholder when plugins not configured)
   ═══════════════════════════════════════════ */
.mariyas-note {
    color: #999990;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 400;
    font-style: italic;
    text-align: center;
    padding: 16px;
    background: #f8f8f5;
    border-radius: 10px;
    border: 1.5px dashed #ddddd5;
    line-height: 1.55;
}

/* ═══════════════════════════════════════════
   HIDE DEFAULT WOOCOMMERCE FORMS
   ═══════════════════════════════════════════ */
.woocommerce-form-login-toggle,
.woocommerce-form-register-toggle,
#customer_login,
.woocommerce-form-login:not(.mariyas-otp-container .woocommerce-form-login),
.create-account-question {
    display: none !important;
}

/* Keep WooCommerce notices visible */
.woocommerce-notices-wrapper,
.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
    display: block !important;
    max-width: 420px;
    margin: 0 auto 1rem !important;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    border-radius: 10px;
}

/* ═══════════════════════════════════════════
   WOODMART THEME COMPATIBILITY
   ═══════════════════════════════════════════ */
.woocommerce-account .mariyas-login-wrapper {
    margin-top: 2rem;
}

/* Reset Woodmart's forced input heights */
.mariyas-login-wrapper input:not([type="checkbox"]):not([type="radio"]) {
    height: auto !important;
}

/* Reset Woodmart's button styles inside our wrapper */
.mariyas-login-wrapper button,
.mariyas-login-wrapper input[type="button"],
.mariyas-login-wrapper input[type="submit"] {
    height: auto !important;
}

/* Disable Woodmart login popup */
.wd-login-dropdown {
    display: none !important;
}

/* Fix Woodmart spacing on My Account */
.woocommerce-account .woocommerce-MyAccount-content {
    /* Allow our card to render cleanly */
}

/* ═══════════════════════════════════════════
   RESPONSIVE — Tablet (max-width: 768px)
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
    .mariyas-login-wrapper {
        max-width: 400px;
        margin: 1.5rem auto;
        padding: 28px 24px 20px;
    }

    .mariyas-brand-name {
        font-size: 24px;
    }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — Mobile (max-width: 480px)
   ═══════════════════════════════════════════ */
@media (max-width: 480px) {
    .mariyas-login-wrapper {
        max-width: calc(100% - 24px);
        margin: 12px auto;
        padding: 24px 20px 18px;
        border-radius: 14px;
    }

    .mariyas-brand-name {
        font-size: 22px;
    }

    .mariyas-brand-tagline {
        font-size: 9px;
        letter-spacing: 0.2em;
    }

    .mariyas-tab {
        font-size: 13px;
        padding: 9px 6px;
    }

    .mariyas-section-label {
        font-size: 9px;
    }

    .mariyas-otp-container input[type="tel"],
    .mariyas-otp-container input[type="text"],
    .mariyas-otp-container input[type="number"],
    .mariyas-otp-container .smsalert_phone_field input,
    .mariyas-otp-container input.sa_phone_field {
        padding: 11px 12px !important;
        font-size: 13px !important;
    }

    .mariyas-otp-container select,
    .mariyas-otp-container .country_code_select,
    .mariyas-otp-container .sa_country_code {
        padding: 11px 6px 11px 10px !important;
        font-size: 13px !important;
        min-width: 62px !important;
    }

    .mariyas-otp-container .sa-otp-btn,
    .mariyas-otp-container .smsalert_otp_btn,
    .mariyas-otp-container input[type="button"].sa_default_otp_btn,
    .mariyas-otp-container button[type="submit"],
    .mariyas-otp-container .smsalert-btn,
    .mariyas-otp-container input[type="submit"] {
        padding: 12px 16px !important;
        font-size: 13px !important;
        margin-top: 10px !important;
    }

    .mariyas-otp-container .sa_otp_field input,
    .mariyas-otp-container .otp_field input {
        width: 40px !important;
        height: 46px !important;
        font-size: 18px !important;
        margin: 0 3px !important;
    }

    .mariyas-google-login .wp_google_login,
    .mariyas-google-login .wp_google_login__button,
    .mariyas-google-login a[class*="google"],
    .mariyas-google-login button[class*="google"],
    .mariyas-google-btn-fallback {
        padding: 11px 16px !important;
        font-size: 13px !important;
    }

    .mariyas-divider span {
        font-size: 10px;
    }

    .mariyas-helper-text {
        font-size: 10px;
    }

    .mariyas-login-footer {
        font-size: 10px;
    }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — Very small phones (max-width: 360px)
   ═══════════════════════════════════════════ */
@media (max-width: 360px) {
    .mariyas-login-wrapper {
        max-width: calc(100% - 16px);
        padding: 20px 16px 16px;
        border-radius: 12px;
    }

    .mariyas-brand-name {
        font-size: 20px;
    }

    .mariyas-tab {
        font-size: 12px;
    }

    .mariyas-otp-container .sa_otp_field input,
    .mariyas-otp-container .otp_field input {
        width: 36px !important;
        height: 42px !important;
        font-size: 16px !important;
        margin: 0 2px !important;
    }
}

/* ═══════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════ */
.mariyas-tab-content.active {
    animation: mariyasFadeIn 0.2s ease-out;
}

@keyframes mariyasFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
