/**
 * Recursos Worship - Modern Login Page
 *
 * GFXToolz-inspired: dark bg with dot pattern, centered layout,
 * pill inputs, no card, social buttons on top.
 *
 * @package RecursosWorship\Frontend\Login
 */

/* ============================================================
   Variables
   ============================================================ */
:root {
    --rw-login-bg: #0a0a0c;
    --rw-login-accent: #00e5cc;
    --rw-login-accent-hover: #00ccb6;
    --rw-login-text: #ffffff;
    --rw-login-text-secondary: #b0b6c3;
    --rw-login-text-muted: #6b7280;
    --rw-login-input-bg: rgba(255, 255, 255, 0.07);
    --rw-login-input-border: rgba(255, 255, 255, 0.1);
    --rw-login-input-focus: rgba(0, 229, 204, 0.4);
    --rw-login-success: #34d399;
    --rw-login-error: #f87171;
    --rw-login-transition: 0.25s ease;
}

/* ============================================================
   Kill body scroll & fullscreen overlay
   ============================================================ */
body.rw-login-page {
    overflow: hidden !important;
    height: 100vh !important;
}

.rw-login {
    position: fixed;
    inset: 0;
    z-index: 999999;
    width: 100vw;
    height: 100vh;
    background: var(--rw-login-bg);
    color: var(--rw-login-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
}

/* ============================================================
   Dot pattern background
   ============================================================ */
.rw-login__bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    background-image: radial-gradient(circle, rgba(0, 229, 204, 0.12) 1px, transparent 1px);
    background-size: 24px 24px;
}

.rw-login__blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.2;
}

.rw-login__blob--1 {
    width: 500px;
    height: 500px;
    background: #00e5cc;
    top: -250px;
    left: 50%;
    transform: translateX(-50%);
    animation: rw-drift 25s ease-in-out infinite alternate;
}

.rw-login__blob--2 {
    width: 400px;
    height: 400px;
    background: #7c3aed;
    bottom: -200px;
    right: -100px;
    animation: rw-drift 20s ease-in-out infinite alternate-reverse;
}

.rw-login__blob--3 {
    width: 300px;
    height: 300px;
    background: #3b82f6;
    bottom: -150px;
    left: -100px;
    animation: rw-drift 30s ease-in-out infinite alternate;
}

@keyframes rw-drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -20px) scale(1.06); }
}

/* ============================================================
   Top Bar (logo)
   ============================================================ */
.rw-login__topbar {
    display: none;
}

/* ============================================================
   Content Area - Centered
   ============================================================ */
.rw-login__content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 40px 20px;
    overflow-y: auto;
}

/* ============================================================
   Center Container (replaces card + brand)
   ============================================================ */
.rw-login__center {
    width: 100%;
    max-width: 420px;
    text-align: center;
}

/* ============================================================
   Title & Subtitle
   ============================================================ */
.rw-login__title {
    font-size: 36px;
    font-weight: 800;
    margin: 0 0 8px;
    color: var(--rw-login-text);
    letter-spacing: -0.02em;
    font-style: italic;
}

.rw-login__subtitle {
    font-size: 15px;
    color: var(--rw-login-text-muted);
    margin: 0 0 32px;
}

/* ============================================================
   Notices
   ============================================================ */
.rw-login__notices {
    margin-bottom: 8px;
    text-align: left;
}

.rw-login__notices:empty {
    display: none;
}

.rw-login__notice {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 16px;
    animation: rw-fade-in 0.3s ease;
}

.rw-login__notice--error {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.2);
    color: var(--rw-login-error);
}

.rw-login__notice--success {
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.2);
    color: var(--rw-login-success);
}

@keyframes rw-fade-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Form Toggle (login/register swap)
   ============================================================ */
.rw-login__form-wrap {
    display: none;
    animation: rw-slide-in 0.35s ease;
}

.rw-login__form-wrap--active {
    display: block;
}

@keyframes rw-slide-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Social Login Buttons
   ============================================================ */
.rw-login__social {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 0;
}

.rw-login__social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 15px 24px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    letter-spacing: 0.01em;
}

.rw-login__social-btn:hover {
    text-decoration: none !important;
    transform: translateY(-1px);
}

.rw-login__social-icon {
    flex-shrink: 0;
    width: 20px !important;
    height: 20px !important;
}

/* Google - dark rounded pill */
.rw-login__social-btn--google {
    background: #1a1a1f;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.rw-login__social-btn--google:hover {
    background: #242429;
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    color: #ffffff !important;
}

