/*
 * Stadspolders Links - link detail popup (modal)
 * CSP-strikt: alle styling via dit externe stylesheet, geen inline styles.
 */

.sp-link-popup {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.sp-link-popup[hidden] {
    display: none;
}

.sp-link-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.sp-link-popup__dialog {
    position: relative;
    width: min(560px, 100%);
    max-height: 86vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    padding: 22px 22px 18px;
    color: #1d2327;
}

.sp-link-popup__title {
    margin: 0 26px 12px 0;
    font-size: 20px;
    line-height: 1.25;
    color: #1d2327;
}

.sp-link-popup__body {
    font-size: 14px;
    line-height: 1.5;
}

.sp-link-popup__body p {
    margin: 6px 0;
}

.sp-link-popup__close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #50575e;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.sp-link-popup__close:hover,
.sp-link-popup__close:focus-visible {
    background: #f0f0f1;
    color: #1d2327;
}

.sp-link-popup__close:focus-visible {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* Openingstijden-tabel */
.sp-link-popup .sp-popup-hours {
    margin: 8px 0;
}

.sp-link-popup .sp-popup-hours-table {
    width: 100%;
    font-size: 12px;
    border-collapse: collapse;
}

.sp-link-popup .sp-popup-hours-table th,
.sp-link-popup .sp-popup-hours-table td {
    padding: 4px 6px;
    border: 1px solid #dcdfe3;
    text-align: left;
}

.sp-link-popup .sp-popup-hours-table th:first-child {
    white-space: nowrap;
}

/* Icoon-links */
.sp-link-popup .sp-popup-links {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.sp-link-popup .sp-popup-icon-link {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    background: #fff;
    color: #2271b1;
    font-size: 16px;
    text-decoration: none;
}

.sp-link-popup .sp-popup-icon-link:hover,
.sp-link-popup .sp-popup-icon-link:focus-visible {
    border-color: #2271b1;
    background: #f0f6fc;
    color: #135e96;
    text-decoration: none;
}

.sp-link-popup .sp-popup-icon-link:focus-visible {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* De knop die als link wordt weergegeven in het grid */
.sp-grid-content .sp-link-trigger {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    color: #0056b3;
    text-decoration: none;
    cursor: pointer;
    text-align: left;
}

.sp-grid-content .sp-link-trigger:hover,
.sp-grid-content .sp-link-trigger:focus-visible {
    text-decoration: underline;
    color: #003f88;
}

.sp-grid-content .sp-link-trigger:focus-visible {
    outline: 2px solid #0056b3;
    outline-offset: 2px;
}

/* Voorkom scrollen van de pagina achter de popup */
html.sp-link-popup-open {
    overflow: hidden;
}

@media (max-width: 520px) {
    .sp-link-popup__dialog {
        max-height: 92vh;
        padding: 18px 16px 14px;
    }

    .sp-link-popup__title {
        font-size: 18px;
    }
}
