/* BizPlan Authentication Enhanced Styles */

/* ================== CSS VARIABLES ================== */
:root {
    --primary-color: #2271b1;
    --primary-hover: #135e96;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --border-color: #c3c4c7;
    --border-radius: 8px;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ================== MAIN WRAPPER ================== */
.bizplan-auth-wrapper {
    max-width: 450px;
    margin: 50px auto;
    padding: 40px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-family: var(--font-family);
    box-shadow: var(--shadow);
    position: relative;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bizplan-auth-wrapper h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 32px;
    font-weight: 700;
    color: #1d2327;
    line-height: 1.2;
}

/* ================== FORM ELEMENTS ================== */
.bizplan-auth-form {
    width: 100%;
}

.bizplan-auth-form p {
    margin-bottom: 20px;
    position: relative;
}

.bizplan-auth-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #1d2327;
    font-size: 15px;
}

.bizplan-auth-form input[type="text"],
.bizplan-auth-form input[type="email"],
.bizplan-auth-form input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    font-family: inherit;
    transition: var(--transition);
    box-sizing: border-box;
    background: #fff;
    color: #2c3338;
}

.bizplan-auth-form input::placeholder {
    color: #8c8f94;
    opacity: 1;
}

.bizplan-auth-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.bizplan-auth-form input.error {
    border-color: var(--error-color);
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.field-error {
    color: var(--error-color);
    font-size: 13px;
    margin-top: 6px;
    font-weight: 500;
    display: block;
}

/* ================== BUTTONS ================== */
.bizplan-btn {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    text-align: center;
    font-family: inherit;
    margin-bottom: 20px;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: #fff;
}

.bizplan-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #0f4f7c 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.bizplan-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-text {
    display: inline-block;
}

.btn-loading {
    display: none;
    align-items: center;
    gap: 8px;
}

/* ================== SPINNER ANIMATION ================== */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ================== PASSWORD STRENGTH INDICATOR ================== */
.password-strength {
    margin-top: 10px;
    padding: 10px 0;
}

.strength-meter {
    width: 100%;
    height: 8px;
    background: #e1e5e9;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-bar {
    height: 100%;
    transition: var(--transition);
    border-radius: 4px;
}

.strength-text {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.strength-requirements {
    font-size: 12px;
    color: #646970;
    line-height: 1.4;
}

/* Legacy password strength */
#password-strength {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 500;
    padding: 4px 0;
}

/* ================== PASSWORD TOGGLE BUTTON ================== */
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    color: #8c8f94;
    transition: var(--transition);
    z-index: 10;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.bizplan-auth-form p {
    position: relative;
}

.bizplan-auth-form input[type="password"] + .password-toggle {
    top: 38px;
}

/* ================== ALERT MESSAGES ================== */
.bizplan-alert {
    padding: 14px 18px;
    border-radius: var(--border-radius);
    margin: 20px 0;
    font-size: 14px;
    font-weight: 500;
    border-left: 4px solid;
    display: none;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1.5;
}

.bizplan-alert:hover {
    opacity: 0.9;
}

.bizplan-alert-success {
    background: #d1edff;
    color: #0c4a6e;
    border-color: var(--success-color);
}

.bizplan-alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-color: var(--error-color);
}

.bizplan-alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-color: var(--warning-color);
}

/* Legacy message styles */
.bizplan-message {
    margin-top: 15px;
    font-size: 14px;
    font-weight: 500;
    padding: 0;
    border-radius: var(--border-radius);
}

.bizplan-message.bizplan-alert {
    margin-top: 15px;
    padding: 12px 16px;
}

/* ================== LINKS ================== */
.bizplan-links {
    text-align: center;
    margin-top: 24px;
    font-size: 15px;
    color: #646970;
    line-height: 1.6;
}

.bizplan-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.bizplan-links a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* ================== RECAPTCHA ================== */
.g-recaptcha {
    margin: 24px 0;
    display: flex;
    justify-content: center;
}

/* ================== RESPONSIVE DESIGN ================== */
@media (max-width: 480px) {
    .bizplan-auth-wrapper {
        margin: 20px;
        padding: 30px 24px;
    }
    
    .bizplan-auth-wrapper h2 {
        font-size: 28px;
    }
    
    .bizplan-auth-form input {
        padding: 12px 14px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .bizplan-btn {
        padding: 14px 20px;
        min-height: 52px;
    }
}

@media (max-width: 360px) {
    .bizplan-auth-wrapper {
        margin: 10px;
        padding: 24px 20px;
    }
    
    .bizplan-auth-wrapper h2 {
        font-size: 24px;
        margin-bottom: 24px;
    }
}

/* ================== FOCUS STATES ================== */
.bizplan-auth-form p.focused label {
    color: var(--primary-color);
}

.bizplan-btn:focus,
.bizplan-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

input:focus,
input:focus-visible {
    outline: none;
}

/* ================== ENHANCED UX FEATURES ================== */
.bizplan-auth-form p.has-value input {
    border-color: var(--success-color);
}

.bizplan-auth-form p.focused input {
    border-color: var(--primary-color);
}

/* ================== LOADING STATES ================== */
.bizplan-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

