/* Nasłonecznienie — duży popup z aplikacją (Twoja Przystań / MarioCMS) */

.sunlight-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 20px;
}

.sunlight-modal[hidden] {
    display: none !important;
}

.sunlight-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(28, 25, 22, 0.72);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.sunlight-modal__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(1240px, 100%);
    max-height: 100%;
    margin: auto;
    background: #f9f8f5;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4);
    border-radius: 0;
    animation: psm-in 0.25s ease-out;
}

.sunlight-modal__panel,
.sunlight-modal__panel * {
    border-radius: 0 !important;
}

@keyframes psm-in {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.sunlight-modal__bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    padding: 10px 14px;
    background: #2c2825;
    color: #fff;
}

.sunlight-modal__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 18px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 9999px;
    background: transparent;
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.sunlight-modal__back:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.5);
}

.sunlight-modal__back:focus-visible,
.sunlight-modal__x:focus-visible {
    outline: 2px solid #b5945d;
    outline-offset: 2px;
}

.sunlight-modal__title {
    flex: 1 1 auto;
    min-width: 0;
    display: block;
    text-align: center;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: rgba(255, 255, 255, 0.85);
}

.sunlight-modal__x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 9999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.sunlight-modal__x:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.sunlight-modal__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 22px 18px 26px;
    background: #f9f8f5;
}

.sunlight-modal__body #przystan-sun {
    max-width: 1080px;
    margin: 0 auto;
}

@media (max-width: 640px) {
    .sunlight-modal {
        padding: 0;
    }

    .sunlight-modal__panel {
        width: 100%;
        max-height: none;
        height: 100%;
    }

    .sunlight-modal__title {
        display: none;
    }

    .sunlight-modal__body {
        padding: 14px 10px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sunlight-modal__panel {
        animation: none;
    }
}

/* ===== Moduł nasłonecznienia ===== */

#przystan-sun {
    --ps-paper: #fffefa;
    --ps-warm: #f9f8f5;
    --ps-ink: #2c2825;
    --ps-muted: #69635c;
    --ps-gold: #b5945d;
    --ps-button: #2c2825;
    --ps-button-text: #fffefa;
    --ps-line: #e8e3d9;
    --ps-soft: #f2eee6;
    --ps-stage: #e9eee7;
    --ps-green: #59795a;
    --ps-shadow: #797c71;
    color: var(--ps-ink);
    background: var(--ps-paper);
    border: 1px solid var(--ps-line);
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(44, 40, 37, 0.09);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    line-height: 1.55;
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

#przystan-sun * {
    box-sizing: border-box;
}

#przystan-sun [hidden] {
    display: none !important;
}

#przystan-sun button {
    cursor: pointer;
}

#przystan-sun .ps-header {
    padding: 25px 28px 21px;
}

#przystan-sun .ps-eyebrow {
    color: var(--ps-muted);
    font-size: 11px;
    letter-spacing: 0.11em;
    font-weight: 500;
}

#przystan-sun h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 25px;
    line-height: 1.2;
    font-weight: 500;
    letter-spacing: -0.025em;
    margin: 9px 0 8px;
    color: var(--ps-ink);
}

#przystan-sun .ps-header p {
    margin: 0;
    color: var(--ps-muted);
    font-size: 13px;
}

#przystan-sun .ps-header p span {
    margin: 0 6px;
    color: var(--ps-gold);
}

#przystan-sun .ps-summary-block {
    margin: 0 28px 18px;
}

#przystan-sun #ps-summary {
    margin: 0 0 7px;
    color: var(--ps-ink);
    font-size: 13px;
    line-height: 1.5;
}

#przystan-sun #ps-target {
    margin: 0;
    color: var(--ps-muted);
    font-size: 12px;
    line-height: 1.4;
}

#przystan-sun .ps-data-note {
    margin: 8px 0 0;
    color: var(--ps-muted);
    font-size: 12px;
    line-height: 1.5;
}

#przystan-sun .ps-toolbar {
    display: flex;
    align-items: end;
    gap: 10px;
    flex-wrap: wrap;
    padding: 0 28px 18px;
}

#przystan-sun .ps-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 185px;
    min-width: 0;
    color: var(--ps-muted);
    font-size: 12px;
}