/* Apple - white rounded pill */
.rw-login__social-btn--apple {
    background: #ffffff;
    color: #000000 !important;
}

.rw-login__social-btn--apple:hover {
    background: #f0f0f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    color: #000000 !important;
}

.rw-login__social-btn--apple .rw-login__social-icon {
    color: #000000;
}

/* Divider */
.rw-login__divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.rw-login__divider::before,
.rw-login__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.rw-login__divider span {
    font-size: 13px;
    color: var(--rw-login-text-muted);
    text-transform: lowercase;
}

/* ============================================================
   Form & Fields - Pill Style Inputs
   ============================================================ */
.rw-login__form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rw-login__field {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Labels hidden in this design */
.rw-login__label {
    display: none;
}

/* Pill input wrap */
.rw-login .rw-login__input-wrap {
    display: flex !important;
    align-items: center;
    width: 100%;
    background: var(--rw-login-input-bg);
    border: 1px solid var(--rw-login-input-border);
    border-radius: 50px;
    padding: 0 20px;
    transition: all var(--rw-login-transition);
    position: relative;
}

.rw-login .rw-login__input-wrap:focus-within {
    border-color: var(--rw-login-input-focus);
    background: rgba(255, 255, 255, 0.09);
    box-shadow: 0 0 0 3px rgba(0, 229, 204, 0.1);
}

/* Icon inside pill */
.rw-login .rw-login__input-icon {
    flex-shrink: 0;
    width: 18px !important;
    height: 18px !important;
    color: var(--rw-login-text-muted);
    transition: color var(--rw-login-transition);
    margin-right: 10px;
}

.rw-login .rw-login__input-wrap:focus-within .rw-login__input-icon {
    color: var(--rw-login-accent);
}

/* Input */
.rw-login .rw-login__input {
    flex: 1;
    width: 100% !important;
    padding: 16px 0 !important;
    background: transparent !important;
    border: none !important;
    color: var(--rw-login-text) !important;
    font-size: 15px !important;
    outline: none !important;
    -webkit-appearance: none !important;
    box-sizing: border-box;
    min-width: 0;
}

.rw-login .rw-login__input::placeholder {
    color: var(--rw-login-text-muted);
    font-size: 15px;
}

/* Autofill fix */
.rw-login .rw-login__input:-webkit-autofill,
.rw-login .rw-login__input:-webkit-autofill:hover,
.rw-login .rw-login__input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #151518 inset !important;
    -webkit-text-fill-color: var(--rw-login-text) !important;
    transition: background-color 5000s ease-in-out 0s;
    border-radius: 50px;
}

/* Eye toggle */
.rw-login .rw-login__toggle-pw {
    position: absolute !important;
    right: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    color: var(--rw-login-text-muted) !important;
    cursor: pointer;
    padding: 4px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    -webkit-appearance: none !important;
    appearance: none !important;
    transition: color var(--rw-login-transition);
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    line-height: 1 !important;
}

.rw-login .rw-login__toggle-pw:hover {
    color: var(--rw-login-text) !important;
    background: none !important;
    background-color: transparent !important;
}

.rw-login .rw-login__toggle-pw:focus,
.rw-login .rw-login__toggle-pw:active {
    background: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

.rw-login .rw-login__toggle-pw svg {
    width: 17px !important;
    height: 17px !important;
    display: block;
}

/* ============================================================
   Forgot Password Link
   ============================================================ */
.rw-login__forgot {
    font-size: 14px;
    color: var(--rw-login-accent);
    text-decoration: none;
    transition: color var(--rw-login-transition);
    text-align: center;
    display: block;
    margin-top: -4px;
}

.rw-login__forgot:hover {
    color: var(--rw-login-accent-hover);
    text-decoration: underline;
}

/* ============================================================
   Remember (hidden in this design)
   ============================================================ */
.rw-login__options {
    display: none;
}

/* ============================================================
   Submit Button
   ============================================================ */
.rw-login__submit {
    position: relative;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 50%, #5b21b6 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    margin-top: 4px;
    letter-spacing: 0.01em;
    background-size: 200% 200%;
    background-position: 0% 50%;
    border-radius:20px !important;
}

.rw-login__submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 50%, #6d28d9 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.rw-login__submit:hover::before {
    opacity: 1;
}

.rw-login__submit:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 25px rgba(124, 58, 237, 0.35),
        0 4px 12px rgba(109, 40, 217, 0.2);
}

.rw-login__submit:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25);
}

