/* Base Styles for DMARC Analyzer */

/* Chart container fixes */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    overflow: hidden;
}

.chart-container canvas {
    max-height: 300px !important;
    width: 100% !important;
}

/* Prevent chart resizing on scroll */
.bg-white .chart-container {
    min-height: 300px;
    max-height: 300px;
}

/* Tab content visibility */
.tab-content {
    display: none;
}

.tab-content:not(.hidden) {
    display: block;
}

.report-content.hidden {
    display: none;
}

/* Component base classes using CSS variables */
.gradient-bg {
    background: var(--gradient-primary);
}

.gradient-card {
    background: var(--gradient-card);
    box-shadow: var(--shadow-card);
    border: var(--border-card);
    transition: all 0.3s ease;
}

.gradient-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
}

.card-shadow {
    box-shadow: var(--shadow-default);
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-modern-dark {
    background: var(--gradient-dark);
}

/* Tab styling */
.tab-btn {
    @apply flex items-center px-4 py-2.5 text-sm font-medium rounded-xl transition-all duration-300 relative;
    color: var(--text-tab-inactive);
    background-color: var(--bg-tab-inactive);
    border: 1px solid transparent;
    min-width: fit-content;
}

.tab-btn:hover {
    color: var(--text-tab-hover);
    background-color: var(--bg-tab-hover);
    border-color: var(--border-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.tab-btn.active {
    background: var(--gradient-tab-active);
    color: var(--text-tab-active);
    box-shadow: var(--shadow-tab-active);
    border-color: var(--border-active);
    transform: translateY(-1px);
}

.tab-btn.active::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--color-primary);
    border-radius: 1px;
}

.report-type-btn.active {
    @apply border-2 font-medium;
    border-color: var(--border-active);
    color: var(--text-active);
}

/* Typography */
.text-modern-primary {
    color: var(--text-primary);
}

/* Theme switcher styles */
.theme-switcher {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-option {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-default);
    background: var(--bg-input);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 32px;
}

.theme-option:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.theme-option.active {
    background: var(--bg-active);
    color: var(--text-active);
    border-color: var(--border-active);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

/* Enhanced navigation styling */
nav {
    position: relative;
    z-index: 50;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

nav .max-w-7xl {
    position: relative;
}

/* Filter group styling */
.filter-group {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 8px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.filter-group:hover {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Quick action buttons */
.quick-action-btn {
    @apply flex items-center space-x-1 px-3 py-1.5 text-sm font-medium transition-all duration-200 rounded-lg;
    color: var(--text-secondary);
}

.quick-action-btn:hover {
    transform: translateY(-1px);
    color: var(--color-primary);
}

.quick-action-btn:active {
    transform: translateY(0);
}

/* Animation for refresh button */
.quick-action-btn.refreshing i {
    animation: spin 1s linear infinite;
}

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

/* Status and risk badge colors using CSS variables */
.status-success {
    background-color: var(--bg-success);
    color: var(--text-success);
}

.status-warning {
    background-color: var(--bg-warning);
    color: var(--text-warning);
}

.status-error {
    background-color: var(--bg-error);
    color: var(--text-error);
}

.risk-low {
    background-color: var(--bg-risk-low);
    color: var(--text-risk-low);
}

.risk-medium {
    background-color: var(--bg-risk-medium);
    color: var(--text-risk-medium);
}

.risk-high {
    background-color: var(--bg-risk-high);
    color: var(--text-risk-high);
}

/* Priority badge colors */
.priority-low {
    background-color: var(--bg-priority-low);
    color: var(--text-priority-low);
}

.priority-medium {
    background-color: var(--bg-priority-medium);
    color: var(--text-priority-medium);
}

.priority-high {
    background-color: var(--bg-priority-high);
    color: var(--text-priority-high);
}

/* Chart colors (will be updated via JS for theme changes) */
:root {
    --chart-primary: #3b82f6;
    --chart-secondary: #ef4444;
    --chart-success: #10b981;
    --chart-warning: #f59e0b;
    --chart-error: #ef4444;
    --chart-grid: rgba(148, 163, 184, 0.1);
    --chart-text: #64748b;
}