/* =========================================================
 * STRONA PAMIĘCI
 * ---------------------------------------------------------
 * Ten blok zawiera wyłącznie układ i style konstrukcyjne.
 * Kolory / tła / obramowania klienta ustawiamy w style-custom.css.
 * ======================================================= */

.single-nekrolog.memory-page {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin: 40px 0;
    padding: 0 !important;
    text-align: left;
    color: inherit;
}

.memory-page__inner {
    box-sizing: border-box;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 25px;
}

.memory-page__statusbar {
    width: 100%;
}

.memory-page__statusbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    box-sizing: border-box;
    width: 100%;
    max-width: 1300px;
    min-height: 58px;
    margin: 0 auto;
    padding: 10px 25px;
}

.memory-page__statusbar, .memory-page__candles{
    border-left: 0px !important;
    border-right: 0px !important;
}

.memory-page__statusbar-intro,
.memory-page__statusbar-steps {
    display: flex;
    align-items: center;
}

.memory-page__statusbar-intro {
    min-width: 0;
    gap: 18px;
}

.memory-page__service-card a.nekrolog__button{
    width: 100%;
    margin-top: 14px;
}

.memory-page__statusbar-pill {
    flex: 0 0 auto;
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.memory-page__statusbar-text {
    min-width: 0;
    font-size: 13px;
    line-height: 1.4;
}

.memory-page__statusbar-steps {
    flex: 0 0 auto;
    gap: 13px;
    font-size: 12px;
    line-height: 1.2;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.memory-page__statusbar-steps strong {
    font-weight: 500;
}

.memory-page__statusbar-separator {
    display: inline-block;
    width: 30px;
    height: 1px;
}

.memory-page__hero {
    margin: 0 auto;
    text-align: center;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.memory-page__eyebrow {
    margin-bottom: 22px;
}

.memory-page__portrait-wrap {
    width: 400px;
    height: 400px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.memory-page__portrait {
    max-width: 100%;
    object-fit: cover;
}

.memory-page__portrait:not(.single-nekrolog__img--photo) {
    object-fit: contain;
    padding: 14px;
}

.memory-page__name {
    margin: 0;
    text-align: center;
}

.memory-page__dates {
    margin: 12px auto 0;
    text-align: center;
}

.memory-page__motto {
    max-width: 760px;
    margin: 24px auto 24px;
    text-align: center;
    font-style: italic;
    line-height: 1.7;
}

.memory-page__hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
}

.memory-page__hero-divider {
    margin-top: 42px;
    margin-bottom: 42px;
}

.memory-page__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 46px;
    align-items: start;
}

.memory-page__video-card, 
.memory-page__audio-content, 
.memory-page__main,
.memory-page__sidebar {
    min-width: 0;
}

.memory-page__section {
    margin: 0;
    padding: 0 0 54px;
}

.memory-page__section-title,
.memory-page__card-title {
    margin: 0;
    font-size: clamp(22px, 2vw, 30px);
    line-height: 1.2;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.memory-page__section-title {
    padding-bottom: 13px;
    margin-bottom: 22px;
}

.memory-page__section-heading-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 13px;
    margin-bottom: 22px;
}

.memory-page__section-heading-row .memory-page__section-title {
    padding: 0;
    margin: 0;
    border: 0;
}

.memory-page__gallery-count {
    font-size: 12px;
    white-space: nowrap;
}

.memory-page__richtext {
    line-height: 1.75;
}

.memory-page__timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}

.memory-page__timeline-item {
    display: grid;
    grid-template-columns: 82px 18px minmax(0, 1fr);
    gap: 13px;
    min-height: 58px;
    margin: 0;
    padding: 0;
}

.memory-page__timeline-year {
    padding-top: 1px;
    text-align: right;
    font-size: 13px;
}

.memory-page__timeline-marker {
    position: relative;
    width: 18px;
    min-height: 58px;
}

.memory-page__timeline-marker::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 7px;
    bottom: -7px;
    width: 1px;
}

.memory-page__timeline-marker::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 6px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.memory-page__timeline-text {
    padding-bottom: 22px;
    line-height: 1.55;
}

