/* light mode */
.light > *{
    background-color: var(--background-color) !important;
    color: var(--text-color) !important;
}

.light > #footer-socialNetworks-github-svg-path{
    fill: none;
}

/* dark mode */
.dark {
    --background-color: var(--background-color-dark) !important;
    --secondary-background-color: var(--secondary-background-color-dark) !important;
    --text-color: var(--text-color-dark) !important;
    --text-secondary-color: var(--text-secondary-color-dark) !important;
    --text-link-color: var(--text-link-color-dark) !important;
    --primary-color: var(--primary-color-dark);
    --secondary-color: var(--secondary-color-dark);
}

.dark #footer-socialNetworks-github-svg-path{
    fill: #FFFFFF;
}

.text-secondary {
    color: var(--text-secondary-color) !important;
}

#theme-toggle:focus {
    outline: 0;
}

#theme-toggle svg {
    height: 18px;
}

button#theme-toggle {
    border: none;
    font-size: 26px;
    margin: auto 4px;
}

body.dark #moon {
    vertical-align: middle;
    display: none;
}

body:not(.dark) #sun {
    display: none;
}

/* AI chatbox specific adjustments to ensure visibility in dark mode */
#ai-chatbox .chatbox-container {
    background-color: var(--secondary-background-color);
    color: var(--text-color);
    border: 1px solid rgba(128, 128, 128, 0.3);
}

#ai-chatbox .card-header {
    background-color: var(--primary-color);
    color: #fff;
}

#ai-chatbox .card-body,
#ai-chatbox input.form-control {
    background-color: var(--background-color);
    color: var(--text-color);
    border-color: rgba(128, 128, 128, 0.3);
}

#ai-chatbox input.form-control::placeholder {
    color: var(--text-secondary-color);
    opacity: 0.7;
}

#ai-chatbox .btn,
#ai-chatbox .btn:focus,
#ai-chatbox .btn:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Stronger contrast for dark mode specifically */
body.dark #ai-chatbox .chatbox-container {
    background-color: var(--secondary-background-color-dark);
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark #ai-chatbox .card-header {
    background-color: #fff;
    color: #000;
}

body.dark #ai-chatbox .card-header small {
    color: rgba(0, 0, 0, 0.7);
}

body.dark #ai-chatbox .card-body,
body.dark #ai-chatbox input.form-control {
    background-color: #1a1a1a;
    color: var(--text-color-dark);
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark #ai-chatbox input.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

body.dark #ai-chatbox .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

body.dark #ai-chatbox .btn#transformButton,
body.dark #ai-chatbox .btn#transformButton:hover,
body.dark #ai-chatbox .btn#transformButton:focus {
    background-color: #fff;
    color: #000;
    border-color: #fff;
}

body.dark #ai-chatbox .btn#resetButton,
body.dark #ai-chatbox .btn#resetButton:hover,
body.dark #ai-chatbox .btn#resetButton:focus {
    background-color: transparent;
    color: #fff;
    border-color: #fff;
}

