/* Helles Design: Anpassungen fuer fest eingetragene Farben in den Seiten-Styles.
   Die Grundfarben stehen in base.css unter html[data-theme="light"]. */

/* --------------- Umschalt-Button --------------- */

.theme-toggle-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--input-border-color);
    border-radius: 50%;
}

.theme-toggle-btn:hover {
    background-color: var(--button-color);
    border-color: var(--button-color);
    color: #fff;
    transform: none;
}

.theme-toggle-btn svg {
    width: 18px;
    height: 18px;
}

/* Dunkel: Sonne zeigt "auf hell umschalten", hell: Mond zeigt "auf dunkel umschalten" */
.theme-toggle-btn .icon-moon {
    display: none;
}

html[data-theme="light"] .theme-toggle-btn .icon-sun {
    display: none;
}

html[data-theme="light"] .theme-toggle-btn .icon-moon {
    display: block;
}

/* --------------- Startseite --------------- */

html[data-theme="light"] .project-description,
html[data-theme="light"] .doc-description {
    color: var(--muted-text-color);
}

html[data-theme="light"] .doc-item:hover .doc-description {
    color: #fff;
}

/* --------------- Dokumente --------------- */

html[data-theme="light"] .conversation-item,
html[data-theme="light"] .empty-list,
html[data-theme="light"] .config-tabs .tab-link,
html[data-theme="light"] .progress-label,
html[data-theme="light"] .message-date,
html[data-theme="light"] .file-chip button,
html[data-theme="light"] .icon-btn,
html[data-theme="light"] .document-meta,
html[data-theme="light"] .form-group label,
html[data-theme="light"] .toast-message p {
    color: var(--muted-text-color);
}

html[data-theme="light"] .conversation-item:hover,
html[data-theme="light"] .conversation-item.active,
html[data-theme="light"] .config-tabs .tab-link:hover,
html[data-theme="light"] .config-tabs .tab-link.active,
html[data-theme="light"] .icon-btn:hover {
    color: var(--text-color);
}

html[data-theme="light"] .send-btn {
    color: #fff;
}

/* --------------- Konfiguration --------------- */

html[data-theme="light"] .document-item:hover,
html[data-theme="light"] .account-nav-item:hover,
html[data-theme="light"] .api-key-item:hover {
    background-color: var(--hover-bg-color);
}

html[data-theme="light"] .account-nav-item.active:hover {
    background-color: var(--button-color);
}

html[data-theme="light"] .tab-link:hover {
    color: var(--text-color);
}

html[data-theme="light"] .delete-btn,
html[data-theme="light"] .key-action-btn,
html[data-theme="light"] .key-display {
    color: var(--muted-text-color);
}

html[data-theme="light"] .conv-menu-btn.delete-btn {
    color: #c62828;
}

html[data-theme="light"] .cancel-btn:hover {
    background-color: var(--hover-bg-color);
}

html[data-theme="light"] .input-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

/* --------------- Konto --------------- */

html[data-theme="light"] .account-content .input-group label {
    color: var(--text-color);
}

/* --------------- Anmeldung / Passwort --------------- */

html[data-theme="light"] .form-field .helptext {
    color: var(--muted-text-color);
}

html[data-theme="light"] .form-field .errorlist {
    color: #c62828;
}

/* --------------- Dokument-Einstellungen --------------- */

html[data-theme="light"] .builder-panel,
html[data-theme="light"] .builder-header,
html[data-theme="light"] .moving-banner {
    background-color: var(--card-color);
    border-color: var(--input-border-color);
}

html[data-theme="light"] .builder-header.compact-mode {
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom-color: var(--input-border-color);
}

html[data-theme="light"] .document-name-header,
html[data-theme="light"] .document-description-container label,
html[data-theme="light"] .block-header,
html[data-theme="light"] .block-content label,
html[data-theme="light"] .block-type-option,
html[data-theme="light"] .moving-banner {
    color: var(--text-color);
}

