#map {
    height: 400px;
    width: 100%;
    margin: 20px 0;
}

.leaflet-popup-content h5 {
    margin-bottom: 12px;
}

.leaflet-popup-content p {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.leaflet-popup-content {
    margin: 13px;
    max-height: 400px;
    overflow-y: auto;
}

.leaflet-popup-content-wrapper {
    border-radius: 5px;
}

.leaflet-popup-tip-container {
    margin-top: -5px;
}

.leaflet-control-locate a {
    font-size: 1.4em;
    color: #444;
    cursor: pointer;
    position: relative;
}

.leaflet-control-locate a::before {
    content: '';
    width: 16px;
    height: 16px;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23444444'%3E%3Cpath d='M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3A8.994 8.994 0 0 0 13 3.06V1h-2v2.06A8.994 8.994 0 0 0 3.06 11H1v2h2.06A8.994 8.994 0 0 0 11 20.94V23h2v-2.06A8.994 8.994 0 0 0 20.94 13H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z'/%3E%3C/svg%3E") no-repeat center center;
}

.leaflet-control-locate.active a {
    color: #2074B6;
}

.leaflet-control-locate.active a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232074B6'%3E%3Cpath d='M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3A8.994 8.994 0 0 0 13 3.06V1h-2v2.06A8.994 8.994 0 0 0 3.06 11H1v2h2.06A8.994 8.994 0 0 0 11 20.94V23h2v-2.06A8.994 8.994 0 0 0 20.94 13H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z'/%3E%3C/svg%3E");
}

.leaflet-control-locate.following a {
    color: #FC8428;
}

.leaflet-control-locate.following a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FC8428'%3E%3Cpath d='M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3A8.994 8.994 0 0 0 13 3.06V1h-2v2.06A8.994 8.994 0 0 0 3.06 11H1v2h2.06A8.994 8.994 0 0 0 11 20.94V23h2v-2.06A8.994 8.994 0 0 0 20.94 13H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z'/%3E%3C/svg%3E");
}

/* Keep DaisyUI collapses inside the mobile viewport. Without this, the
   checkbox/title grid can size to ~412px and clip the tidal table/card body. */
.join-vertical > .collapse,
.join-vertical > .collapse > input[type="checkbox"],
.join-vertical > .collapse > .collapse-title,
.join-vertical > .collapse > .collapse-content {
    box-sizing: border-box;
    max-width: 100%;
}

.join-vertical > .collapse > input[type="checkbox"],
.join-vertical > .collapse > .collapse-title,
.join-vertical > .collapse > .collapse-content {
    width: 100%;
}

.collapse-title > *,
.collapse-content > *,
.tidal-info,
.tidal-info * {
    min-width: 0;
}

.tidal-forecast-cards {
    display: none;
}

@media (max-width: 639px) {
    .tidal-table-wrapper {
        display: none;
    }

    .tidal-forecast-cards {
        display: grid;
        gap: 0.75rem;
    }

    .tide-day-card {
        border: 1px solid #e5e7eb;
        border-radius: 0.75rem;
        padding: 0.75rem;
        background: var(--fallback-b1, #fff);
    }

    .tide-day-heading {
        font-weight: 700;
        margin-bottom: 0.5rem;
    }

    .tide-astronomy {
        display: grid;
        gap: 0.25rem;
        overflow-wrap: anywhere;
    }

    .tide-times-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 0.75rem;
        margin-top: 0.75rem;
    }

    .tide-label {
        color: #4b5563;
        font-size: 0.75rem;
        font-weight: 700;
        text-transform: uppercase;
        margin-bottom: 0.25rem;
    }

    .tide-values {
        overflow-wrap: anywhere;
    }
}