.memory-page__gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.memory-page__gallery-item {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.memory-page__gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.memory-page__gallery-item:hover img {
    transform: scale(1.035);
}

.memory-page__gallery-toggle-wrap {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.single-nekrolog .memory-page__gallery-toggle {
    width: auto !important;
}

.memory-page__gallery-toggle-icon {
    margin-right: 0;
    margin-left: 7px;
    transition: transform .25s ease;
}

.memory-page__candle-arrow--next .nekrolog_icon,
.memory-page__text-toggle[aria-expanded="true"] .nekrolog_icon, 
.memory-page__gallery-toggle.is-expanded .memory-page__gallery-toggle-icon {
    transform: rotate(180deg);
}

.memory-page__sidebar {
    display: grid;
    gap: 18px;
}

.memory-page__card {
    padding: 18px;
}

.memory-page__card-title {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 12px;
    margin-bottom: 14px;
    font-size: 17px;
}

.memory-page__card-title .nekrolog_icon {
    flex: 0 0 auto;
    margin-right: 2px;
}

.memory-page__grave-photo {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    margin-bottom: 15px;
}

.memory-page__cemetery-name,
.memory-page__cemetery-address {
    margin: 0 0 6px;
    line-height: 1.45;
}

.memory-page__grave-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 16px;
}

.memory-page__grave-grid > div {
    min-width: 0;
    padding: 9px 5px;
    text-align: center;
}

.memory-page__grave-grid span,
.memory-page__grave-grid strong {
    display: block;
}

.memory-page__grave-grid span {
    margin-bottom: 3px;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: inherit;
}

.memory-page__grave-grid strong {
    font-size: 13px;
}

.single-nekrolog .memory-page__card-button {
    width: 100% !important;
    margin-top: 14px;
}

.memory-page__service-description {
    margin: 0;
    font-size: 1rem;
    line-height: 1.55;
}

.memory-page__card--placeholder p {
    margin: 0;
    line-height: 1.55;
}

@media (max-width: 1100px) {
    .memory-page__statusbar-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .memory-page__statusbar-steps {
        flex-wrap: wrap;
        white-space: normal;
    }
}

@media (max-width: 767px) {
    .memory-page__statusbar-inner {
        padding: 12px 15px;
    }

    .memory-page__statusbar-intro {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .memory-page__statusbar-pill {
        padding: 6px 12px;
        font-size: 12px;
    }

    .memory-page__statusbar-steps {
        gap: 8px;
        font-size: 12px;
    }

    .memory-page__statusbar-separator {
        width: 16px;
    }
}

@media (max-width: 960px) {
    .memory-page__layout {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .memory-page__sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-bottom: 40px;
    }
}

.memory-page__candle-arrow .nekrolog_icon{
    top: 0 !important;
}

@media (max-width: 767px) {
    .memory-page__candle-slider {
        padding: 0 34px;
    }

    .memory-page__candle-arrow {
        width: 28px;
        height: 42px;
    }

    .single-nekrolog.memory-page {
        margin-top: 25px;
    }

    .memory-page__inner {
        padding-right: 15px;
        padding-left: 15px;
    }

    .memory-page__hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .single-nekrolog .memory-page__hero-actions .nekrolog__button {
        width: 100% !important;
    }

    .memory-page__gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .memory-page__sidebar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .memory-page__timeline-item {
        grid-template-columns: 62px 16px minmax(0, 1fr);
        gap: 9px;
    }

    .memory-page__timeline-marker {
        width: 16px;
    }

    .memory-page__timeline-marker::before {
        left: 7px;
    }

    .memory-page__timeline-marker::after {
        left: 4px;
    }
}


/* =========================================================
 * STRONA PAMIĘCI - FILMY I NAGRANIA
 * ---------------------------------------------------------
 * Układ i mechanika. Kolorystyka korzysta wyłącznie ze
 * zmiennych Strony Pamięci z style-custom.css.
 * ======================================================= */
.memory-page__moderation-notice {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 12px 0 0px;
    font-size: 12px;
    line-height: 1.5;
}

.memory-page__moderation-notice .memory-page__moderation-icon {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    margin: 0;
    background-color: currentColor;
}

.memory-page__video-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.memory-page__video-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.memory-page__video,
.memory-page__video-poster {
    display: block;
    width: 100%;
    height: 100%;
}

.memory-page__video {
    object-fit: contain;
}

.memory-page__video-poster {
    position: relative;
    overflow: hidden;
}

.memory-page__video-poster-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.memory-page__video-poster-placeholder {
    position: absolute;
    inset: 0;
}

.memory-page__video-play {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin: 0;
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: transform .2s ease, border-color .2s ease;
}

.memory-page__video-play:hover,
.memory-page__video-play:focus-visible {
    outline: none;
    transform: translate(-50%, -50%) scale(1.05);
}

.memory-page__video-play > span {
    width: 0;
    height: 0;
    margin-left: 4px;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 13px solid currentColor;
}

.memory-page__candles-title{
    border-bottom: 0;
}

.memory-page__video-meta {
    padding: 11px 13px 12px;
}

.memory-page__video-title {
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
}

.memory-page__video-caption {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.4;
}

.memory-page__audio-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.memory-page__audio-player {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-width: 0;
    padding: 11px 13px;
}

.memory-page__audio-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin: 0;
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: border-color .2s ease, transform .2s ease;
}

.memory-page__audio-toggle:hover,
.memory-page__audio-toggle:focus-visible {
    border-color: currentColor;
    outline: none;
}

.memory-page__audio-toggle:active {
    transform: scale(.96);
}

.memory-page__audio-play-icon {
    display: block;
    width: 0;
    height: 0;
    margin-left: 3px;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 9px solid currentColor;
}

.memory-page__audio-player.is-playing .memory-page__audio-play-icon {
    width: 9px;
    height: 12px;
    margin-left: 0;
    border: 0;
    background: linear-gradient(to right, currentColor 0 3px, transparent 3px 6px, currentColor 6px 9px);
}

.memory-page__audio-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
}

