/**
 * MUSICA THEME - CRITICAL FIXES
 * Fixes for theme color conflicts and consistency issues
 * Loaded after all other styles to override any conflicts
 */

/* ===================================
   THEME COLOR FIXES - LIGHT THEME
   =================================== */

/* Ensure body uses correct theme variables */
body[data-theme="light"] {
    background-color: #ffffff !important;
    color: #0a0a0a !important;
}

/* Header - Light Theme */
[data-theme="light"] .main-header {
    background-color: #ffffff !important;
    color: #0a0a0a !important;
}

[data-theme="light"] .header-top {
    background-color: #f8f8f8 !important;
}

[data-theme="light"] .header-date,
[data-theme="light"] .social-link {
    color: #4a4a4a !important;
}

[data-theme="light"] .logo h1,
[data-theme="light"] .logo h1 a {
    color: #0a0a0a !important;
}

[data-theme="light"] .tagline {
    color: #4a4a4a !important;
}

[data-theme="light"] .nav-link {
    color: #0a0a0a !important;
}

[data-theme="light"] .nav-link:hover {
    color: #ff141a !important;
}

[data-theme="light"] .search-btn,
[data-theme="light"] .theme-toggle {
    color: #0a0a0a !important;
}

/* Pre-Footer - Light Theme */
[data-theme="light"] .pre-footer {
    background-color: #f8f8f8 !important;
}

[data-theme="light"] .pre-footer-column {
    background-color: #ffffff !important;
    color: #0a0a0a !important;
}

[data-theme="light"] .column-title,
[data-theme="light"] .event-link,
[data-theme="light"] .news-item a {
    color: #0a0a0a !important;
}

[data-theme="light"] .event-link:hover,
[data-theme="light"] .news-item a:hover {
    color: #ff141a !important;
}

/* Footer - Light Theme (footer should be dark on light theme) */
[data-theme="light"] .main-footer {
    background-color: #0a0a0a !important;
    color: #ffffff !important;
}

[data-theme="light"] .footer-title {
    color: #ffffff !important;
}

[data-theme="light"] .footer-desc {
    color: rgba(255, 255, 255, 0.7) !important;
}

[data-theme="light"] .footer-links a {
    color: rgba(255, 255, 255, 0.7) !important;
}

[data-theme="light"] .footer-links a:hover {
    color: #ffffff !important;
}

/* ===================================
   THEME COLOR FIXES - DARK THEME
   =================================== */

/* Ensure body uses correct theme variables */
body[data-theme="dark"] {
    background-color: #0a0a0a !important;
    color: #ffffff !important;
}

/* Header - Dark Theme */
[data-theme="dark"] .main-header {
    background-color: #0a0a0a !important;
    color: #ffffff !important;
    border-bottom-color: #2a2a2a !important;
}

[data-theme="dark"] .header-top {
    background-color: #151515 !important;
    border-bottom-color: #2a2a2a !important;
}

[data-theme="dark"] .header-date,
[data-theme="dark"] .social-link {
    color: #b8b8b8 !important;
}

[data-theme="dark"] .logo h1,
[data-theme="dark"] .logo h1 a {
    color: #ffffff !important;
}

[data-theme="dark"] .tagline {
    color: #b8b8b8 !important;
}

[data-theme="dark"] .nav-link {
    color: #ffffff !important;
}

[data-theme="dark"] .nav-link:hover {
    color: #ff141a !important;
}

[data-theme="dark"] .search-btn,
[data-theme="dark"] .theme-toggle {
    color: #ffffff !important;
}

/* Pre-Footer - Dark Theme */
[data-theme="dark"] .pre-footer {
    background-color: #151515 !important;
}

[data-theme="dark"] .pre-footer-column {
    background-color: #0a0a0a !important;
    color: #ffffff !important;
}

[data-theme="dark"] .column-title,
[data-theme="dark"] .event-link,
[data-theme="dark"] .news-item a {
    color: #ffffff !important;
}

/* Footer - Dark Theme */
[data-theme="dark"] .main-footer {
    background-color: #000000 !important;
    color: #ffffff !important;
}

/* ===================================
   GENERAL TEXT COLOR FIXES
   =================================== */

/* Ensure all links inherit proper colors */
[data-theme="light"] a {
    color: #ff141a;
}

[data-theme="light"] a:hover {
    color: #333333;
}

[data-theme="dark"] a {
    color: #ffffff;
}

[data-theme="dark"] a:hover {
    color: #ededed;
}

/* Section titles */
[data-theme="light"] .section-title,
[data-theme="light"] .article-title,
[data-theme="light"] .page-header h1 {
    color: #0a0a0a !important;
}

[data-theme="dark"] .section-title,
[data-theme="dark"] .article-title,
[data-theme="dark"] .page-header h1 {
    color: #ffffff !important;
}

/* Article cards */
[data-theme="light"] .article-card {
    background-color: #ffffff !important;
    color: #0a0a0a !important;
}

