/**
 * WW Login - Frontend Styles
 * 
 * Minimal, customizable styles for the login form.
 * Override in your theme for custom styling.
 */

/* ==========================================================================
   Form Container
   ========================================================================== */

.ww-login-wrapper {
    max-width: 400px;
    margin: 0 auto;
    padding: 2rem;
    padding-bottom: 5px;
    padding-top: 20px;
}

.ww-login-form {
    width: 100%;
    
}

@media (max-width: 480px) {
    .ww-login-form {
        width: 100%;
        
    }
}

/* ==========================================================================
   Form Groups
   ========================================================================== */

.ww-form-group {
    margin-bottom: 1.25rem;
}

.ww-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

/* ==========================================================================
   Input Fields
   ========================================================================== */

.ww-form-control {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.ww-form-control:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.ww-form-control.ww-field-invalid {
    border-color: #dc3545;
}

.ww-form-control.ww-field-invalid:focus {
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

#ww-login-form input {
    font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 
             "Helvetica Neue", Arial, sans-serif;
}

/* ==========================================================================
   Password Field with Toggle
   ========================================================================== */

.ww-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.ww-password-wrapper .ww-form-control {
    padding-right: 3rem;
}

.ww-password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.ww-password-toggle:hover {
    color: #333;
}

.ww-password-toggle:focus {
    outline: none;
    color: #0073aa;
}

.ww-password-toggle .ww-icon-eye-off {
    display: none;
}

.ww-password-toggle.ww-password-visible .ww-icon-eye {
    display: none;
}

.ww-password-toggle.ww-password-visible .ww-icon-eye-off {
    display: block;
}

/* ==========================================================================
   Field Errors
   ========================================================================== */

.ww-field-error {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

/* ==========================================================================
   Checkbox & Lost Password Row
   ========================================================================== */

.ww-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (max-width: 767px) {
    .ww-form-row {
    margin-bottom: 10px;
    }
}

.ww-form-row-end {
    justify-content: flex-end;
}

.ww-checkbox-label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
    margin-bottom: 0;
    font-size: 15px;
}

.ww-checkbox-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin-right: 1px;
    cursor: pointer;
    margin-left: 2px;
}

.ww-lost-password-link {
    font-size: 15px;
    color: #1A22B4;
    text-decoration: none;
    padding-bottom: 8px;
}

.ww-lost-password-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Submit Button
   ========================================================================== */

.ww-form-submit {
    margin-top: 1.5rem;
}

@media (max-width: 767px) {
    .ww-form-submit {
        margin-top: 0;
    }
}

.ww-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    border: none;
    border-radius: 4px;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

#ww-login-submit {
    width: 100%;
}

.ww-btn-primary {
    color: #fff;
    background-color: #0073aa;
}

.ww-btn-primary:hover {
    background-color: #005a87;
}

.ww-btn-primary:active {
    transform: scale(0.98);
}

.ww-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Loading state */
.ww-btn .ww-btn-loading {
    display: none;
    margin-left: 0.5rem;
}

.ww-btn.ww-loading .ww-btn-loading {
    display: inline-flex;
}

/* Spinner */
.ww-spinner {
    width: 1.25rem;
    height: 1.25rem;
    animation: ww-spin 1s linear infinite;
}

.ww-spinner-circle {
    stroke: currentColor;
    stroke-linecap: round;
    stroke-dasharray: 60, 200;
    stroke-dashoffset: 0;
}

@keyframes ww-spin {
    100% {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Messages
   ========================================================================== */

.ww-login-message {
    display: none;
    padding: 1rem;
    margin-bottom: 1.25rem;
    border-radius: 4px;
    font-size: 0.9375rem;
}

.ww-login-message p {
    margin: 0;
}

.ww-message-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.ww-message-success {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

/* ==========================================================================
   Honeypot (Hidden from users)
   ========================================================================== */

.ww-hp-wrap {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

/* ==========================================================================
   Captcha
   ========================================================================== */

.ww-captcha-container {
    margin-bottom: 1rem;
}

.ww-recaptcha-branding {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #666;
}

.ww-recaptcha-branding a {
    color: #0073aa;
    text-decoration: none;
}

.ww-recaptcha-branding a:hover {
    text-decoration: underline;
}

/* Turnstile widget */
.cf-turnstile {
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   Logged In State
   ========================================================================== */

.ww-login-logged-in {
    text-align: center;
    padding: 2rem;
    padding-bottom: 0;
}

.ww-login-logged-in p {
    margin-bottom: 1rem;
}

.ww-login-logged-in a {
    /* color: #0073aa; */
    text-decoration: none;
}

.ww-login-logged-in a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 480px) {
    .ww-login-wrapper {
        padding: 1rem;
        padding-bottom: 0;
    }
    
    .ww-form-control {
        padding: 0.625rem 0.875rem;
    }
}

/* ==========================================================================
   Password Reset Forms
   ========================================================================== */

.ww-form-description {
    margin-bottom: 1.25rem;
    color: #555;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.ww-form-row-center {
    justify-content: center;
}

.ww-back-to-login-link {
    font-size: 15px;
    color: #1A22B4;
    text-decoration: none;
}

.ww-back-to-login-link:hover {
    text-decoration: underline;
}

.ww-reset-login-link {
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 15px;
}

.ww-reset-login-link a {
    color: #1A22B4;
    text-decoration: none;
}

.ww-reset-login-link a:hover {
    text-decoration: underline;
}

/* Fields wrapper for slide-up animation */
.ww-form-fields-wrap {
    overflow: hidden;
}

/* ==========================================================================
   Password Strength Meter
   ========================================================================== */

.ww-password-strength-meter {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ww-strength-bar-bg {
    flex: 1;
    height: 4px;
    background-color: #e5e5e5;
    border-radius: 2px;
    overflow: hidden;
}

.ww-strength-bar {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.ww-strength-weak {
    background-color: #dc3545;
}

.ww-strength-fair {
    background-color: #ffc107;
}

.ww-strength-good {
    background-color: #28a745;
}

.ww-strength-strong {
    background-color: #0d6efd;
}

.ww-strength-text {
    font-size: 0.75rem;
    color: #666;
    min-width: 3rem;
}

/* ==========================================================================
   Dark Mode Support
   ========================================================================== */

/*
@media (prefers-color-scheme: dark) {
    .ww-form-group label {
        color: #e5e5e5;
    }
    
    .ww-form-control {
        color: #e5e5e5;
        background-color: #1a1a1a;
        border-color: #404040;
    }
    
    .ww-form-control:focus {
        border-color: #3b82f6;
        box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
    }
    
    .ww-message-error {
        background-color: #450a0a;
        border-color: #991b1b;
        color: #fca5a5;
    }
    
    .ww-message-success {
        background-color: #052e16;
        border-color: #166534;
        color: #86efac;
    }
    
    .ww-recaptcha-branding {
        color: #999;
    }

    .ww-form-description {
        color: #bbb;
    }

    .ww-strength-bar-bg {
        background-color: #333;
    }

    .ww-strength-text {
        color: #999;
    }
}
*/

/* ==========================================================================
   Other Stuff
   ========================================================================== */

/* Google Rec Text */
.ww-captcha-container:has(.ww-recaptcha-branding) {
    display: none;
}

button#ww-lost-password-submit {
    width: 100%
}

button#ww-reset-password-submit {
    width: 100%;
}