.memory-page__audio-title {
    overflow-wrap: anywhere;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 500;
}

.memory-page__audio-desc,
.memory-page__audio-duration {
    font-size: 12px;
    line-height: 1.35;
}

.memory-page__audio-desc {
    margin-top: 3px;
}

.memory-page__audio-duration {
    flex: 0 0 auto;
    padding-top: 2px;
    white-space: nowrap;
}

.memory-page__audio-progress {
    position: relative;
    display: block;
    width: 100%;
    height: 15px;
    margin: 7px 0 0;
    padding: 7px 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.memory-page__audio-progress::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 7px;
    height: 3px;
}

.memory-page__audio-progress-fill {
    position: absolute;
    z-index: 1;
    left: 0;
    top: 7px;
    width: 0;
    height: 3px;
    pointer-events: none;
}

@media (max-width: 767px) {
    .memory-page__video-grid {
        grid-template-columns: 1fr;
    }

    .memory-page__audio-player {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 9px;
        padding: 10px;
    }

    .memory-page__audio-toggle {
        width: 34px;
        height: 34px;
    }
}

/* =========================================================
 * STRONA PAMIĘCI - WIRTUALNE ZNICZE
 * ---------------------------------------------------------
 * Tylko układ i mechanika. Kolory są pobierane ze zmiennych
 * Strony Pamięci ustawianych w style-custom.css.
 * ======================================================= */
.memory-page__candles {
position: relative;
    left: auto;
    width: 100%;
    max-width: 100%;
    margin: 42px 0 54px;
    padding: 0;
}

.memory-page__candles-inner {
    box-sizing: border-box;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 28px 25px;
}

.memory-page__candles-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 22px;
}

.memory-page__candles-title {
    margin-bottom: 8px;
    padding-bottom: 0;
    border-bottom: 0;
}

.memory-page__candles-description,
.memory-page__candles-stats {
    margin: 0;
}

.memory-page__candles-description {
    line-height: 1.55;
}

.memory-page__candles-stats {
    flex: 0 0 auto;
    padding-top: 5px;
    font-size: 13px;
    white-space: nowrap;
}

