/**
 * Theme Styles - Navy Professional Theme with Glassmorphism
 * Version: 3.0.0
 */

/* Navy Professional Theme Variables */
.theme-navy-professional {
    --primary-color: #1e3a5f;
    --secondary-color: #4a7ba7;
    --accent-color: #00d4ff;
    --glass-bg: rgba(30, 58, 95, 0.95);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* Dark Theme */
.theme-dark {
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-tertiary: #374151;
    --border-color: #374151;
}

/* Glassmorphism Effects */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.glass-light {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient Backgrounds */
.gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.gradient-accent {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
}

.gradient-mesh {
    background-color: #1e3a5f;
    background-image: 
        radial-gradient(at 47% 33%, hsl(210, 50%, 30%) 0, transparent 59%),
        radial-gradient(at 82% 65%, hsl(200, 60%, 25%) 0, transparent 55%);
}

/* Text Gradients */
.text-gradient {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Content Styles - Navy theme with targeted readability fixes */
.section-body {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    color: var(--text-light);
}

/* Headers with accent color */
.section-body h2,
.section-body h3,
.section-body h4,
.section-body h5 {
    color: var(--accent-color) !important;
}

/* Code blocks with dark background */
.section-body pre,
.code-block,
pre.code-block {
    background: #1f2937 !important;
    color: #f9fafb !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
}

/* Inline code with accent background */
.section-body code {
    background: rgba(0, 212, 255, 0.15);
    color: #00d4ff !important;
    padding: 2px 6px;
    border-radius: 3px;
}

/* Tables with semi-transparent backgrounds */
.section-body table,
.data-table,
.metrics-table,
.variation-table {
    background: rgba(255, 255, 255, 0.08);
    border-collapse: collapse;
}

.section-body th {
    background: rgba(0, 212, 255, 0.2);
    color: white !important;
    padding: 12px;
}

.section-body td {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Cards and feature boxes */
.feature-card,
.quality-card,
.source-card,
.method-card,
.step-card,
.phase-card,
.metric-card,
.issue-card,
.error-card,
.rule-card,
.practice-card {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.feature-card h3,
.quality-card h4,
.source-card h4,
.method-card h4,
.step-card h4,
.phase-card h4 {
    color: var(--accent-color) !important;
}

/* Info and warning boxes */
.info-box,
.tip-box {
    background: rgba(0, 212, 255, 0.15) !important;
    border-left: 4px solid #00d4ff;
}

.warning-box {
    background: rgba(245, 158, 11, 0.15) !important;
    border-left: 4px solid #f59e0b;
}

.error-box,
.issue-item {
    background: rgba(239, 68, 68, 0.15) !important;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Validation rules and naming conventions */
.naming-convention,
.validation-rules,
.report-template,
.output-section {
    background: rgba(255, 255, 255, 0.08);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Checklists */
.checklist {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 6px;
}

.checklist label {
    color: rgba(255, 255, 255, 0.95) !important;
}

/* Process flow elements */
.process-flow,
.architecture-overview {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
}

/* Metric displays */
.metric {
    background: rgba(0, 212, 255, 0.2);
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
}

/* File structure displays */
.file-structure,
pre:not(.code-block) {
    background: rgba(30, 58, 95, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #00d4ff !important;
}

/* Card Styles */
.card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-lg);
    transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--text-xs);
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    text-transform: uppercase;
}

.badge-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.badge-secondary {
    background-color: var(--secondary-color);
    color: var(--text-light);
}

.badge-success {
    background-color: var(--success-color);
    color: var(--text-light);
}

.badge-warning {
    background-color: var(--warning-color);
    color: var(--text-light);
}

.badge-error {
    background-color: var(--error-color);
    color: var(--text-light);
}

/* Alert Styles */
.alert {
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    border-left: 4px solid;
    margin-bottom: var(--spacing-md);
}

.alert-info {
    background-color: rgba(59, 130, 246, 0.1);
    border-left-color: var(--info-color);
    color: var(--info-color);
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border-left-color: var(--success-color);
    color: var(--success-color);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border-left-color: var(--warning-color);
    color: var(--warning-color);
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    border-left-color: var(--error-color);
    color: var(--error-color);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    border-radius: 4px;
    transition: width var(--transition);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Toast Notifications */
.toast {
    min-width: 250px;
    padding: var(--spacing-md);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    color: var(--text-light);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateX(100%);
    transition: all var(--transition);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    border-left: 4px solid var(--success-color);
}

.toast-error {
    border-left: 4px solid var(--error-color);
}

.toast-warning {
    border-left: 4px solid var(--warning-color);
}

.toast-info {
    border-left: 4px solid var(--info-color);
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--bg-tertiary);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.spinner-lg {
    width: 60px;
    height: 60px;
    border-width: 6px;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-tertiary) 25%,
        var(--bg-secondary) 50%,
        var(--bg-tertiary) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--border-radius);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Tooltips */
.tooltip {
    position: relative;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--bg-dark);
    color: var(--text-light);
    font-size: var(--text-xs);
    white-space: nowrap;
    border-radius: var(--border-radius-sm);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
    z-index: var(--z-tooltip);
}

.tooltip:hover::before {
    opacity: 1;
}

/* Modal Backdrop */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: var(--z-modal-backdrop);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Hover Effects */
.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Focus Effects */
.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 123, 167, 0.3);
}

/* Responsive Theme Adjustments */
@media (max-width: 768px) {
    .glass {
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0a1929;
        --secondary-color: #1976d2;
        --accent-color: #00b4d8;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}