/* Modern Form Styles for Sewickley Academy Password Reset System */
/* Version: 2.0 - Sewickley Academy Branded */
/* Author: Refactored to match Sewickley Academy design language */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #333;
}

.modern-form-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 48px;
    width: 100%;
    max-width: 480px;
    position: relative;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.modern-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #1a365d;
}

.modern-form-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo-container {
    margin-bottom: 20px;
}

.logo-container a {
    display: inline-block;
    text-decoration: none;
}

.logo {
    max-width: 280px;
    width: 100%;
    height: auto;
    border: none;
    display: block;
}

.modern-form-header h1 {
    color: #1a365d;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.modern-form-header .subtitle {
    color: #6c757d;
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 0;
}

.modern-form-username-hint {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 32px;
    color: #1565c0;
    font-size: 14px;
    text-align: center;
    font-weight: 500;
}

.modern-form-group {
    margin-bottom: 24px;
}

.modern-form-group:first-of-type {
    margin-top: 8px;
}

.modern-form-group label {
    display: block;
    color: #1a365d;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    letter-spacing: 0.25px;
}

.modern-form-group input[type="text"],
.modern-form-group input[type="email"],
.modern-form-group input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #333;
    font-family: inherit;
}

.modern-form-group input[type="text"]:focus,
.modern-form-group input[type="email"]:focus,
.modern-form-group input[type="password"]:focus {
    outline: none;
    border-color: #1a365d;
    background: white;
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

/* Invalid state for ASP.NET validation */
.modern-form-group input[type="text"].validation-error,
.modern-form-group input[type="email"].validation-error,
.modern-form-group input[type="password"].validation-error {
    border-color: #dc2626 !important;
    background: #fef2f2 !important;
}

.modern-form-group input[type="text"].validation-error:focus,
.modern-form-group input[type="email"].validation-error:focus,
.modern-form-group input[type="password"].validation-error:focus {
    border-color: #dc2626 !important;
    background: white !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

/* Removed :has() selector approach to avoid conflicts */

/* Also keep the :invalid pseudo-class for modern browsers */
.modern-form-group input[type="text"]:invalid,
.modern-form-group input[type="email"]:invalid,
.modern-form-group input[type="password"]:invalid {
    border-color: #dc2626;
    background: #fef2f2;
}

.modern-form-group input[type="text"]:invalid:focus,
.modern-form-group input[type="email"]:invalid:focus,
.modern-form-group input[type="password"]:invalid:focus {
    border-color: #dc2626;
    background: white;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.modern-form-divider {
    height: 1px;
    background: #e9ecef;
    margin: 32px 0;
    border: none;
}

.modern-form-password-requirements {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 24px;
    margin: 32px 0;
    border-left: 4px solid #1a365d;
}

.modern-form-password-requirements h3 {
    color: #1a365d;
    font-size: 16px;
    margin-bottom: 16px;
    font-weight: 700;
    letter-spacing: 0.25px;
}

.modern-form-password-requirements ul {
    list-style: none;
    padding: 0;
}

.modern-form-password-requirements li {
    color: #495057;
    margin-bottom: 10px;
    padding-left: 24px;
    position: relative;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 400;
}

.modern-form-password-requirements li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #1a365d;
    font-weight: 700;
    font-size: 16px;
}

.modern-form-password-requirements ul ul {
    margin-top: 12px;
    margin-left: 24px;
}

.modern-form-password-requirements ul ul li::before {
    content: '•';
    color: #6c757d;
    font-weight: 600;
}

.modern-form-submit-btn {
    width: 100%;
    background: #1a365d;
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none;
    letter-spacing: 0.25px;
    font-family: inherit;
}

.modern-form-submit-btn:hover {
    background: #2c5282;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.25);
}

.modern-form-submit-btn:active {
    transform: translateY(0);
    background: #153e75;
}

.modern-form-submit-btn:disabled {
    background: #6c757d;
    color: #adb5bd;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.modern-form-submit-btn:disabled:hover {
    background: #6c757d;
    transform: none;
    box-shadow: none;
}

.modern-form-error-message {
    background: #fef2f2;
    color: #dc2626;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 48px;
    border-left: 4px solid #dc2626;
    font-size: 14px;
    font-weight: 500;
    margin-top: 0;
    clear: both;
    display: block;
}

.modern-form-error-message:empty {
    display: none;
    margin-bottom: 0;
    margin-top: 0;
}

.modern-form-success-message {
    background: #f0fdf4;
    color: #166534;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 40px;
    border-left: 4px solid #22c55e;
    font-size: 14px;
    font-weight: 500;
    margin-top: 0;
}

.modern-form-field-error {
    color: #dc2626;
    font-size: 12px;
    margin-top: 6px;
    display: block;
    font-weight: 500;
}

@media (max-width: 600px) {
    .modern-form-container {
        padding: 32px 24px;
        margin: 16px;
    }
    
    .modern-form-header h1 {
        font-size: 28px;
    }
    
    .modern-form-group input[type="text"],
    .modern-form-group input[type="email"],
    .modern-form-group input[type="password"] {
        padding: 12px 14px;
    }
}

.modern-form-validation-summary {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
    font-weight: 500;
}

/* Parent-specific styles */
.modern-form-instruction {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 32px;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
}

.modern-form-instruction p {
    margin: 0 0 12px 0;
}

.modern-form-instruction p:last-child {
    margin-bottom: 0;
}

.modern-form-instruction ul {
    margin: 12px 0 0 0;
    padding-left: 20px;
}

.modern-form-instruction li {
    margin-bottom: 8px;
    color: #64748b;
}

.modern-form-divider-text {
    text-align: center;
    margin: 24px 0;
    position: relative;
}

.modern-form-divider-text::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
}

.modern-form-divider-text span {
    background: #ffffff;
    color: #64748b;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.success-icon {
    font-size: 48px;
    margin-bottom: 16px;
    text-align: center;
}

.modern-form-success-message h2 {
    color: #166534;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px 0;
    text-align: center;
}

.modern-form-success-message .small-text {
    font-size: 14px;
    color: #15803d;
    margin-top: 8px;
}

.modern-form-secondary-btn {
    background: #f8fafc !important;
    color: #475569 !important;
    border: 2px solid #e2e8f0 !important;
}

.modern-form-secondary-btn:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    transform: translateY(-1px);
}

.modern-form-login-section {
    text-align: center;
    margin: 32px 0;
}

.login-logo-container {
    margin-bottom: 20px;
}

.login-logo {
    max-height: 60px;
    width: auto;
}

.modern-form-login-btn {
    display: inline-block;
    text-decoration: none !important;
    background: #dc2626 !important;
    color: white !important;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    padding: 14px 32px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modern-form-login-btn:hover {
    background: #b91c1c !important;
    color: white !important;
    text-decoration: none !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}