.memory-page__candle-slider {
    position: relative;
    margin-bottom: 18px;
    padding: 0 44px;
}

.memory-page__candle-viewport {
    width: 100%;
    overflow: hidden;
    outline: none;
}

.memory-page__candle-viewport:focus-visible {
    outline-offset: 4px;
}

.memory-page__candle-list {
    display: flex;
    width: 100%;
    transition: transform .38s cubic-bezier(.22, .61, .36, 1);
    will-change: transform;
}

.memory-page__candle-page {
    display: grid;
    flex: 0 0 100%;
    grid-template-columns: repeat(var(--bb-candle-columns, 6), minmax(0, 1fr));
    gap: 10px;
    align-content: start;
}

.memory-page__candle-arrow {
    position: absolute;
    z-index: 2;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 46px;
    margin: 0;
    padding: 0;
    border-radius: 0;
    cursor: pointer;
    transform: translateY(-50%);
    transition: border-color .2s ease, background-color .2s ease, opacity .2s ease, transform .2s ease;
}

.memory-page__candle-arrow:active:not(:disabled) {
    transform: translateY(-50%) scale(.96);
}

.memory-page__candle-arrow:disabled {
    cursor: default;
    opacity: .24;
}

.memory-page__candle-arrow--prev {
    left: 0;
}

.memory-page__candle-arrow--next {
    right: 0;
}

.memory-page__candle-arrow .nekrolog_icon {
    width: 17px;
    height: 17px;
    margin: 0;
    background-color: currentColor;
}

.memory-page__candle-card {
    min-width: 0;
    min-height: 124px;
    padding: 16px 10px 13px;
    text-align: center;
}

.memory-page__candle-visual {
    position: relative;
    display: block;
    width: 58px;
    height: 44px;
    margin: 0 auto 10px;
}

.memory-page__candle-glow {
    position: absolute;
    left: 50%;
    top: 52%;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(.95);
    filter: blur(7px);
    opacity: .44;
    pointer-events: none;
    animation: bb-memory-candle-glow 3.2s ease-in-out infinite;
}

.memory-page__candle-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    display: block;
    width: 30px;
    height: 30px;
    margin: 0;
    transform: translate(-50%, -50%) scale(1);
    animation: bb-memory-candle-flame 2.4s ease-in-out infinite;
}

@keyframes bb-memory-candle-glow {
    0%,
    100% {
        transform: translate(-50%, -50%) scale(.92);
        opacity: .28;
    }

    35% {
        transform: translate(-50%, -50%) scale(1.08);
        opacity: .58;
    }

    70% {
        transform: translate(-50%, -50%) scale(1);
        opacity: .42;
    }
}

@keyframes bb-memory-candle-flame {
    0%,
    100% {
        transform: translate(-50%, -50%) scale(.96);
    }

    25% {
        transform: translate(-50%, -52%) scale(1.04);
    }

    50% {
        transform: translate(-50%, -49%) scale(1);
    }

    75% {
        transform: translate(-50%, -51%) scale(1.06);
    }
}

.memory-page__candle-title {
    overflow-wrap: anywhere;
    font-size: 14px;
    line-height: 1.35;
}

.memory-page__candle-time {
    margin-top: 7px;
    font-size: 12px;
    line-height: 1.35;
}

.memory-page__candle-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 8px;
    max-width: 680px;
}

.memory-page__candle-input-wrap {
    display: block;
    min-width: 0;
}

.single-nekrolog.memory-page .memory-page__candle-form input[type="text"] {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    min-height: 44px;
    margin: 0 !important;
    padding: 10px 13px !important;
    border-radius: 0;
    font: inherit;
}

.single-nekrolog.memory-page .memory-page__candle-form input[type="text"]::placeholder {
    opacity: .8;
}

.single-nekrolog.memory-page .memory-page__candle-submit {
    width: auto !important;
    min-height: 44px;
    margin: 0 !important;
    white-space: nowrap;
}

.memory-page__candle-submit[disabled] {
    cursor: wait;
    opacity: .65;
}

