/* ==========================================================================
   KOMUNIKATY NA STRONACH FORMULARZY — wspólny wygląd dla wszystkich kont
   (zapisano / wysłano, błąd, brak dostępu, informacja, powitanie z zaproszenia).
   CONCEPT INTERMEDIA / PLATFORMA GOV, 24.10.2026

   Kolory biorą się ze zmiennych arkusza konta (--pl-…). Gdy konto ma własny
   arkusz i ustawi w nim te zmienne, komunikaty przejmą jego kolorystykę.
   Gdy zmiennych nie ma, obowiązują wartości formularze.org podane po przecinku.
   Krój pisma dziedziczy się z arkusza konta.
   ========================================================================== */

.komunikat span.notice,
.komunikat span.informacja,
.komunikat span.error,
.komunikat span.blad,
.komunikat span.info,
.komunikat #notification:not(:empty) {
    display: block;
    float: none;
    clear: both;
    box-sizing: border-box;
    width: auto;
    max-width: 760px;
    margin: 20px auto;
    padding: 14px 18px 14px 54px;

    border: 0;
    border-left: 3px solid;      /* prosta kreska w kolorze komunikatu, bez zaokrągleń */
    border-radius: 0;
    background-image: none;
    background-repeat: no-repeat;

    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.55;
    text-align: left;
    cursor: default;
    position: relative;
    box-shadow: none;
}

/* znak w kółku po lewej */
.komunikat span.notice::before,
.komunikat span.informacja::before,
.komunikat span.error::before,
.komunikat span.blad::before,
.komunikat span.info::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 15px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 14px 14px;
}

/* powodzenie: „Dane zostały zapisane”, „Formularz został zgłoszony” */
.komunikat span.notice,
.komunikat span.informacja {
    color: var(--pl-sukces, #1E5A2F);
    background-color: var(--pl-sukces-tlo, #E8F5EC);
    border-left-color: var(--pl-sukces-pasek, #2E8B4A);
}
.komunikat span.notice::before,
.komunikat span.informacja::before {
    background-color: var(--pl-sukces-pasek, #2E8B4A);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* błąd i brak dostępu: „Dostęp zabroniony”, „Wypełnij pole” */
.komunikat span.error,
.komunikat span.blad {
    color: var(--pl-blad, #8A0F1D);
    background-color: var(--pl-blad-tlo, #FDE8EA);
    border-left-color: var(--pl-blad-pasek, #DA1B2E);
}
.komunikat span.error::before,
.komunikat span.blad::before {
    background-color: var(--pl-blad-pasek, #DA1B2E);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M7 2.5v5.5' stroke='%23fff' stroke-width='2.2' stroke-linecap='round'/%3E%3Ccircle cx='7' cy='11' r='1.3' fill='%23fff'/%3E%3C/svg%3E");
}

/* informacja: powitania z zaproszenia, wskazówki */
.komunikat span.info,
.komunikat #notification:not(:empty) {
    color: var(--pl-info, #24405E);
    background-color: var(--pl-info-tlo, #EAF1F8);
    border-left-color: var(--pl-info-pasek, #3A6EA5);
}
.komunikat #notification:not(:empty) {
    padding-left: 18px;
}
.komunikat span.info::before {
    background-color: var(--pl-info-pasek, #3A6EA5);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Ccircle cx='7' cy='3.2' r='1.3' fill='%23fff'/%3E%3Cpath d='M7 6v5.5' stroke='%23fff' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* treść z panelu (Konfiguracja → Komunikaty) przychodzi jako akapity:
   pierwszy akapit traktujemy jak tytuł komunikatu */
.komunikat span.notice > p,
.komunikat span.informacja > p,
.komunikat span.error > p,
.komunikat span.blad > p,
.komunikat span.info > p {
    margin: 0 0 4px 0;
    color: inherit;
}
.komunikat span.notice > p:first-child,
.komunikat span.informacja > p:first-child,
.komunikat span.error > p:first-child,
.komunikat span.blad > p:first-child,
.komunikat span.info > p:first-child {
    font-weight: 700;
    font-size: 17px;
}
.komunikat span.notice > p:only-child,
.komunikat span.informacja > p:only-child,
.komunikat span.error > p:only-child,
.komunikat span.blad > p:only-child,
.komunikat span.info > p:only-child {
    font-weight: 600;
    font-size: 16px;
}
.komunikat span.notice > p:last-child,
.komunikat span.informacja > p:last-child,
.komunikat span.error > p:last-child,
.komunikat span.blad > p:last-child,
.komunikat span.info > p:last-child {
    margin-bottom: 0;
}
.komunikat span a {
    color: inherit;
    text-decoration: underline;
    font-weight: 600;
}

/* kontenery bez treści nie rysują niczego */
.komunikat #updater:empty,
.komunikat #notification:empty {
    display: none;
}
.komunikat .cl {
    clear: both;
}

/* strona „Uwaga!” (brak dostępu, formularz niedostępny) */
.tytul-ankiety h1 {
    font-family: inherit;
}