.rw-login__submit-text {
    position: relative;
    z-index: 1;
    transition: opacity 0.2s ease;
    color: #ffffff;
}

.rw-login__submit--loading {
    pointer-events: none;
    animation: rw-gradient-shift 2s ease infinite;
}

.rw-login__submit--loading .rw-login__submit-text {
    opacity: 0;
}

.rw-login__submit--loading .rw-login__submit-loader {
    opacity: 1;
}

@keyframes rw-gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.rw-login__submit-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 1;
}

.rw-login__submit-loader svg {
    width: 22px;
    height: 22px;
    animation: rw-spin 0.8s linear infinite;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
}

@keyframes rw-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================================
   Bottom Link (Don't have account? / Already have account?)
   ============================================================ */
.rw-login__bottom-link {
    font-size: 14px;
    color: var(--rw-login-text-muted);
    margin: 28px 0 0;
    text-align: center;
}

.rw-login__link {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    color: var(--rw-login-accent);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    margin: 0;
    text-decoration: underline;
    transition: color var(--rw-login-transition);
    -webkit-appearance: none;
    appearance: none;
    display: inline;
    line-height: inherit;
}

.rw-login__link:hover {
    color: var(--rw-login-accent-hover);
    background: none !important;
}

.rw-login__link:focus {
    background: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* ============================================================
   Password Strength
   ============================================================ */
.rw-login__pw-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    opacity: 0;
    transition: opacity var(--rw-login-transition);
    padding: 0 20px;
}

.rw-login__pw-strength--visible {
    opacity: 1;
}

.rw-login__pw-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.rw-login__pw-bar-fill {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: all 0.4s ease;
}

.rw-login__pw-bar-fill[data-strength="weak"] {
    width: 33%;
    background: var(--rw-login-error);
}

.rw-login__pw-bar-fill[data-strength="medium"] {
    width: 66%;
    background: #fbbf24;
}

.rw-login__pw-bar-fill[data-strength="strong"] {
    width: 100%;
    background: var(--rw-login-success);
}

.rw-login__pw-text {
    font-size: 11px;
    color: var(--rw-login-text-muted);
    min-width: 45px;
}

/* ============================================================
   Terms
   ============================================================ */
.rw-login__terms {
    margin-top: -4px;
}

.rw-login__terms p {
    font-size: 12px;
    color: var(--rw-login-text-muted);
    line-height: 1.5;
    margin: 0;
}

.rw-login__terms a {
    color: var(--rw-login-accent);
    text-decoration: none;
}

.rw-login__terms a:hover {
    text-decoration: underline;
}

/* ============================================================
   Right Branding Panel (hidden - centered layout)
   ============================================================ */
.rw-login__brand {
    display: none !important;
}

/* ============================================================
   WooCommerce Notice Overrides
   ============================================================ */
.rw-login .woocommerce-error,
.rw-login .woocommerce-message,
.rw-login .woocommerce-info {
    background: rgba(248, 113, 113, 0.1) !important;
    border: 1px solid rgba(248, 113, 113, 0.15) !important;
    color: var(--rw-login-error) !important;
    border-radius: 10px !important;
    padding: 10px 14px !important;
    margin-bottom: 16px !important;
    font-size: 13px !important;
    list-style: none !important;
    text-align: left !important;
}

.rw-login .woocommerce-message {
    background: rgba(52, 211, 153, 0.1) !important;
    border-color: rgba(52, 211, 153, 0.15) !important;
    color: var(--rw-login-success) !important;
}

.rw-login .woocommerce-info {
    background: rgba(79, 110, 247, 0.1) !important;
    border-color: rgba(79, 110, 247, 0.15) !important;
    color: #7c9aff !important;
}

.rw-login .woocommerce-error::before,
.rw-login .woocommerce-message::before,
.rw-login .woocommerce-info::before {
    display: none !important;
}

/* ============================================================
   Responsive
   ============================================================ */

/* Mobile */
@media (max-width: 600px) {
    .rw-login__content {
        padding: 30px 16px;
        align-items: flex-start;
        padding-top: 60px;
    }

    .rw-login__center {
        max-width: 100%;
    }

    .rw-login__title {
        font-size: 28px;
    }

    .rw-login .rw-login__input {
        padding: 14px 0 !important;
        font-size: 14px !important;
    }

    .rw-login__social-btn {
        padding: 13px 20px;
        font-size: 14px;
    }
}

/* Small mobile */
@media (max-width: 380px) {
    .rw-login__title {
        font-size: 24px;
    }
}
