/* ==== 1. TYPOGRAFIA I NAGŁÓWKI W TREŚCI ==== */
p { text-align: justify; } /* justowanie wszystkich akapitów */
p.has-background { padding: 2mm 3mm 2mm 3mm; } /* zmniejszony padding akapitów wyróżnionych kolorowym tłem */
h3 { color: #0b31c8; margin-bottom: 10px; margin-top: 30px; } /* Granatowe nagłówki przewodnika, pomocy */
h5 { margin-bottom: 8px; font-size: 110%; } 
.entry-header { margin-bottom: -15px; } /* odstęp po tytule strony */

/* ==== 2. NAGŁÓWEK WITRYNY (HEADER) ==== */
.site-header {-webkit-box-shadow: inset 0px -8px 15px -12px #ffcc00; box-shadow: inset 0px -8px 15px -12px #ffcc00;}
.inside-header {padding: 10px; padding-bottom: 10px; } 

/* --- Przełącznik języka w nagłówku --- */
#language a {color: #0e5db8; justify-content: right; display: flex;  align-items: center;  gap: 6px; }
#language a:hover, .copyright > a:hover, .accessibility > a:hover { color: #ff8902; }
#language img { width: 30px; display: none;}/* flaga przy linku widoczna tylko na smartfonach */

/* ==== 3. MENU GŁÓWNE ==== */
.main-navigation .main-nav ul li a, .menu-toggle, .main-navigation .mobile-bar-items a {padding-left: 16px; padding-right: 16px; line-height: 50px; }

/* Dla linku z submenu: zmniejszenie odstępu przed strzałką i po niej */
.main-navigation .menu-item-has-children .dropdown-menu-toggle { padding-left: 7px; padding-right: 11px;}

/* Panele submenu z autodopasowaniem szerokości */
.main-navigation ul ul { width: auto; }
.main-navigation ul ul li a { white-space: nowrap; display: block; width: auto; }

/* ==== 4. PANELE BOCZNE I WIDGETY ==== */
.sidebar .widget .widget-title { border-bottom: 1px solid #fccc03; padding-bottom: 5px; margin-top: -5mm; margin-bottom: 4mm; }
.widget a, .widget div { font-size: 16px; } /* zmniejszenie tekstu wszystkich widgetów */

/* --- Specyficzne widgety --- */
:is(.widget:has(#hours), #text-3), aside.widget_recent_entries { padding: 40px 35px 20px 35px  !important; }
#nav_menu-6 { padding: 40px 30px 25px 30px; }

/* --- Godziny otwarcia dzisiaj i jutro --- */
#hours { font-size: 14.5pt; color: #009525; margin-top: -5px; text-align: center; }
#hours + div { font-size: 11pt; margin-top: -19px; margin-bottom: 16px; text-align: center; }
#hours ~ hr { margin-top: -8px; margin-bottom: 10px; background-color: #fccc03; height: 1px; }

/* --- Aktualności ---- */
aside.widget_recent_entries > ul > li { padding-bottom: 7px; line-height: 1.25em;}
/* jeszcze mniejsza czcionka i wygaszanie długich wpisów, zamiast zawijania */
aside.widget_recent_entries > ul > li > a {display: block; white-space: nowrap; overflow: hidden; text-overflow: clip; font-size: 11pt;
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 25px), transparent 100%);
    mask-image: linear-gradient(to right, black calc(100% - 25px), transparent 100%);
}

/* --- Widget bez tła z ikonami Omega i Mendeley --- */
:is(.widget:has(#omega), #text-4) { background: transparent !important; border: none !important;  margin-top: -35px; margin-bottom: -40px; margin-right: -30px; margin-left: -15px; }
:is(.widget:has(#omega), #text-4) .textwidget P { text-align: center; }
:is(.widget:has(#omega), #text-4) .textwidget a:first-of-type { margin-right: 25px; margin-left: -10px; }
/* zastosowano :is(), żeby na starych przeglądarkach działało */

/* ==== 5. ELEMENTY SPECJALNE W TREŚCIACH ==== */
/* --- Rozwijany nagłówek (Lista dni wolnych) --- */
details summary {cursor: pointer; font-weight: 600; list-style: none; display: inline-flex; align-items: center; padding: 0.3em 0; }
details summary::-webkit-details-marker { display: none; } /* usuwa domyślną strzałkę */
details summary::after {content: "\25B6"; transition: transform 0.25s ease; font-size: 0.9em; margin-left: 0.4em; color: #333; } /* własna strzałka */
details[open] summary::after { transform: rotate(90deg); } /* po rozwinięciu obraca się */
details ul { margin-left: 1.5em; } /*  lekkie wcięcie dla treści, na dużych ekranach zostanie to dalej zwiększone */
p:has(+ details > summary) { margin-bottom: 1.9mm; } /* mniejszy margines po akapicie poprzedzającym  */

/* --- poprawka dla listy "Na skróty" - 2 kolumny --- */
.na-skroty { display: flex; flex-wrap: wrap; }
.na-skroty .wp-block-column { flex: 1 1 50%; min-width: 0; }

/* ==== 6. TABELE ==== */
/* --- Naprzemienne kolorowanie wierszy w: Czytelnia Online i Godziny otwarcia (poprawka, bo po aktualizacji zrobiły się jednolite)--- */
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) { background-color: #f3f3f3; }
.wp-block-table.is-style-stripes tbody tr:nth-child(even) { background-color: #ffffff; }
.wp-block-table.is-style-stripes td, .wp-block-table.is-style-stripes th { padding: 5px 10px; }

/* --- Ustawienia specyficzne dla tabeli Czytelnia Online --- */
figure.wp-block-table.alignwide { margin: 0 auto -30px auto; width: 100%; } /* tabela na taką szerokość jak reszta tekstu i zmniejszony dolny margines */
table.has-subtle-pale-blue-background-color td { color: #0000d9; } /* poprawka: nagłowki wierszy po jakiejś aktualizacji zrobiły się czarne */
thead { color: #fcf0d9; }
td > small { color: navy; font-size: 80%; }
td.res-link { vertical-align: middle; padding: 2px 5px; width: 75px; }
img.res-link-img { width: 24px; }
/* rozwijane dod. informacje dla wierszy w Czytelni Online */
.tooltipImg { width: 18px; height: 18px; margin-bottom: -3px; margin-left: 4px; cursor: pointer; }
.tooltipInfo { color: black; font-size: 80%; font-family: Arial; text-align: justify; margin-top: 2px; padding: 5px 8px 0 8px; display: none;}

/*Tabela rezerwacji Pracowni Komp.*/
.rez > table thead th, .rez > table tbody td {border: 1px solid #e0e0e0 !important;}
.rez > table > thead {color:black; background-color:#d0d0d0}
.rez > table > thead > tr > th:nth-child(1) {width: 10%;}
.rez > table > thead > tr > th:nth-child(2) {width: 13%;}
.rez > table > thead > tr > th:nth-child(3) {width: 37%;}
.rez > table > thead > tr > th:nth-child(4) {width: 15%;}
.rez > table > thead > tr > th:nth-child(5) {width: 25%;}

/* ==== 7. STOPKA WITRYNY (FOOTER) ==== */
.site-info { color: #ffffff; background-color: #1150aa; border-top: 1px solid #fccc03; padding: 12px 20px 5px 20px;} /* granat-umk */
.footer-widgets { -webkit-box-shadow: inset 0px -8px 15px -12px #ffcc00;  box-shadow: inset 0px -8px 15px -12px #ffcc00;  padding: 33px 40px 12px 40px;}
.footer-widgets .widget-title { border-bottom: 1px solid #fccc03; padding-bottom: 5px; margin-top: -5mm; margin-bottom: 3mm;}

/* --- Pływająca ikonka "Przewiń do początku" ---*/
.generate-back-to-top, .generate-back-to-top:visited { bottom: 48px; right: 35px; }

/* --- Ikony GoogleMap i Facebook w stopce --- */
/* elementy wspólne --- */
.footer-icon-back { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: -6px; }
.footer-icon { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; transition: all 0.3s ease; box-sizing: border-box; }
#Facebook { width: 26px; height: 26px; background-color: white; border: 1px solid transparent; }
#Facebook svg { width: 22px; height: 22px; fill: #0050AA; transform: translateX(1px); }  /* granat-umk */
#Facebook:hover { background-color: transparent; border-color: #ff8902; }  /* pomarańcz */
#Facebook:hover svg { fill: #ff8902; }  /* pomarańcz */
#GoogleMap { background-color: transparent; }
#GoogleMap svg { width: 32px; height: 32px; fill: white; }
#GoogleMap:hover svg { fill: #ff8902; }  /* pomarańcz */
#Instagram { width: 26px; height: 26px; background-color: white; border: 1px solid transparent; }
#Instagram svg { width: 18px; height: 18px; fill: #0050AA; } 
#Instagram:hover { background-color: transparent; border-color: #ff8902; } 
#Instagram:hover svg { fill: #ff8902; }  /* pomarańcz */

/* ==== 8. Skalowanie do szerokości ekranu  ==== */
@media (min-width: 400px) { /* Lista dni wolnych - większe wcięcie dla rozwiniętej treści */
    details ul { margin-left: 3em; }
}
@media (min-width: 800px) { /* szerszy tytuł zasobu w Czytelni Online */
    td.res-title { width: 60%; }
}
@media (min-width: 1440px) {
    body .grid-container, .wp-block-group__inner-container { max-width: 1400px; margin-left: auto; margin-right: auto; }
}
@media (min-width: 1650px) {
    body .grid-container, .wp-block-group__inner-container { max-width: 1600px; margin-left: auto; margin-right: auto; }
    :is(.widget:has(#omega), #text-4) .textwidget a:first-of-type { margin-right: 45px; } /* widget bez tła z ikonami Omega i Mendeley */
}

@media (max-width: 1440px) {
    :is(.widget:has(#hours), #text-3), aside.widget_recent_entries, #nav_menu-6 { padding: 40px 25px 13px 25px !important; }
    :is(.widget:has(#omega), #text-4) .textwidget a:first-of-type { margin-right: 10px; margin-left: -15px; }
    :is(.widget:has(#omega), #text-4) { margin-left: 0px; margin-right: -30px; } /* widget bez tła z ikonami Omega i Mendeley */
}
@media (max-width: 1250px) {
	#weekdays li, #weekdays2 li {font-size:11pt;}
}
@media (max-width: 1160px) {
	#weekdays li, #weekdays2 li {font-size:10pt;}
}
@media (max-width: 768px) {
    .inside-header { padding-bottom: 24px; }
    .site-content .inside-article { padding-left: 10px; padding-right: 10px; }
    .separate-containers .widget, .separate-containers .site-main>*, .separate-containers .page-header, .widget-area .main-navigation { margin-bottom: 1px; }
    .separate-containers .site-main, .separate-containers .widget { margin-left: 5px !important; margin-right: 5px !important; margin-bottom: 20px; }
    #language { padding-top: 10px; margin-bottom: -20px; }
    #language a { justify-content: center; }
    #language img { display: flex; } /* wyświetlanie tylko na smartfonach, na dużych: ukryte */
    td.res-cat, .wp-block-table th:nth-child(2) { display: none; } /* Czytelnia Online - usuniecie II kolumny wraz z nagłówkiem*/
    figure.wp-block-table.alignwide { margin-left: 0; margin-right: 0; width: 100%; max-width: 100vw; }
    .widget:has(#GoogleMap) { margin-top: 5px; margin-bottom: -13px; }
    .footer-icon-back { gap: 40px; }
    aside.widget_recent_entries > ul > li > a { font-size: 12pt; } /* powrotne powiększenie czcionki dla recent-posts / Aktualności */
	/* Menu pomocy przeniesione na górę (przed głownym oknem) */
	.left-sidebar .site-content { display: flex; flex-direction: column; }
 	.left-sidebar #left-sidebar {order: -1;} /* lewy sidebar na samą górę! */
	#weekdays li, #weekdays2 li {font-size:13pt;}
	/* 3 okładki w wierszu na smartfonie*/
  	.galeria-okladek > figure.wp-block-image {flex-basis: calc(33.333% - 1em) ;	width: calc(33.333% - 1em) ;}
}
@media (max-width: 600px) { /* poprawka dla listy na skróty - 1 kolumna na mniejszych smartfonach */
    .na-skroty .wp-block-column {flex: 1 1 100%; margin: 0 !important;  padding-top: 0 !important;  padding-bottom: 0 !important;  }
    .na-skroty .wp-block-column ul {margin-top: 0 !important; margin-bottom: 0 !important; }
    .wp-block-columns.na-skroty { margin-bottom: 1.5em !important; }
}
@media (max-width: 500px) {
	td.res-title { font-size: 11pt !important; line-height: 1.2 !important; } /* Tabela Czytelni Online */
    .tooltipInfo { padding: 0; }
}
@media (max-width: 440px) {
    .site-content .inside-article { padding-left: 5px; padding-right: 5px; }
    .sidebar .widget, .inside-left-sidebar .widget, .inside-right-sidebar .widget { padding-left: 10px !important; padding-right: 10px !important; }
    :is(.widget:has(#omega), #text-4) .textwidget a:first-of-type { margin-left: 20px; } /* widget bez tła z ikonami Omega i Mendeley */
}