#przystan-sun select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--ps-line);
    border-radius: 9px;
    background: var(--ps-warm);
    color: var(--ps-ink);
    font-family: inherit;
    font-size: 14px;
    padding: 9px 32px 9px 12px;
}

#przystan-sun button {
    min-height: 44px;
    border-radius: 9px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

#przystan-sun .ps-play {
    border: 1px solid var(--ps-button);
    background: var(--ps-button);
    color: var(--ps-button-text);
    padding: 10px 17px;
    flex: 0 0 auto;
}

#przystan-sun .ps-play:hover {
    filter: brightness(1.1);
}

#przystan-sun .ps-view {
    display: flex;
    align-items: center;
    gap: 3px;
    background: var(--ps-soft);
    padding: 3px;
    border-radius: 11px;
    min-width: 0;
}

#przystan-sun .ps-view button {
    border: 0;
    background: transparent;
    color: var(--ps-muted);
    min-height: 38px;
    padding: 8px 11px;
}

#przystan-sun .ps-view button[aria-pressed=true] {
    background: var(--ps-paper);
    color: var(--ps-ink);
    box-shadow: 0 1px 5px rgba(44, 40, 37, 0.08);
}

#przystan-sun .ps-compare-button {
    padding: 10px 14px;
    border: 1px solid var(--ps-line);
    background: var(--ps-warm);
    color: var(--ps-ink);
}

#przystan-sun .ps-compare-button[aria-pressed=true] {
    border-color: var(--ps-button);
    background: var(--ps-button);
    color: var(--ps-button-text);
}

#przystan-sun .ps-compare-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    margin: 0 16px 9px;
}

#przystan-sun .ps-compare-caption {
    text-align: center;
    color: var(--ps-ink);
    font-size: 12px;
    font-weight: 500;
}

#przystan-sun .ps-compare-tabs {
    display: none;
}

#przystan-sun .ps-compare-tabs button {
    flex: 1 1 0;
    min-width: 0;
    border: 1px solid var(--ps-line);
    padding: 8px 5px;
    background: var(--ps-warm);
    color: var(--ps-muted);
    font-size: 12px;
}

#przystan-sun .ps-compare-tabs button[aria-pressed=true] {
    background: var(--ps-button);
    border-color: var(--ps-button);
    color: var(--ps-button-text);
}

#przystan-sun #ps-scene {
    height: 440px;
    position: relative;
    margin: 0 16px;
    background: var(--ps-stage);
    border: 1px solid var(--ps-line);
    border-radius: 13px;
    overflow: hidden;
    isolation: isolate;
}

#przystan-sun #ps-scene canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#przystan-sun .ps-loading {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: var(--ps-paper);
    color: var(--ps-muted);
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(44, 40, 37, 0.09);
    max-width: 85%;
    text-align: center;
    z-index: 5;
}

#przystan-sun #ps-compass {
    position: absolute;
    right: 14px;
    top: 14px;
    width: 54px;
    height: 64px;
    pointer-events: none;
    z-index: 3;
}

#przystan-sun .ps-zoom {
    position: absolute;
    right: 14px;
    top: 86px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 3;
}

#przystan-sun .ps-zoom button {
    width: 54px;
    height: 34px;
    min-height: 0;
    padding: 0;
    border: 1px solid var(--ps-line);
    background: var(--ps-paper);
    color: var(--ps-ink);
    font-family: inherit;
    font-size: 20px;
    font-weight: 500;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease;
}

#przystan-sun .ps-zoom button:hover {
    background: var(--ps-soft);
}

#przystan-sun .ps-zoom button:active {
    background: var(--ps-warm);
}

#przystan-sun .ps-balcony-square,
#przystan-sun .ps-legend-balcony {
    display: inline-block;
    width: 7px;
    height: 7px;
    border: 1px solid #785f24;
    background: #f5d05b;
    flex: 0 0 auto;
}

#przystan-sun .ps-scene-caption {
    position: absolute;
    left: 12px;
    bottom: 11px;
    background: var(--ps-paper);
    color: var(--ps-muted);
    font-size: 11px;
    padding: 5px 8px;
    border-radius: 6px;
    pointer-events: none;
    z-index: 2;
}

#przystan-sun .ps-time-panel {
    padding: 20px 28px 15px;
}

