/* Global Dark Mode Styles */
body {
    transition: background-color 0.4s ease, color 0.4s ease;
}

body.dark-mode {
    background-color: #121212 !important;
    color: #e0e0e0 !important;
}

/* index.html overrides */
body.dark-mode .logo-main,
body.dark-mode .cursor,
body.dark-mode .logo-sub {
    color: #e0e0e0 !important;
}

body.dark-mode .search-input {
    color: #e0e0e0 !important;
}

body.dark-mode .search-suggestion {
    color: #777 !important;
}

body.dark-mode .line-animator {
    background-color: #777 !important;
}

body.dark-mode .search-input:focus ~ .line-animator {
    background-color: #e0e0e0 !important;
}

body.dark-mode .search-result {
    color: #e0e0e0 !important;
}

/* editor.html overrides */
body.dark-mode .latex-display {
    color: #e0e0e0 !important;
}

body.dark-mode .latex-input, 
body.dark-mode .var-desc, 
body.dark-mode .var-rango, 
body.dark-mode .var-espacio,
body.dark-mode #tag-input {
    color: #e0e0e0 !important;
    border-bottom-color: #555 !important;
}

body.dark-mode input::placeholder {
    color: #777 !important;
}

body.dark-mode .varstable th,
body.dark-mode .varstable td,
body.dark-mode table th,
body.dark-mode table td {
    border-bottom: 1px solid #333 !important;
    color: #e0e0e0 !important;
}

body.dark-mode thead {
    border-bottom: 1px solid #555 !important;
}

body.dark-mode .action-btn {
    color: #e0e0e0 !important;
}
body.dark-mode .action-btn:hover {
    color: #fff !important;
    background-color: #333 !important;
}

body.dark-mode .text-\[\#5a5a5a\] {
    color: #999 !important;
}

/* mathjax elements inside equation */
body.dark-mode .equation {
    color: #e0e0e0 !important;
}

/* transition smooth for elements */
.logo-main, .cursor, .logo-sub, .search-input, .line-animator, .search-result, .varstable th, .varstable td, .latex-display, input, .equation, table th, table td {
    transition: color 0.4s ease, background-color 0.4s ease, border-color 0.4s ease;
}

body.dark-mode #flash {
    background-color: #e0e0e0 !important;
}
body.dark-mode .title-input {
    color: #e0e0e0;
}
body.dark-mode .title-input::placeholder {
    color: #555;
}

body.dark-mode .search-dropdown-item {
    color: #777 !important;
}
body.dark-mode .search-dropdown-item:hover, 
body.dark-mode .search-dropdown-item.selected {
    color: #e0e0e0 !important;
}
body.dark-mode .search-dropdown-item .match-highlight {
    color: #e0e0e0 !important;
}

body.dark-mode .cta-contact {
    color: #aaaaaa !important;
}

body.dark-mode .cta-contact:hover,
body.dark-mode .cta-contact:focus-visible {
    color: #e0e0e0 !important;
}

body.dark-mode .search-result h2 {
    color: #e0e0e0 !important;
}

body.dark-mode .contact-overlay {
    background: rgba(18, 18, 18, 0.92) !important;
}

body.dark-mode .contact-panel {
    color: #e0e0e0 !important;
}

body.dark-mode .contact-title {
    color: #e0e0e0 !important;
}

body.dark-mode .contact-subtitle,
body.dark-mode .contact-status,
body.dark-mode .contact-btn-cancel {
    color: #aaaaaa !important;
}

body.dark-mode .contact-btn-cancel:hover {
    color: #e0e0e0 !important;
}

body.dark-mode .contact-input {
    color: #e0e0e0 !important;
    border-bottom-color: #555555 !important;
}

body.dark-mode .contact-input:focus {
    border-bottom-color: #e0e0e0 !important;
}

body.dark-mode .contact-btn-send {
    color: #e0e0e0 !important;
    border-color: #e0e0e0 !important;
}

body.dark-mode .contact-btn-send:hover {
    background: #e0e0e0 !important;
    color: #121212 !important;
}

