/**
 * Unified Login Page Styles
 * Beautiful, modern login interface for mentors and students
 *
 * @package EduBooking_Pro
 * @version 2.3.0
 */

/* ==========================================================================
   Login Page Container
   ========================================================================== */

.ebp-login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ebp-login-wrapper {
    width: 100%;
    max-width: 480px;
    padding: 20px;
    animation: fadeInUp 0.6s ease;
}

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

.ebp-login-container {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* ==========================================================================
   Login Header
   ========================================================================== */

.ebp-login-header {
    text-align: center;
    padding: 40px 40px 30px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-bottom: 2px solid #f1f5f9;
}

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

.ebp-logo-img {
    max-width: 180px;
    height: auto;
}

.ebp-site-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ebp-login-title {
    color: #1e293b;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.ebp-login-subtitle {
    color: #64748b;
    font-size: 15px;
    margin: 0;
}

/* ==========================================================================
   User Type Toggle
   ========================================================================== */

.ebp-user-type-toggle {
    display: flex;
    gap: 12px;
    padding: 24px 40px;
    background: #f8fafc;
}

.ebp-type-btn {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    color: #64748b;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ebp-type-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.ebp-type-btn:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.ebp-type-btn.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* ==========================================================================
   Login Form
   ========================================================================== */

.ebp-login-form {
    padding: 30px 40px 40px;
}

.ebp-form-group {
    margin-bottom: 20px;
}

.ebp-form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.ebp-form-group label .dashicons {
    color: #667eea;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.ebp-form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    color: #1e293b;
    transition: all 0.3s ease;
    font-family: inherit;
}

.ebp-form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.ebp-form-control::placeholder {
    color: #94a3b8;
}

/* Password Field */
.ebp-password-wrapper {
    position: relative;
}

.ebp-password-wrapper input {
    padding-right: 48px;
}

.ebp-toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.ebp-toggle-password:hover {
    color: #667eea;
}

.ebp-toggle-password .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Remember Me & Forgot Password */
.ebp-form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.ebp-remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.ebp-remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.ebp-remember-me span {
    color: #475569;
    font-size: 14px;
}

.ebp-forgot-password {
    color: #667eea;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.ebp-forgot-password:hover {
    color: #5568d3;
    text-decoration: underline;
}

/* ==========================================================================
   Submit Button
   ========================================================================== */

.ebp-login-btn {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    position: relative;
}

.ebp-login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.ebp-login-btn:active:not(:disabled) {
    transform: translateY(0);
}

.ebp-login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.ebp-btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ebp-spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Alert Messages
   ========================================================================== */

.ebp-login-alerts {
    padding: 0 40px;
    margin-bottom: 20px;
}

.ebp-alert {
    padding: 14px 18px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    line-height: 1.5;
    animation: slideDown 0.3s ease;
}

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

.ebp-alert .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.ebp-alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.ebp-alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.ebp-alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

/* ==========================================================================
   Social Login (Optional)
   ========================================================================== */

.ebp-social-login {
    padding: 0 40px 30px;
}

.ebp-divider {
    position: relative;
    text-align: center;
    margin-bottom: 20px;
}

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

.ebp-divider span {
    position: relative;
    background: #ffffff;
    padding: 0 16px;
    color: #64748b;
    font-size: 14px;
}

.ebp-social-buttons {
    display: flex;
    gap: 12px;
}

.ebp-social-btn {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.ebp-social-btn:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.ebp-social-btn img {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   Register Links
   ========================================================================== */

.ebp-register-links {
    padding: 30px 40px 40px;
    background: #f8fafc;
    border-top: 2px solid #f1f5f9;
    text-align: center;
}

.ebp-register-text {
    color: #64748b;
    font-size: 15px;
    margin: 0 0 16px 0;
}

.ebp-register-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ebp-register-btn {
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ebp-register-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.ebp-register-btn:hover {
    border-color: #667eea;
    background: #f8fafc;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.ebp-register-btn.student:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.ebp-register-btn.mentor:hover {
    border-color: #10b981;
    color: #10b981;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .ebp-login-wrapper {
        max-width: 100%;
        padding: 16px;
    }

    .ebp-login-container {
        border-radius: 16px;
    }

    .ebp-login-header {
        padding: 30px 24px 20px;
    }

    .ebp-login-title {
        font-size: 24px;
    }

    .ebp-login-subtitle {
        font-size: 14px;
    }

    .ebp-user-type-toggle {
        padding: 20px 24px;
    }

    .ebp-type-btn {
        font-size: 14px;
        padding: 12px 16px;
    }

    .ebp-login-form,
    .ebp-login-alerts,
    .ebp-social-login,
    .ebp-register-links {
        padding-left: 24px;
        padding-right: 24px;
    }

    .ebp-form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .ebp-login-wrapper {
        padding: 12px;
    }

    .ebp-login-container {
        border-radius: 12px;
    }

    .ebp-login-header {
        padding: 24px 20px 16px;
    }

    .ebp-site-title {
        font-size: 28px;
    }

    .ebp-login-title {
        font-size: 22px;
    }

    .ebp-logo-img {
        max-width: 140px;
    }

    .ebp-user-type-toggle {
        flex-direction: column;
        padding: 16px 20px;
        gap: 8px;
    }

    .ebp-type-btn {
        width: 100%;
    }

    .ebp-login-form,
    .ebp-login-alerts,
    .ebp-social-login,
    .ebp-register-links {
        padding-left: 20px;
        padding-right: 20px;
    }

    .ebp-form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .ebp-login-btn {
        font-size: 15px;
        padding: 14px 20px;
    }
}

/* ==========================================================================
   Dark Mode Support (Optional)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .ebp-login-page {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    }

    .ebp-login-container {
        background: #1e293b;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    }

    .ebp-login-header {
        background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
        border-bottom-color: #475569;
    }

    .ebp-login-title {
        color: #f1f5f9;
    }

    .ebp-login-subtitle {
        color: #cbd5e1;
    }

    .ebp-user-type-toggle {
        background: #334155;
    }

    .ebp-type-btn {
        background: #1e293b;
        border-color: #475569;
        color: #cbd5e1;
    }

    .ebp-type-btn:hover {
        background: #334155;
        border-color: #64748b;
    }

    .ebp-form-group label {
        color: #f1f5f9;
    }

    .ebp-form-control {
        background: #334155;
        border-color: #475569;
        color: #f1f5f9;
    }

    .ebp-form-control::placeholder {
        color: #64748b;
    }

    .ebp-remember-me span {
        color: #cbd5e1;
    }

    .ebp-register-links {
        background: #334155;
        border-top-color: #475569;
    }

    .ebp-register-text {
        color: #cbd5e1;
    }

    .ebp-register-btn {
        background: #1e293b;
        border-color: #475569;
        color: #cbd5e1;
    }

    .ebp-register-btn:hover {
        background: #334155;
    }

    .ebp-divider::before {
        background: #475569;
    }

    .ebp-divider span {
        background: #1e293b;
    }

    .ebp-social-btn {
        background: #1e293b;
        border-color: #475569;
        color: #cbd5e1;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .ebp-login-page {
        background: #ffffff !important;
    }

    .ebp-user-type-toggle,
    .ebp-social-login,
    .ebp-register-links {
        display: none !important;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.ebp-form-control:focus,
.ebp-type-btn:focus,
.ebp-login-btn:focus,
.ebp-register-btn:focus,
.ebp-toggle-password:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Screen reader only text */
.ebp-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
