/* =========================================================
   PowiatMedia 0.5.2 - wygląd treści na stronie
   ---------------------------------------------------------
   Plik jest częścią systemowego pluginu pakietu i jest ładowany
   automatycznie na froncie. user.css nie wymaga importu PowiatMedia.
   ========================================================= */

/* Zdjęcia: wspólna szerokość redakcyjna i mały, równy odstęp 4 px.
 * Poziome obrazy są wyświetlane na 800 px szerokości (lub 100% na małym ekranie),
 * dzięki czemu różne proporcje mają tę samą dłuższą krawędź wizualną.
 * Pionowe zachowują proporcje i mają maksymalną długą krawędź 800 px.
 */
.powiatmedia-image-item {
    margin: 0 0 4px !important;
    padding: 0 !important;
    text-align: center !important;
}

.powiatmedia-image-item + .powiatmedia-image-item {
    margin-top: 0 !important;
}

.powiatmedia-image-item img {
    display: block !important;
    max-width: 100% !important;
    height: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Krajobraz: wspólna szerokość 800 px. Starszy plik mniejszy niż 800 px
 * może zostać wizualnie powiększony dla zachowania równego składu. */
.powiatmedia-image-item--landscape img {
    width: 800px !important;
}

.powiatmedia-image-item--square img {
    width: 800px !important;
}

/* Portret: nie rozciągamy szerokości do 800 px. */
.powiatmedia-image-item--portrait img {
    width: auto !important;
    max-height: 800px !important;
}

/* Wpisy utworzone starszą wersją pluginu nie miały klasy orientacji. */
.powiatmedia-image-item--unknown img,
.powiatmedia-image-item:not(.powiatmedia-image-item--landscape):not(.powiatmedia-image-item--portrait):not(.powiatmedia-image-item--square) img {
    width: auto !important;
}

/* Załączniki: zwykły, wyśrodkowany link z małą ikoną. */
.file-attachment {
    display: block !important;
    margin: 1rem 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: center !important;
}

.file-attachment .file-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .35rem !important;
    width: auto !important;
    max-width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-left: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: inherit !important;
    text-decoration: none !important;
}

.file-attachment .file-link:hover,
.file-attachment .file-link:focus,
.file-attachment .file-link:focus-visible {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-left: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.file-attachment .file-link__icon {
    position: static !important;
    display: inline-block !important;
    flex: 0 0 16px !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: 16px 16px !important;
    box-shadow: none !important;
    overflow: visible !important;
    vertical-align: -2px !important;
}

.file-attachment .file-link__icon::before,
.file-attachment .file-link__icon::after {
    content: none !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    border: 0 !important;
    background: none !important;
}

.file-attachment .file-link__icon-label {
    display: none !important;
}

.file-attachment .file-link__content {
    display: inline-flex !important;
    flex-wrap: wrap !important;
    align-items: baseline !important;
    justify-content: center !important;
    gap: .15rem .35rem !important;
    min-width: 0;
}

.file-attachment .file-link__title {
    color: #174e7a;
    font-weight: 400;
    line-height: 1.45;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: .12em;
    overflow-wrap: anywhere;
}

.file-attachment .file-link:hover .file-link__title,
.file-attachment .file-link:focus-visible .file-link__title {
    color: #0b3555;
    text-decoration-thickness: 2px;
}

.file-attachment .file-link__meta {
    margin-left: 0 !important;
    color: #475569;
    font-size: .9em;
    font-weight: 400;
    white-space: nowrap;
}

.file-link--pdf .file-link__icon {
    background-image: url("../icons/pdf.svg") !important;
}

.file-link--word .file-link__icon {
    background-image: url("../icons/word.svg") !important;
}

.file-link--excel .file-link__icon {
    background-image: url("../icons/excel.svg") !important;
}

.file-link--powerpoint .file-link__icon {
    background-image: url("../icons/powerpoint.svg") !important;
}

.file-link--opendocument .file-link__icon {
    background-image: url("../icons/opendocument.svg") !important;
}

.file-link--archive .file-link__icon {
    background-image: url("../icons/archive.svg") !important;
}

.file-link--text .file-link__icon {
    background-image: url("../icons/text.svg") !important;
}

.file-link--generic .file-link__icon {
    background-image: url("../icons/file.svg") !important;
}

@media (max-width: 575.98px) {
    .file-attachment .file-link {
        align-items: flex-start !important;
    }

    .file-attachment .file-link__icon {
        margin-top: .15rem !important;
    }

    .file-attachment .file-link__meta {
        white-space: normal;
    }
}

@media (forced-colors: active) {
    .file-attachment .file-link__icon {
        background-image: none !important;
        width: 1em !important;
        height: 1em !important;
        border: 1px solid LinkText !important;
    }

    .file-attachment .file-link__meta {
        color: CanvasText;
    }
}