.memory-page__candle-message {
    min-height: 20px;
    margin-top: 9px;
    font-size: 13px;
    line-height: 1.4;
    padding: 5px;
    font-weight: 600;
}

@media (max-width: 767px) {
    .memory-page__candles {
        margin-top: 30px;
        padding: 0;
    }

    .memory-page__candles-inner {
        padding: 20px 15px;
    }

    .memory-page__candles-heading {
        display: block;
    }

    .memory-page__candles-stats {
        margin-top: 12px;
        white-space: normal;
    }

    .memory-page__candle-form {
        grid-template-columns: 1fr;
    }

    .single-nekrolog.memory-page .memory-page__candle-submit {
        width: 100% !important;
    }
}


/* =========================================================
 * STRONA PAMIĘCI - KOD QR
 * Kolory dziedziczą zmienne ustawiane w style-custom.css.
 * ======================================================= */
.memory-page__qr-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 16px 0 13px;
    padding: 14px;
    background: #fff;
}

.memory-page__qr-image {
    display: block;
    width: min(100%, 260px);
    height: auto;
    aspect-ratio: 1 / 1;
}

.memory-page__qr-description,
.memory-page__qr-error {
    margin: 0 0 15px;
    line-height: 1.5;
}

.single-nekrolog.memory-page .memory-page__qr-download {
    width: 100% !important;
    justify-content: center;
}


/* =========================================================
 * STRONA PAMIĘCI - WSPOMNIENIA I KONDOLENCJE
 * ---------------------------------------------------------
 * Układ i mechanika. Kolory dziedziczą zmienne Strony Pamięci
 * definiowane przez klienta w style-custom.css.
 * ======================================================= */
.memory-page__entry-count {
    flex: 0 0 auto;
    font-size: 12px;
}

.memory-page__entry-list {
    display: grid;
    gap: 10px;
}

.memory-page__entry-card {
    padding: 17px 18px 15px;
}

.memory-page__entry-card--condolence{
    padding-top: 5px;
    padding-bottom: 5px;
}

.memory-page__entry-content {
    font-size: 14px;
    line-height: 1.65;
}
.memory-page__entry-content > :first-child, 
.memory-page__richtext > *:first-child, 
.memory-page__grave-cleaning-modal-text > :first-child {
    margin-top: 0;
}

.memory-page__motto p:last-child,
.memory-page__entry-content > :last-child, 
.memory-page__richtext > *:last-child, 
.memory-page__grave-cleaning-modal-text > :last-child {
    margin-bottom: 0;
}

.memory-page__entry-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 13px;
    font-size: 12px;
    line-height: 1.4;
}

.memory-page__entries-empty {
    margin: 0 0 15px;
    font-size: 13px;
}

.memory-page__text-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 11px 0 0;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    cursor: pointer;
}

.memory-page__text-toggle .nekrolog_icon {
    width: 13px;
    height: 13px;
    margin: 0;
    background-color: currentColor;
    transition: transform .2s ease;
}

.single-nekrolog.memory-page .memory-page__entry-toggle {
    width: auto !important;
    margin: 16px 0 0 !important;
}

.memory-page__media-form-grid, 
.memory-page__entry-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.memory-page__entry-field small {
    font-size: 12px;
    font-weight: 500;
}

.memory-page__media-field--wide, 
.memory-page__entry-field--wide {
    grid-column: 1 / -1;
}

.single-nekrolog.memory-page .memory-page__entry-form input[type="text"],
.single-nekrolog.memory-page .memory-page__entry-form input[type="email"],
.single-nekrolog.memory-page .memory-page__entry-form textarea {
    box-sizing: border-box;
    width: 100%;
    margin: 0 !important;
    padding: 11px 12px !important;
    border-radius: 0;
    font: inherit;
    line-height: 1.45;
    resize: vertical;
}

.single-nekrolog.memory-page input[type="text"],
.single-nekrolog.memory-page input[type="email"],
.single-nekrolog.memory-page input[type="url"]{
    min-height: 42px;
}

.memory-page__media-submit[disabled], 
.memory-page__entry-submit[disabled] {
    cursor: wait;
    opacity: .6;
}

