/**
 * HermesAuth SSO - Custom Styles
 * Bootstrap 5 compatible with dark/light mode support
 */

/* ========================================
   Body & Layout
   ======================================== */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ========================================
   Navbar Customization
   ======================================== */
.navbar.sticky-top {
    background-color: var(--bs-body-bg) !important;
}

.navbar-brand {
    font-size: 1.25rem;
}

#themeToggle {
    font-size: 1.1rem;
    padding: 0.5rem;
}

#themeToggle:hover {
    background-color: rgba(var(--bs-emphasis-color-rgb), 0.1);
    border-radius: 50%;
}

/* ========================================
   Cards
   ======================================== */

/* ========================================
   Login Form
   ======================================== */
.login-card {
    max-width: 450px;
    margin: 0 auto;
}

.login-card .card-header {
    background: linear-gradient(135deg, var(--bs-primary) 0%, #0056b3 100%);
    color: white;
    text-align: center;
    padding: 1.5rem;
}

.login-card .card-header h4 {
    margin: 0;
    font-weight: 600;
}

.login-card .form-floating {
    margin-bottom: 1rem;
}

/* ========================================
   SSO Form (Legacy Support)
   ======================================== */
.sso-form .form-control {
    padding: 0.75rem 1rem;
}

.sso-form .btn-primary {
    padding: 0.75rem 2rem;
    font-weight: 500;
}

/* ========================================
   Messages / Alerts
   ======================================== */
#messages {
    margin-bottom: 1rem;
}

#messages .message {
    padding: 0.75rem 1.25rem;
    margin-bottom: 0.5rem;
    border-radius: 0.375rem;
}

#messages .message.warn {
    background-color: var(--bs-danger);
    color: white;
}

#messages .message.success {
    background-color: var(--bs-success);
    color: white;
}

/* ========================================
   User Info Display
   ======================================== */
.user-info-card {
    max-width: 500px;
    margin: 0 auto;
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

/* ========================================
   Continue/Relog Section
   ======================================== */
.continue-card {
    max-width: 450px;
    margin: 0 auto;
}

.continue-card .user-email {
    font-size: 1.1rem;
    color: var(--bs-secondary);
}

/* ========================================
   Login Methods Grid
   ======================================== */
.login-methods .card {
    height: 100%;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.login-methods .icon-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

/* ========================================
   Dark Mode Adjustments
   ======================================== */
[data-bs-theme="dark"] .card {
    --bs-card-bg: var(--bs-body-bg);
}

[data-bs-theme="dark"] .bg-body-tertiary:not(.navbar) {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

[data-bs-theme="dark"] .navbar.sticky-top {
    background-color: #212529 !important;
}

[data-bs-theme="dark"] .login-card .card-header {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
}

[data-bs-theme="dark"] .login-methods .card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .login-card {
        margin: 0 1rem;
    }

    .display-5 {
        font-size: 1.75rem;
    }
}

/* ========================================
   Animation
   ======================================== */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Legacy SSO Classes (for compatibility)
   ======================================== */
.sso .grid-centered {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.sso #id-login-area {
    background: var(--bs-body-bg);
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sso .inputs {
    margin: 1.5rem 0;
}

.sso .button-wrap {
    margin-top: 1.5rem;
}

.sso .d-none {
    display: none !important;
}