/* ========================================
   EarlyBird Registration & Login Styles
   Brand colors: Navy #1B2A4A, Green #1B5E3B
   ======================================== */

/* Body & Container */
.eb-auth-page {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eb-auth-container {
    width: 100%;
    max-width: 520px;
    padding: 24px;
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.eb-auth-box {
    background: white;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    padding: 44px;
    min-height: 620px;
    display: flex;
    flex-direction: column;
}

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

/* Logo Section */
.eb-auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.eb-auth-logo h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1B2A4A;
    margin: 0 0 10px 0;
    letter-spacing: -0.5px;
}

.eb-auth-logo p {
    font-size: 15px;
    color: #6b7280;
    margin: 0;
}

/* Toggle Button */
.eb-auth-toggle {
    display: flex;
    gap: 6px;
    margin-bottom: 28px;
    background: #f3f4f6;
    padding: 5px;
    border-radius: 12px;
}

.eb-toggle-btn {
    flex: 1;
    padding: 12px 18px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.eb-toggle-btn.active {
    background: white;
    color: #1B2A4A;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.eb-toggle-btn:hover:not(.active) {
    color: #374151;
    background: rgba(255, 255, 255, 0.5);
}

/* SSO Buttons */
.eb-sso-buttons {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 28px;
}

.eb-sso-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 18px;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.eb-sso-btn:hover {
    background: #f8fafc;
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.eb-sso-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.eb-sso-icon {
    font-size: 18px;
    font-weight: 600;
}

/* Divider */
.eb-divider {
    display: flex;
    align-items: center;
    margin: 28px 0;
    color: #9ca3af;
    font-size: 13px;
}

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

.eb-divider span {
    padding: 0 12px;
}

/* Section Divider (for form sections) */
.eb-section-divider {
    display: flex;
    align-items: center;
    margin: 24px 0 16px 0;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.eb-section-divider span {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Form Styles */
.eb-auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}

.eb-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.eb-form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.eb-field-note {
    font-size: 12px;
    color: #6b7280;
    margin-top: -2px;
    display: block;
}

.eb-input {
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    box-sizing: border-box;
}

/* Select/Dropdown specific styles */
select.eb-input {
    padding: 10px 12px;
    padding-right: 32px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
}

.eb-input:focus {
    outline: none;
    border-color: #1B5E3B;
    box-shadow: 0 0 0 3px rgba(27, 94, 59, 0.12);
    transform: translateY(-1px);
}

.eb-input:hover:not(:focus) {
    border-color: #9ca3af;
}

.eb-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: center;
}

/* Checkbox */
.eb-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    transition: color 0.2s ease;
}

.eb-checkbox:hover {
    color: #1f2937;
}

.eb-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #1B5E3B;
}

/* Role Selector */
.eb-role-selector {
    display: flex;
    gap: 12px;
}

.eb-role-option {
    flex: 1;
    cursor: pointer;
}

.eb-role-option input[type="radio"] {
    display: none;
}

.eb-role-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.eb-role-card:hover {
    border-color: #bbf7d0;
    background: #f8faf9;
    transform: translateY(-2px);
}

.eb-role-option input[type="radio"]:checked + .eb-role-card {
    border-color: #1B5E3B;
    background: #f0fdf4;
    box-shadow: 0 4px 12px rgba(27, 94, 59, 0.15);
    transform: translateY(-2px);
}

.eb-role-card strong {
    font-size: 14px;
    color: #111827;
    display: block;
    margin-bottom: 4px;
    transition: color 0.25s ease;
}

.eb-role-option input[type="radio"]:checked + .eb-role-card strong {
    color: #166534;
}

.eb-role-card small {
    font-size: 12px;
    color: #6b7280;
    transition: color 0.25s ease;
}

/* Account Type Selector (for Students) */
.eb-account-type-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.eb-account-type-option {
    cursor: pointer;
}

.eb-account-type-option input[type="radio"] {
    display: none;
}

.eb-account-type-card {
    display: block;
    padding: 16px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.eb-account-type-card:hover {
    border-color: #bbf7d0;
    background: #f8faf9;
}

.eb-account-type-card.selected {
    border-color: #1B5E3B;
    background: #f0fdf4;
    box-shadow: 0 2px 8px rgba(27, 94, 59, 0.12);
}

.eb-account-type-card strong {
    font-size: 14px;
    color: #111827;
    display: block;
    margin-bottom: 4px;
    transition: color 0.25s ease;
}

.eb-account-type-card.selected strong {
    color: #166534;
}

.eb-account-type-card small {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

/* Email Field List (Dynamic) */
.eb-email-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.eb-email-field-group {
    display: flex;
    gap: 10px;
    align-items: center;
    animation: slideInFade 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.eb-email-field-group .eb-input {
    flex: 1;
}

.eb-btn-remove-email {
    padding: 10px 14px;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.eb-btn-remove-email:hover {
    background: #fecaca;
    transform: scale(1.02);
}

.eb-btn-add-email {
    margin-top: 10px;
    padding: 10px 18px;
    background: white;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.eb-btn-add-email:hover {
    background: #f0fdf4;
    border-color: #1B5E3B;
    border-style: solid;
    color: #1B5E3B;
}

/* Role-specific Fields */
.eb-role-fields {
    display: none;
    padding-top: 12px;
    opacity: 0;
    transform: translateY(-10px);
}

.eb-role-fields.active {
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: slideDownFade 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Animations */
@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFade {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Buttons */
.eb-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.eb-btn-primary {
    background: linear-gradient(135deg, #1B5E3B 0%, #155e30 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(27, 94, 59, 0.25);
}

.eb-btn-primary:hover {
    background: linear-gradient(135deg, #155e30 0%, #0f4a24 100%);
    box-shadow: 0 4px 16px rgba(27, 94, 59, 0.35);
    transform: translateY(-2px);
}

.eb-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(27, 94, 59, 0.25);
}

.eb-btn-full {
    width: 100%;
}

.eb-btn.loading {
    pointer-events: none;
}

.eb-btn.loading .eb-btn-content {
    opacity: 0;
}

.eb-btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.eb-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    box-sizing: border-box;
}

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

/* Required Field Marker */
.eb-required,
.eb-form-group label .eb-required,
label .eb-required {
    color: #dc2626 !important;
    font-weight: 700;
    margin-left: 2px;
    display: inline;
}

.required-marker {
    color: #dc2626 !important;
    font-weight: 700;
}

/* Links */
.eb-link {
    color: #1B5E3B;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.eb-link:hover {
    color: #155e30;
    text-decoration: underline;
}

.eb-link-small {
    color: #1B5E3B;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s ease;
}

.eb-link-small:hover {
    color: #155e30;
    text-decoration: underline;
}

/* Footer */
.eb-auth-footer {
    text-align: center;
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.eb-auth-footer p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* Message Box */
.eb-message {
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
    animation: slideDownFade 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.eb-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.eb-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

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

/* Responsive */
@media (max-width: 640px) {
    .eb-auth-box {
        padding: 32px 24px;
        border-radius: 12px;
        min-height: auto;
    }
    
    .eb-role-selector {
        flex-direction: column;
        gap: 10px;
    }
    
    .eb-form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .eb-auth-container {
        max-width: 100%;
        padding: 16px;
    }
    
    .eb-auth-logo h1 {
        font-size: 28px;
    }
    
    .eb-btn {
        padding: 14px 20px;
    }
}