.memory-page__entry-submit.is-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.memory-page__entry-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    box-sizing: border-box;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: bb-memory-entry-spin .7s linear infinite;
}

@keyframes bb-memory-entry-spin {
    to {
        transform: rotate(360deg);
    }
}

.memory-page__entry-message {
    min-height: 20px;
    margin-top: 7px;
    font-size: 12px;
    line-height: 1.4;
}

.memory-page__entry-message.is-processing {
    margin-top: 10px;
    padding: 10px 12px;
    font-weight: 600;
}

.memory-page__candle-honeypot, 
.memory-page__entry-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

@media (max-width: 767px) {
    .memory-page__entry-form {
        padding: 15px;
    }

    .memory-page__entry-form-grid {
        grid-template-columns: 1fr;
    }

    .memory-page__entry-field--wide {
        grid-column: auto;
    }

    .single-nekrolog.memory-page .memory-page__entry-toggle,
    .single-nekrolog.memory-page .memory-page__entry-submit {
        width: 100% !important;
    }
}

/* =========================================================
 * STRONA PAMIĘCI - DODAWANIE MULTIMEDIÓW Z FRONTU
 * ---------------------------------------------------------
 * Układ i mechanika. Kolorystyka dziedziczy zmienne
 * Strony Pamięci z style-custom.css.
 * ======================================================= */
.memory-page__media-empty {
    margin: 0 0 16px;
    font-size: 13px;
}

.memory-page__media-contribute {
    margin-top: 18px;
}

.memory-page__media-contribute-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.memory-page__entry-form, 
.memory-page__media-form {
    margin-top: 14px;
    padding: 18px;
}

.memory-page__entry-field, 
.memory-page__media-field {
    display: block;
    min-width: 0;
    font-size: 12px;
}

.memory-page__entry-field > span, 
.memory-page__media-field > span {
    display: block;
    margin-bottom: 6px;
}

.memory-page__media-field > small,
.memory-page__media-field span small {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
}

.single-nekrolog.memory-page .memory-page__media-form input,
.single-nekrolog.memory-page .memory-page__media-form textarea {
    box-sizing: border-box;
    width: 100%;
    margin: 0 !important;
    padding: 11px 12px !important;
    border-radius: 0;
    font: inherit;
    line-height: 1.45;
}

.single-nekrolog.memory-page .memory-page__media-form textarea {
    resize: vertical;
}

.single-nekrolog.memory-page input::placeholder,
.single-nekrolog.memory-page textarea::placeholder {
    opacity: .72;
}

.single-nekrolog.memory-page .memory-page__media-form input[type="file"] {
    padding: 9px !important;
    cursor: pointer;
}

.memory-page__recorder {
    margin-top: 14px;
    padding: 14px;
}

.memory-page__recorder-heading {
    margin-bottom: 10px;
    font-size: 12px;
    line-height: 1.45;
}

.memory-page__recorder-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.memory-page__recorder-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    margin: 0;
    padding: 8px 11px;
    border-radius: 0;
    background: transparent;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: border-color .2s ease, opacity .2s ease;
}

.memory-page__recorder-button:disabled {
    cursor: default;
    opacity: .45;
}

.memory-page__recorder-button .nekrolog_icon {
    width: 15px;
    height: 15px;
    margin: 0;
    background-color: currentColor;
}

.memory-page__recorder-status {
    font-size: 12px;
}

.memory-page__recorder-preview {
    width: 100%;
    margin-top: 12px;
}

.memory-page__entry-note, 
.memory-page__recorder-fallback {
    margin: 10px 0 0;
    font-size: 12px;
    line-height: 1.45;
}

.memory-page__media-upload-progress {
    position: relative;
    width: 100%;
    height: 4px;
    margin-top: 14px;
    overflow: hidden;
}

.memory-page__media-upload-progress > span {
    display: block;
    width: 0;
    height: 100%;
    transition: width .16s linear;
}

.memory-page__media-form-actions {
    margin-top: 14px;
}

