/* Import Palety (musi być pierwszy!) */
@import url('/obsidian-styles/palette.css?v=1');
@import url('/obsidian-styles/components.css?v=2');

/* --- OBSIDIAN FOR LIQUID: STEP 1 (Clean Void) --- */

/* 1. LEWY PASEK NAWIGACJI (Obszar nr 1) */
[data-bs-theme="dark"] .navbar.fixed-left, 
[data-bs-theme="dark"] .path-mod-chat .yui-layout-unit-bottom, 
[data-bs-theme="dark"] #chat-input-area, 
[data-bs-theme="dark"] #chat-input-area table.generaltable, 
[data-bs-theme="dark"] #chat-input-area table.generaltable td.cell, 
[data-bs-theme="dark"] #page-mod-quiz-edit ul.slots li.section li.activity, 
[data-bs-theme="dark"] #page-mod-quiz-edit .section .activity .actions, 
[data-bs-theme="dark"] #page-mod-quiz-edit ul.slots li.section li.activity .instancemaxmarkcontainer, 
[data-bs-theme="dark"] .popover-region-container, 
[data-bs-theme="dark"] .popover-region-footer-container, 
[data-bs-theme="dark"] .content-item-container.unread, 
[data-bs-theme="dark"] .no-left-nav .navbar .secondary-navbar nav, 
[data-bs-theme="dark"] .swiper-slide .ratio {
    background-color: rgb(var(--obs-void)) !important; /* Obsidian Void */
}

/* --- OBSIDIAN FOR LIQUID: STEP 2 (Surface / Content Areas) --- */

/* 2. GŁÓWNE KONTENERY TREŚCI (Obszar nr 2) */
[data-bs-theme="dark"] .bg-white, 
[data-bs-theme="dark"] #page.drawers .main-inner, 
[data-bs-theme="dark"] .dropdown-menu, 
[data-bs-theme="dark"] .card, 
[data-bs-theme="dark"] .maincalendar .calendarmonth td:hover .day-number-circle, 
[data-bs-theme="dark"] .maincalendar .calendarmonth td:focus .day-number-circle, 
[data-bs-theme="dark"] .maincalendar .calendarmonth td:active .day-number-circle, 
[data-bs-theme="dark"] .modal-content, 
[data-bs-theme="dark"] .block .block-cards .btn.btn-link.btn-icon:hover, 
[data-bs-theme="dark"] .block .block-cards .btn.btn-link.btn-icon:focus, 
[data-bs-theme="dark"] .message-app, 
[data-bs-theme="dark"] .list-group-item, 
[data-bs-theme="dark"] .moodle-dialogue-base .moodle-dialogue-wrap, 
[data-bs-theme="dark"] .page-link:hover, 
[data-bs-theme="dark"] .bg-light, 
[data-bs-theme="dark"].yui-skin-sam .yui-layout.path-mod-chat-gui_ajax, 
[data-bs-theme="dark"].yui-skin-sam .yui-layout.path-mod-chat-gui_ajax .yui-layout-unit.yui-layout-unit-center div.yui-layout-bd, 
[data-bs-theme="dark"] .mdl-chat-my-entry .chat-message .text, 
[data-bs-theme="dark"] .chooserdialogue .moodle-dialogue-wrap .moodle-dialogue-bd {
    background-color: rgb(var(--obs-base)) !important; /* Obsidian Surface */
}

/* --- OBSIDIAN FOR LIQUID: STEP 3 (Base / Body) --- */

/* 3. FUNDAMENT STRONY (Obszar nr 3) */
[data-bs-theme="dark"] body, 
[data-bs-theme="dark"] .activity-add, 
[data-bs-theme="dark"] .block-add, 
[data-bs-theme="dark"] .btn.btn-icon:hover, 
[data-bs-theme="dark"] .btn.btn-icon:focus, 
[data-bs-theme="dark"] .btn.btn-icon.icons-collapse-expand, 
[data-bs-theme="dark"] .path-mod .activity-header:not(:empty), 
[data-bs-theme="dark"] .generaltable thead .sticky-column, 
[data-bs-theme="dark"] .generaltable tbody tr:nth-of-type(2n), 
[data-bs-theme="dark"] .page-link, 
[data-bs-theme="dark"] .path-mod-assign .gradingtable tr.unselectedrow td, 
[data-bs-theme="dark"] .loginform, 
[data-bs-theme="dark"] .pagelayout-login#page-login-forgot_password .mform, 
[data-bs-theme="dark"] .path-mod-chat .yui-layout-unit-right, 
[data-bs-theme="dark"] .yui-skin-sam .yui-layout.path-mod-chat-gui_ajax #chat-messages .chat-message.course-theme, 
[data-bs-theme="dark"] #chat-userlist, 
[data-bs-theme="dark"] .editing .activity-item:hover, 
[data-bs-theme="dark"] .editing .activity-item.selected, 
[data-bs-theme="dark"] #page-mod-quiz-edit ul.slots li.section .content, 
[data-bs-theme="dark"] .jschooser .choosercontainer #chooseform .instruction, 
[data-bs-theme="dark"] .jschooser .choosercontainer #chooseform .typesummary, 
[data-bs-theme="dark"] .choosercontainer #chooseform .selected, 
[data-bs-theme="dark"] body#page-question-type-multichoice div[id^="fitem_id_"][id*="fraction_"], 
[data-bs-theme="dark"] body#page-question-type-multichoice div[id^="fitem_id_"][id*="feedback_"], 
[data-bs-theme="dark"] body#page-question-type-multichoice div[id^="fitem_id_"][id*="answer_"], 
[data-bs-theme="dark"] .path-mod-assign [data-region="grade-panel"] {
    background-color: rgb(var(--obs-surface)) !important; /* Obsidian Base */
    color: rgb(var(--obs-text-main)) !important; /* Domyślny kolor tekstu */
}

/* --- OBSIDIAN FOR LIQUID: STEP 3 FIX (Root Background) --- */

/* 5. NAPRAWA TŁA HTML (Root) */
/* Nadpisuje domyślny granat #191c20 widoczny w inspektorze */
[data-bs-theme="dark"] {
    background-color: rgb(var(--obs-surface)) !important; /* Obsidian Base */
}

/* Upewniamy się, że body też to dziedziczy */
html, body {
    background-color: rgb(var(--obs-surface)) !important;
}

/* --- OBSIDIAN FOR LIQUID: STEP 4 (Right Drawer & Inputs) --- */

/* 4. SZUFLADA PRAWA I ELEMENTY FORMULARZY (Obszar nr 4) */
[data-bs-theme="dark"] .drawer, 
[data-bs-theme="dark"] .form-control, 
[data-bs-theme="dark"] .custom-select, 
[data-bs-theme="dark"] textarea, 
[data-bs-theme="dark"] #input-message, 
[data-bs-theme="dark"] .bg-primary-light, 
[data-bs-theme="dark"] .action-menu .dropdown-subpanel.content-displayed {
    background-color: rgb(var(--obs-void)) !important; /* Obsidian Void */
    color: rgb(var(--obs-text-hi)) !important; /* Biały tekst dla czytelności w polach edycji */
    border-color: rgb(var(--obs-surface)) !important; /* Subtelna ramka, żeby inputy nie znikały całkowicie */
}