#przystan-sun .ps-quick-hours {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 14px;
}

#przystan-sun .ps-quick-hours button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid var(--ps-line);
    background: var(--ps-warm);
    color: var(--ps-ink);
    font-size: 12px;
}

#przystan-sun .ps-quick-hours button[aria-pressed=true] {
    border-color: var(--ps-gold);
    background: var(--ps-soft);
}

#przystan-sun .ps-quick-clock {
    font-variant-numeric: tabular-nums;
    color: var(--ps-muted);
}

#przystan-sun .ps-time-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 10px;
}

#przystan-sun .ps-time-heading label {
    font-size: 13px;
    color: var(--ps-muted);
}

#przystan-sun #ps-clock {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 500;
    color: var(--ps-ink);
    font-variant-numeric: tabular-nums;
}

#przystan-sun #ps-time {
    width: 100%;
    min-height: 32px;
    margin: 0;
    accent-color: var(--ps-gold);
}

#przystan-sun .ps-time-ticks {
    display: flex;
    justify-content: space-between;
    color: var(--ps-muted);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    gap: 8px;
}

#przystan-sun .ps-daylight {
    margin: 0 0 12px;
}

#przystan-sun .ps-daylight-label {
    display: block;
    margin-bottom: 6px;
    color: var(--ps-muted);
    font-size: 11px;
    line-height: 1.4;
}

#przystan-sun .ps-daylight-track {
    position: relative;
    height: 7px;
    overflow: hidden;
    border-radius: 5px;
    background: var(--ps-line);
}

#przystan-sun .ps-daylight-track i {
    position: absolute;
    top: 0;
    height: 100%;
    background: var(--ps-gold);
    border-radius: 5px;
}

#przystan-sun #ps-daylight-span {
    position: absolute;
    top: 0;
    height: 100%;
    background: var(--ps-gold);
    border-radius: 5px;
}

#przystan-sun .ps-daylight-row {
    margin: 0 0 7px;
}

#przystan-sun .ps-daylight-row > span {
    display: block;
    margin-bottom: 4px;
    color: var(--ps-muted);
    font-size: 11px;
}

#przystan-sun .ps-daylight-legend {
    font-size: 11px;
    color: var(--ps-muted);
    margin-bottom: 7px;
}

#przystan-sun .ps-status-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    margin: 0 28px 17px;
    border-radius: 10px;
    background: var(--ps-soft);
    min-height: 49px;
}

#przystan-sun .ps-status-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--ps-gold);
}

#przystan-sun #ps-status {
    font-size: 13px;
    color: var(--ps-ink);
    margin: 0;
    line-height: 1.5;
}

#przystan-sun #ps-status > span {
    display: block;
}

#przystan-sun .ps-simple-note {
    margin: 0 28px 16px;
    color: var(--ps-muted);
    font-size: 12px;
    line-height: 1.5;
}

#przystan-sun .ps-bottom {
    padding: 0 28px 21px;
}

#przystan-sun .ps-legend {
    display: flex;
    gap: 17px;
    flex-wrap: wrap;
    align-items: center;
    margin: 0 0 14px;
    color: var(--ps-muted);
    font-size: 12px;
}

#przystan-sun .ps-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

#przystan-sun .ps-legend i {
    font-style: normal;
    display: inline-block;
    flex: 0 0 auto;
}

#przystan-sun .ps-legend-tree {
    width: 10px;
    height: 10px;
    background: var(--ps-green);
    border-radius: 50%;
}

#przystan-sun .ps-legend-shadow {
    width: 13px;
    height: 7px;
    border-radius: 4px;
    background: var(--ps-shadow);
    opacity: 0.65;
}

#przystan-sun .ps-legend-flat {
    width: 10px;
    height: 10px;
    background: #2e86de;
    border: 1px solid #1b5e9e;
    display: inline-block;
    flex: 0 0 auto;
}

#przystan-sun.ps-edit-mode #ps-scene canvas {
    cursor: crosshair;
}

#przystan-sun #ps-note {
    border-top: 1px solid var(--ps-line);
    padding-top: 11px;
    color: var(--ps-muted);
    font-size: 12px;
}