.single-nekrolog.memory-page .memory-page__entry-submit, 
.single-nekrolog.memory-page .memory-page__media-contribute-actions .nekrolog__button, 
.single-nekrolog.memory-page .memory-page__media-submit {
    width: auto !important;
    margin: 0 !important;
}

.memory-page__media-message {
    min-height: 20px;
    margin-top: 7px;
    font-size: 12px;
    line-height: 1.45;
}

.memory-page__care-login-message.is-error, 
.memory-page__entry-field.is-invalid > span, 
.memory-page__media-field.is-invalid > span, 
.memory-page__entry-meta strong, 
.memory-page__entry-message.is-error, 
.memory-page__media-message.is-error {
    font-weight: 600;
}

@media (max-width: 767px) {
    .memory-page__media-form-grid {
        grid-template-columns: 1fr;
    }

    .memory-page__media-field--wide {
        grid-column: auto;
    }

    .memory-page__media-contribute-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .single-nekrolog.memory-page .memory-page__media-contribute-actions .nekrolog__button,
    .single-nekrolog.memory-page .memory-page__media-submit {
        width: 100% !important;
    }

    .memory-page__recorder-actions {
        align-items: stretch;
    }

    .memory-page__recorder-button {
        flex: 1 1 auto;
    }
}


/* =========================================================
 * STRONA PAMIĘCI - OPIEKA NAD STRONĄ / ETAP 1
 * Kolory pobierane ze zmiennych Strony Pamięci.
 * ======================================================= */
.memory-page__care-card .memory-page__card-button {
    width: 100% !important;
}

.memory-page__care-logout {
    display: inline-block;
    margin-top: 12px;
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.memory-page__care-modal .modal-content {
    width: min(460px, calc(100% - 30px));
    max-width: 460px;
}

.memory-page__care-login-form {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}

.memory-page__care-login-form > label:not(.memory-page__care-remember) {
    display: grid;
    gap: 6px;
}

.memory-page__care-login-form input[type="text"],
.memory-page__care-login-form input[type="password"] {
    box-sizing: border-box;
    width: 100% !important;
    min-height: 44px;
    padding: 9px 12px;
    border-radius: 0;
    background: transparent;
    font: inherit;
}

.memory-page__care-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* Logowanie opiekuna na publicznej Stronie Pamięci nie korzysta ze stylów przycisków e-Nekrologu. */
.memory-page__care-login-button {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 10px 18px;
    border: 1px solid #222;
    border-radius: 4px;
    background: #222;
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.memory-page__care-login-button:hover,
.memory-page__care-login-button:focus-visible {
    border-color: #3a3a3a;
    background: #3a3a3a;
    color: #fff;
    outline: none;
}

.memory-page__care-login-message {
    min-height: 18px;
    margin: 0;
    font-size: 13px;
    padding: 5px;
}

.memory-page__care-lost-password {
    margin: -3px 0 0;
    text-align: center;
    font-size: 13px;
}

/* =========================================================
 * STRONA PAMIĘCI - UX FORMULARZY PUBLICZNYCH
 * Błędy są semantyczne i niezależne od kolorystyki klienta.
 * ======================================================= */
.memory-page__entry-form-actions, 
.memory-page__moderation-notice--form {
    margin-top: 13px;
}

.memory-page__candle-arrow:hover:not(:disabled),
.memory-page__candle-arrow:focus-visible:not(:disabled), 
.memory-page__recorder-button:hover:not(:disabled),
.memory-page__recorder-button:focus-visible:not(:disabled), 
.single-nekrolog.memory-page .is-invalid input,
.single-nekrolog.memory-page .is-invalid textarea {
    outline: none;
}

.memory-page__field-error {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    padding: 5px;
}

.memory-page__entry-message.is-error,
.memory-page__media-message.is-error,
.memory-page__entry-message.is-success,
.memory-page__media-message.is-success{
    margin-top: 10px;
    padding: 10px 12px;
    font-weight: 600;
}


/* =========================================================
 * STRONA PAMIĘCI - CIĄGŁOŚĆ MODUŁÓW E-NEKROLOGU
 * ======================================================= */
.memory-page__epamiatka {
    width: 100%;
    margin: 50px 0 0;
    padding: 0;
}

.memory-page__epamiatka .qr__container {
    box-sizing: border-box;
    width: min(800px, 100%);
}

@media (max-width: 767px) {
    .memory-page__epamiatka {
        margin-top: 20px;
    }
}

/* Przyciski poprawa */
.single-nekrolog .memory-page__hero-actions .nekrolog__button,
.single-nekrolog.memory-page .memory-page__hero-actions .nekrolog__button {
    width: auto !important;
    max-width: 100% !important;
}

@media (max-width: 767px) {
    .single-nekrolog.memory-page .memory-page__hero-actions .nekrolog__button {
        width: 100% !important;
    }
}

.memory-page__care-app .is-success{
    padding: 5px;
}

.memory-page__entry-card--memory .memory-page__entry-content{
    font-style:italic;
}

/* Upload multimediów: jednoznaczna informacja, że przesyłanie trwa. */
.memory-page__timeline-item:last-child .memory-page__timeline-marker::before,
.memory-page__candle-list:empty,
.single-nekrologi *[hidden], 
.memory-page__media-upload-status[hidden],
.memory-page__media-upload-progress[hidden] {
    display: none !important;
}

.memory-page__media-upload-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    font-size: 13px;
    line-height: 1.4;
}

.memory-page__media-upload-status::before {
    content: '';
    flex: 0 0 9px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: currentColor;
    animation: bb-memory-upload-pulse 1s ease-in-out infinite;
}

.memory-page__media-upload-status strong {
    flex: 1 1 auto;
    font-weight: 600;
}

.memory-page__media-upload-status > span {
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
}

.memory-page__media-upload-progress {
    position: relative;
}

.memory-page__media-upload-progress::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 36%;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    color: currentColor;
    opacity: .18;
    transform: translateX(-130%);
    animation: bb-memory-upload-shimmer 1.15s linear infinite;
    pointer-events: none;
}