html[data-theme="light"] .document-subtitle,
html[data-theme="light"] .empty-canvas-message,
html[data-theme="light"] .drag-handle,
html[data-theme="light"] .action-icon-btn,
html[data-theme="light"] .block-content .input-group-small label,
html[data-theme="light"] .modal-close-btn,
html[data-theme="light"] .drop-area {
    color: var(--muted-text-color);
}

html[data-theme="light"] .modal-close-btn:hover {
    color: var(--text-color);
}

html[data-theme="light"] .action-btn,
html[data-theme="light"] .block-inserter-btn,
html[data-theme="light"] .block-type-option,
html[data-theme="light"] .moving-banner button,
html[data-theme="light"] body.is-moving-block .block-inserter-btn {
    background-color: var(--input-bg-color);
    border-color: var(--input-border-color);
    color: var(--text-color);
}

html[data-theme="light"] body.is-moving-block .block-inserter-btn {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

html[data-theme="light"] .action-btn:hover,
html[data-theme="light"] .block-type-option:hover,
html[data-theme="light"] .drop-area:hover,
html[data-theme="light"] .moving-banner button:hover {
    background-color: var(--hover-bg-color);
}

html[data-theme="light"] .action-btn:hover {
    color: var(--accent-color);
}

html[data-theme="light"] .block-inserter-btn:hover,
html[data-theme="light"] body.is-moving-block .block-inserter-btn:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

html[data-theme="light"] .submit-btn,
html[data-theme="light"] .action-btn.danger {
    color: #fff;
}

html[data-theme="light"] .action-btn.secondary {
    background-color: var(--hover-bg-color);
    border-color: var(--input-border-color);
}

html[data-theme="light"] .action-btn.secondary:hover {
    background-color: #c9ced6;
}

html[data-theme="light"] .document-description-textarea,
html[data-theme="light"] .block-content input,
html[data-theme="light"] .block-content textarea,
html[data-theme="light"] .block-content .input-group-small input,
html[data-theme="light"] .schema-block,
html[data-theme="light"] .modal-content {
    background-color: var(--card-color);
    border-color: var(--input-border-color);
    color: var(--text-color);
}

html[data-theme="light"] .document-description-textarea:focus,
html[data-theme="light"] .block-content input:focus,
html[data-theme="light"] .block-content textarea:focus {
    background-color: var(--card-color);
    border-color: var(--accent-color);
}

html[data-theme="light"] .block-header,
html[data-theme="light"] .section-block .block-header {
    background-color: var(--input-bg-color);
}

html[data-theme="light"] .section-block {
    border-color: var(--input-border-color);
}

html[data-theme="light"] .section-content,
html[data-theme="light"] .empty-canvas-message {
    background-color: var(--bg-color);
    border-color: var(--input-border-color);
}

html[data-theme="light"] .section-content::before {
    background-color: var(--input-border-color);
}

html[data-theme="light"] .drop-area {
    border-color: var(--input-border-color);
}

/* --------------- Logo --------------- */

/* Dunkles Design: weisses Logo auf Schwarz, "screen" blendet das Schwarz aus.
   Helles Design: schwarzes Logo auf Weiss, "multiply" blendet das Weiss aus. */

.brand-logo img {
    display: block;
    width: 100%;
    height: auto;
    mix-blend-mode: screen;
}

.brand-logo .logo-for-light {
    display: none;
}

html[data-theme="light"] .brand-logo .logo-for-dark {
    display: none;
}

html[data-theme="light"] .brand-logo .logo-for-light {
    display: block;
}

html[data-theme="light"] .brand-logo img {
    mix-blend-mode: multiply;
}

.sidebar-logo {
    margin: -10px 0 10px 0;
}

.login-logo {
    max-width: 260px;
    margin: 0 auto 20px auto;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: url("../img/intonet_logo_dark.png") no-repeat calc(50% + 110px) center / min(55vw, 900px) auto;
    opacity: 0.06;
    mix-blend-mode: screen;
}

html[data-theme="light"] body::before {
    background-image: url("../img/intonet_logo_light.jpg");
    opacity: 0.07;
    mix-blend-mode: multiply;
}

@media (max-width: 600px) {
    body::before {
        background-position: center;
        background-size: 80vw auto;
    }
}
