/* Theme Wrapper Components
 *
 * Generic theme-aware wrapper classes for consistent styling across light/dark modes
 * These classes use CSS custom properties defined in light-mode.css and dark-mode.css
 *
 * Usage: Apply these classes to elements that need consistent theming
 * Example: <div class="theme-card">...</div>
 *
 * All classes automatically adapt to light/dark mode via CSS variables
 */

/* ========================================
   CARD COMPONENTS
   ======================================== */

.theme-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    box-shadow: var(--shadow-md);
}

.theme-card-header {
    background-color: var(--bg-darker);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 1rem 1.25rem;
}

.theme-card-content {
    background-color: var(--card-bg);
    color: var(--text-color);
    padding: 1.25rem;
}

/* ========================================
   MODAL COMPONENTS
   ======================================== */

.theme-modal-card {
    background-color: var(--card-bg);
    color: var(--text-color);
}

.theme-modal-header {
    background-color: var(--bg-darker);
    border-bottom: 1px solid var(--border-color);
}

.theme-modal-body {
    background-color: var(--card-bg);
    color: var(--text-color);
}

.theme-modal-footer {
    background-color: var(--bg-darker);
    border-top: 1px solid var(--border-color);
}

/* ========================================
   CONTENT WRAPPERS
   ======================================== */

.theme-content {
    color: var(--text-color);
}

/* ========================================
   TABLE COMPONENTS
   ======================================== */

.theme-table {
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.theme-table th {
    background-color: var(--table-header-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.theme-table td {
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--table-border);
}

/* ========================================
   TYPOGRAPHY COMPONENTS
   ======================================== */

.theme-title {
    color: var(--text-color);
    font-weight: 600;
}

.theme-subtitle {
    color: var(--text-muted);
}

.theme-heading {
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.theme-subheading {
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* ========================================
   BUTTON COMPONENTS
   ======================================== */

.theme-button-secondary {
    background-color: var(--button-bg);
    color: var(--button-text);
    border: 1px solid var(--border-color);
}

.theme-button-secondary:hover {
    background-color: var(--bg-darker);
    border-color: var(--border-hover-color, var(--border-color));
}

/* ========================================
   NOTIFICATION COMPONENTS
   ======================================== */

.theme-notification-light {
    background-color: var(--bg-lighter);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.theme-notification-danger {
    background-color: rgba(var(--danger-color-rgb), 0.1);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.theme-notification-success {
    background-color: rgba(var(--success-color-rgb), 0.1);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.theme-notification-warning {
    background-color: rgba(var(--warning-color-rgb), 0.1);
    color: var(--warning-color);
    border: 1px solid var(--warning-color);
}

.theme-notification-info {
    background-color: rgba(var(--info-color-rgb), 0.1);
    color: var(--info-color);
    border: 1px solid var(--info-color);
}

/* ========================================
   DARK MODE ENHANCEMENTS
   ======================================== */

html.dark-mode .theme-card,
html.dark-mode .theme-modal-card,
html.dark-mode .theme-table {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

html.dark-mode .theme-notification-light {
    background-color: var(--bg-lighter);
}

html.dark-mode .theme-notification-danger {
    background-color: rgba(var(--danger-color-rgb), 0.15);
}

html.dark-mode .theme-notification-success {
    background-color: rgba(var(--success-color-rgb), 0.15);
}

html.dark-mode .theme-notification-warning {
    background-color: rgba(var(--warning-color-rgb), 0.15);
}

html.dark-mode .theme-notification-info {
    background-color: rgba(var(--info-color-rgb), 0.15);
}

/* ========================================
   HIGH CONTRAST MODE ENHANCEMENTS
   ======================================== */

html.high-contrast-mode .theme-card,
html.high-contrast-mode .theme-modal-card,
html.high-contrast-mode .theme-table {
    border: 2px solid var(--border-color);
    box-shadow: none;
}

html.high-contrast-mode .theme-card-header {
    border-bottom: 2px solid var(--border-color);
}

html.high-contrast-mode .theme-modal-header {
    border-bottom: 2px solid var(--border-color);
}

html.high-contrast-mode .theme-modal-footer {
    border-top: 2px solid var(--border-color);
}

html.high-contrast-mode .theme-button-secondary {
    border: 2px solid var(--border-color);
}

html.high-contrast-mode .theme-notification-light {
    background-color: var(--bg-lighter);
    border: 2px solid var(--border-color);
}

html.high-contrast-mode .theme-notification-danger {
    background-color: rgba(var(--danger-color-rgb), 0.2);
    border: 2px solid var(--danger-color);
}

html.high-contrast-mode .theme-notification-success {
    background-color: rgba(var(--success-color-rgb), 0.2);
    border: 2px solid var(--success-color);
}

html.high-contrast-mode .theme-notification-warning {
    background-color: rgba(var(--warning-color-rgb), 0.2);
    border: 2px solid var(--warning-color);
}

html.high-contrast-mode .theme-notification-info {
    background-color: rgba(var(--info-color-rgb), 0.2);
    border: 2px solid var(--info-color);
}