.memory-page__media-upload-progress.is-complete::after {
    animation: none;
    opacity: 0;
}

.memory-page__media-upload-progress.is-processing > span {
    width: 100% !important;
    animation: bb-memory-upload-fill-pulse .9s ease-in-out infinite;
}

@keyframes bb-memory-upload-shimmer {
    from { transform: translateX(-130%); }
    to { transform: translateX(380%); }
}

@keyframes bb-memory-upload-pulse {
    0%, 100% { opacity: .35; transform: scale(.8); }
    50% { opacity: 1; transform: scale(1.12); }
}

@keyframes bb-memory-upload-fill-pulse {
    0%, 100% { opacity: .55; }
    50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .memory-page__media-upload-status::before,
    .memory-page__media-upload-progress::after,
    .memory-page__media-upload-progress.is-complete::after {
    animation: none;
    opacity: 0;
}

.memory-page__media-upload-progress.is-processing > span {
        animation: none;
    }
}

.memory-page__video--embed {
    border: 0;
}
.memory-page__private-gallery .private-gallery-container {
    margin: 0;
    padding: 0;
    max-width: none;
}

.memory-page__private-gallery .private-gallery-password-form {
    margin: 20px 0 0;
    padding: 0;
    max-width: 620px;
}

.memory-page__private-gallery .private-gallery-logout {
    margin-top: 24px;
    text-align: center;
}
.memory-page__gallery-group + .memory-page__gallery-group {
    margin-top: 34px;
}

.memory-page__gallery-subheading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.memory-page__gallery-subtitle {
    margin: 0 0 18px;
    font-size: 22px;
    font-weight: 500;
}

.memory-page__gallery-subheading-row .memory-page__gallery-subtitle {
    margin-bottom: 0;
}

.memory-page__gallery-videos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.memory-page__gallery-video {
    display: block;
    width: 100%;
    max-height: 560px;
    background: #111;
}

.memory-page__gallery-video-embed { position: relative; aspect-ratio: 16 / 9; background: #111; }
.memory-page__gallery-video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

@media (max-width: 700px) {
    .memory-page__gallery-videos {
        grid-template-columns: 1fr;
    }
}