[data-theme="dark"] .article-card {
    background-color: #151515 !important;
    color: #ffffff !important;
}

/* Sidebar */
[data-theme="light"] .sidebar {
    color: #0a0a0a !important;
}

[data-theme="dark"] .sidebar {
    color: #ffffff !important;
}

/* ===================================
   WIDGET COLOR FIXES
   =================================== */

[data-theme="light"] .widget {
    color: #0a0a0a !important;
}

[data-theme="light"] .widget-title {
    color: #0a0a0a !important;
}

[data-theme="dark"] .widget {
    color: #ffffff !important;
}

[data-theme="dark"] .widget-title {
    color: #ffffff !important;
}

/* ===================================
   FORMS AND INPUTS
   =================================== */

[data-theme="light"] input,
[data-theme="light"] textarea,
[data-theme="light"] select {
    background-color: #ffffff !important;
    color: #0a0a0a !important;
    border-color: #e0e0e0 !important;
}

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background-color: #151515 !important;
    color: #ffffff !important;
    border-color: #2a2a2a !important;
}

/* ===================================
   PAGINATION
   =================================== */

[data-theme="light"] .pagination a,
[data-theme="light"] .pagination span {
    color: #0a0a0a !important;
    background-color: #ffffff !important;
    border-color: #e0e0e0 !important;
}

[data-theme="light"] .pagination a:hover,
[data-theme="light"] .pagination .current {
    background-color: #ff141a !important;
    color: #ffffff !important;
}

[data-theme="dark"] .pagination a,
[data-theme="dark"] .pagination span {
    color: #ffffff !important;
    background-color: #151515 !important;
    border-color: #2a2a2a !important;
}

[data-theme="dark"] .pagination a:hover,
[data-theme="dark"] .pagination .current {
    background-color: #ff141a !important;
    color: #ffffff !important;
}

/* ===================================
   COMMENTS
   =================================== */

[data-theme="light"] .comment-list {
    color: #0a0a0a !important;
}

[data-theme="light"] .comment-author {
    color: #0a0a0a !important;
}

[data-theme="dark"] .comment-list {
    color: #ffffff !important;
}

[data-theme="dark"] .comment-author {
    color: #ffffff !important;
}

/* ===================================
   MOBILE MENU (if exists)
   =================================== */

[data-theme="light"] .mobile-menu {
    background-color: #ffffff !important;
    color: #0a0a0a !important;
}

[data-theme="dark"] .mobile-menu {
    background-color: #0a0a0a !important;
    color: #ffffff !important;
}

/* ===================================
   NEWSLETTER FORM
   =================================== */

[data-theme="light"] .newsletter-form input {
    background-color: #ffffff !important;
    color: #0a0a0a !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

[data-theme="dark"] .newsletter-form input {
    background-color: #151515 !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

/* ===================================
   OVERRIDE ANY INLINE STYLES
   =================================== */

/* Force correct text colors regardless of inline styles */
[data-theme="light"] * {
    --computed-text-color: #0a0a0a;
}

[data-theme="dark"] * {
    --computed-text-color: #ffffff;
}

/* ===================================
   CRITICAL: NO WHITE TEXT ON WHITE BG
   =================================== */

/* Prevent any white text on white background in light theme */
[data-theme="light"] .main-header *:not(.breaking-news *):not(.footer *),
[data-theme="light"] .pre-footer *,
[data-theme="light"] .header-top *,
[data-theme="light"] .header-main * {
    color: inherit;
}

/* Ensure header elements never have white text in light theme */
[data-theme="light"] .header-top,
[data-theme="light"] .header-top *,
[data-theme="light"] .header-main,
[data-theme="light"] .header-main *:not(.accent),
[data-theme="light"] .pre-footer,
[data-theme="light"] .pre-footer * {
    color: #0a0a0a !important;
}

/* Except for links that should follow theme */
[data-theme="light"] .header-top a,
[data-theme="light"] .header-main a:not(.accent),
[data-theme="light"] .pre-footer a {
    color: #4a4a4a !important;
}

[data-theme="light"] .header-top a:hover,
[data-theme="light"] .header-main a:hover,
[data-theme="light"] .pre-footer a:hover {
    color: #ff141a !important;
}

/* ===================================
   ARCHIVE & TAXONOMY PAGES
   =================================== */

[data-theme="light"] .archive-description,
[data-theme="light"] .page-header {
    color: #0a0a0a !important;
}

[data-theme="dark"] .archive-description,
[data-theme="dark"] .page-header {
    color: #ffffff !important;
}

/* ===================================
   FOOTER UTILITY CLASSES (Issue 3.3)
   =================================== */

/* reCAPTCHA notice - small muted text */
.footer-recaptcha-notice {
    font-size: 0.75rem;
    color: #888;
    margin-top: 0.5rem;
}

/* Section spacing in footer */
.footer-section-spacing {
    margin-top: 2rem;
}
