/* KGI Login Theme System - Dynamic Theming with CSS Variables */

/* Theme CSS Variables - Midnight Background with Original Colors */
:root {
    --theme-primary: #228B22;
    --theme-secondary: #D4AF37;
    --theme-accent: #90EE90;
    --theme-gold: #FFD700;
    --theme-background: linear-gradient(135deg, #232526 0%, #414345 100%);
    --theme-header: linear-gradient(135deg, #228B22 0%, #2E8B57 100%);
    --theme-button: #D4AF37;
    --theme-text: #1f2937;
    --theme-muted: #6b7280;
    --theme-card-bg: #ffffff;
    
    /* Override external CSS variables */
    --primary-color: var(--theme-primary);
    --primary-dark: var(--theme-secondary);
}

/* Theme overrides for card header */
.card-header {
    background: var(--theme-header) !important;
}

/* Theme overrides for buttons */
.btn-primary {
    background: var(--theme-primary); /*linear-gradient(135deg, var(--theme-button) 0%, var(--theme-primary) 100%) !important;*/
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-button) 100%) !important;
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3) !important;
}

.btn-success {
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-accent) 100%) !important;
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--theme-accent) 0%, var(--theme-primary) 100%) !important;
    box-shadow: 0 10px 25px rgba(34, 139, 34, 0.3) !important;
}

.btn-warning {
    background: linear-gradient(135deg, var(--theme-gold) 0%, var(--theme-button) 100%) !important;
    color: #1f2937 !important;
}

.btn-warning:hover {
    background: linear-gradient(135deg, var(--theme-button) 0%, var(--theme-gold) 100%) !important;
}

/* Login Page Specific Styles */
.step-container {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Header Styles */
.logo-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
}

.kgi-logo {
    width: 240px;
    height: auto;
    object-fit: contain;
}

.logo-subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.2;
}

/* App Info Styles */
.requesting-app-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: rgba(34, 139, 34, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(34, 139, 34, 0.1);
}

.app-logo {
    flex-shrink: 0;
}

.app-logo-img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px;
    border: 2px solid var(--theme-gold);
}

.app-details {
    flex-grow: 1;
    min-width: 0;
}

.app-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--theme-text);
    line-height: 1.2;
}

.app-subtitle {
    margin: 0.25rem 0 0 0;
    font-size: 0.85rem;
    color: var(--theme-muted);
    line-height: 1.3;
}

.login-separator {
    text-align: center;
    margin: 1rem 0;
    position: relative;
}

.login-separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--theme-gold), transparent);
}

.separator-text {
    background: var(--theme-card-bg);
    padding: 0 1rem;
    font-size: 0.85rem;
    color: var(--theme-muted);
    position: relative;
    font-weight: 500;
}

.info-icon {
    font-size: 3rem;
    color: var(--theme-primary);
    margin-bottom: 1rem;
}

.email-display {
    background: rgba(34, 139, 34, 0.05);
    border-radius: 8px;
    padding: 0.75rem;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--theme-muted);
    border: 1px solid rgba(34, 139, 34, 0.1);
}

.passkey-required {
    display: block;
}

.webauthn-fallback {
    display: none;
}

/* Show fallback when WebAuthn is not supported */
.no-webauthn .passkey-required {
    display: none !important;
}

.no-webauthn .webauthn-fallback {
    display: block !important;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .btn-lg {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .info-icon {
        font-size: 2.5rem;
    }
    
    .step-container {
        min-height: 250px;
    }
    
    /* Mobile adjustments */
    .kgi-logo {
        width: 200px;
    }
    
    .logo-subtitle {
        font-size: 0.85rem;
    }
    
    .requesting-app-info {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .app-logo-img {
        width: 48px;
        height: 48px;
    }
    
    .app-title {
        font-size: 1.1rem;
    }
    
    .app-subtitle {
        font-size: 0.8rem;
    }
}