/* EPD Polska — skórka węzła soda4LCA.
 *
 * Cały wygląd trzymamy w tym pliku, który w szablonie domyślnym jest pusty
 * i przewidziany przez autorów na nadpisania. site.css zostaje nietknięty,
 * więc aktualizacja soda4LCA nie kasuje naszej pracy, a wycofanie zmiany
 * to usunięcie jednego pliku.
 *
 * Barwy z serwisu epdportal.org — ten sam zestaw, żeby węzeł i portal
 * czytały się jako jedno wydawnictwo, a nie dwa różne narzędzia.
 */

:root {
    --zielen: #1B4332;        /* nagłówek, stopka, nagłówki tabel */
    --zielen-jasna: #4A7C59;  /* akcent drugiego planu */
    --szalwia: #dbe7df;       /* tło pasków i wierszy */
    --terakota: #B5541C;      /* odnośniki aktywne, stan po najechaniu */
    --zloto: #C9914A;         /* zaznaczenie wiersza */
    --krem: #F7F3EC;          /* tło strony */
    --tekst: #0F1A13;
    --ramka: #cfd8d2;
}

/* --- podstawa ---------------------------------------------------------- */

* {
    font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    font-size: 13px;            /* 12 px było poniżej progu czytelności */
    background: var(--krem);
    color: var(--tekst);
}

a, a:link, a:visited {
    color: var(--zielen);
    text-decoration: none;
    border-bottom: 1px solid rgba(27, 67, 50, .25);
}

a:hover, a:focus {
    color: var(--terakota);
    border-bottom-color: var(--terakota);
}

/* --- nagłówek i stopka ------------------------------------------------- */

div.header.ui-widget-header,
div.footer.ui-widget-header {
    background: var(--zielen) !important;
    border: none !important;
    color: #fff !important;
    border-radius: 4px;
}

div.header {
    padding: .9em 1.1em !important;
    display: flex;
    align-items: center;
    gap: 1.2em;
    box-shadow: 0 1px 3px rgba(15, 26, 19, .12);
}

div.header img {
    /* Sygnet EPD jest ciemnozielony, więc na zielonym pasku potrzebuje własnego,
       jasnego pola — inaczej znika w tle. */
    max-height: 44px;
    width: auto;
    background: #fff;
    padding: 5px 7px;
    border-radius: 6px;
}

div.header a,
div.footer a {
    color: #fff !important;
    border-bottom-color: rgba(255, 255, 255, .4) !important;
}

div.header a:hover,
div.footer a:hover {
    color: var(--zloto) !important;
    border-bottom-color: var(--zloto) !important;
}

.title {
    font-weight: 600;
    letter-spacing: .01em;
}

.subtitle {
    color: rgba(255, 255, 255, .82);
}

div.footer {
    height: auto !important;
    padding: .8em 1.1em !important;
}

/* --- widżety PrimeFaces ------------------------------------------------ */
/* Motyw bazowy maluje nagłówki na błękitny gradient; zastępujemy go płaskim
   kolorem marki. !important jest konieczne, bo motyw ładuje się po nas. */

.ui-widget-header {
    background: var(--szalwia) !important;
    border-color: var(--ramka) !important;
    color: var(--zielen) !important;
    font-weight: 600;
}

.ui-widget-content {
    background: #fff !important;
    border-color: var(--ramka) !important;
    color: var(--tekst) !important;
}

#leftColumn li.ui-widget-header {
    background: var(--zielen) !important;
    color: #fff !important;
    border-radius: 3px;
    padding: .35em .6em;
}

/* --- tabele zestawów danych -------------------------------------------- */

.ui-datatable thead th {
    background: var(--zielen) !important;
    color: #fff !important;
    border-color: var(--zielen) !important;
    font-weight: 600;
}

.ui-datatable thead th a,
.ui-datatable thead th .ui-sortable-column-icon {
    color: #fff !important;
}

.ui-datatable tbody tr.ui-datatable-even > td {
    background: #fbf9f5;
}

.ui-datatable tbody tr:hover > td {
    background: var(--szalwia) !important;
}

.ui-state-highlight,
.ui-datatable tbody tr.ui-state-highlight > td {
    background: rgba(201, 145, 74, .22) !important;
    color: var(--tekst) !important;
    border-color: var(--zloto) !important;
}

/* --- przyciski --------------------------------------------------------- */

.ui-button,
button.ui-button,
.ui-datatable button {
    background: var(--zielen) !important;
    border: 1px solid var(--zielen) !important;
    color: #fff !important;
    border-radius: 3px;
}

.ui-button:hover,
button.ui-button:hover {
    background: var(--zielen-jasna) !important;
    border-color: var(--zielen-jasna) !important;
}

.ui-button.ui-state-disabled,
button.ui-button.ui-state-disabled {
    background: #b9c4bd !important;
    border-color: #b9c4bd !important;
}

.ui-button .ui-button-text {
    color: inherit !important;
}

/* --- formularze -------------------------------------------------------- */

input[type=text], input[type=password], select, textarea,
.ui-inputfield, .ui-selectonemenu {
    border: 1px solid var(--ramka) !important;
    border-radius: 3px;
    padding: .3em .45em;
    background: #fff !important;
    color: var(--tekst) !important;
}

input[type=text]:focus, input[type=password]:focus,
.ui-inputfield:focus, .ui-state-focus {
    border-color: var(--zielen-jasna) !important;
    box-shadow: 0 0 0 2px rgba(74, 124, 89, .18) !important;
}

/* --- komunikaty -------------------------------------------------------- */

.ui-messages-info, .ui-message-info {
    background: var(--szalwia) !important;
    border-color: var(--zielen-jasna) !important;
    color: var(--zielen) !important;
}

.ui-messages-error, .ui-message-error {
    background: #fbe9e1 !important;
    border-color: var(--terakota) !important;
    color: #7d3a13 !important;
}