#przystan-sun summary {
    min-height: 32px;
    display: list-item;
    width: fit-content;
    max-width: 100%;
    padding: 4px 0;
    color: var(--ps-muted);
    cursor: pointer;
}

#przystan-sun .ps-note-content {
    padding: 3px 0 0;
    line-height: 1.55;
}

#przystan-sun .ps-note-content p {
    margin: 7px 0;
}

#przystan-sun a {
    color: var(--ps-ink);
    text-decoration-color: var(--ps-gold);
    text-underline-offset: 3px;
}

#przystan-sun #ps-badge,
#przystan-sun #ps-badge-compare {
    position: absolute;
    width: 7px;
    height: 7px;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 1px solid #735c18;
    border-radius: 0;
    background: #ffd64b;
    box-shadow: none;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 4;
}

#przystan-sun #ps-badge-compare {
    display: none;
}

#przystan-sun #ps-map-labels {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 2;
}

#przystan-sun #ps-map-labels text {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 500;
    fill: var(--ps-ink);
    paint-order: stroke;
    stroke: var(--ps-paper);
    stroke-width: 3px;
    stroke-linejoin: round;
}

#przystan-sun #ps-map-labels .ps-block-number {
    font-size: 13px;
    stroke-width: 3.5px;
}

#przystan-sun.ps-is-comparing .ps-field {
    display: none;
}

#przystan-sun.ps-compare-mobile .ps-compare-caption {
    display: none;
}

#przystan-sun.ps-compare-mobile .ps-compare-head {
    display: block;
}

#przystan-sun.ps-compare-mobile .ps-compare-tabs {
    display: flex;
    gap: 6px;
}

#przystan-sun.ps-compare-mobile .ps-compare-tabs button {
    flex: 1;
    min-width: 0;
    padding: 8px 5px;
    border: 1px solid var(--ps-line);
    background: var(--ps-warm);
    color: var(--ps-muted);
    font-size: 12px;
}

#przystan-sun.ps-compare-mobile .ps-compare-tabs button[aria-pressed=true] {
    background: var(--ps-button);
    color: var(--ps-button-text);
}

@media (max-width: 560px) {
    #przystan-sun .ps-header {
        padding: 20px 18px 18px;
    }

    #przystan-sun h2 {
        font-size: 23px;
    }

    #przystan-sun .ps-eyebrow {
        font-size: 11px;
        letter-spacing: 0.06em;
    }

    #przystan-sun .ps-summary-block {
        margin: 0 18px 16px;
    }

    #przystan-sun .ps-toolbar {
        padding: 0 18px 15px;
        gap: 9px;
    }

    #przystan-sun .ps-field {
        flex-basis: 100%;
    }

    #przystan-sun .ps-play {
        flex: 1 1 auto;
    }

    #przystan-sun .ps-view {
        flex: 0 0 auto;
    }

    #przystan-sun .ps-view button {
        padding: 8px 10px;
    }

    #przystan-sun .ps-compare-button {
        width: 100%;
    }

    #przystan-sun .ps-compare-head {
        display: block;
        margin: 0 10px 9px;
    }

    #przystan-sun .ps-compare-caption {
        display: none;
    }

    #przystan-sun .ps-compare-tabs {
        display: flex;
        gap: 6px;
    }

    #przystan-sun #ps-scene {
        height: 350px;
        margin: 0 10px;
        border-radius: 10px;
    }

    #przystan-sun .ps-time-panel {
        padding: 16px 18px 14px;
    }

    #przystan-sun .ps-time-heading {
        gap: 10px;
    }

    #przystan-sun .ps-time-heading label {
        max-width: 210px;
        font-size: 12px;
    }

    #przystan-sun #ps-clock {
        font-size: 25px;
    }

    #przystan-sun .ps-quick-hours {
        gap: 6px;
    }

    #przystan-sun .ps-quick-hours button {
        flex-direction: column;
        gap: 1px;
        padding: 7px 5px;
    }

    #przystan-sun .ps-status-row {
        margin: 0 18px 15px;
        padding: 12px 13px;
    }

    #przystan-sun .ps-simple-note {
        margin: 0 18px 15px;
    }

    #przystan-sun .ps-bottom {
        padding: 0 18px 18px;
    }

    #przystan-sun .ps-legend {
        gap: 10px 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #przystan-sun button {
        transition: none;
    }
}
