/* The destination page's road trip cards (DestinationTripCards.razor, design U2b without photos,
   docs/plans/destination-page-redesign.md): the drawn loop on paper on the left, the words and
   two buttons on the right, clear air between cards. On a phone the map sits on top. */

.dt-cards {
    display: grid;
    gap: 32px;
    margin: 20px 0 8px;
}

.dt-card {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    border: 1px solid #E0E0E0;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.dt-map {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F3EEE4;
    border-right: 1px solid #E0E0E0;
    min-height: 250px;
}

.dt-map svg {
    display: block;
    width: 100%;
    height: auto;
}

/* Pointing at a route card turns its road red: the line and its arrows (Florian, 11 November
   2026, in place of the photo that used to cover the map). */
.dt-map {
    position: relative;
    overflow: hidden;
}

.dt-map :is(.tg-map-drive, .tg-map-arrow) {
    transition: stroke .2s ease, fill .2s ease, stroke-width .2s ease;
}

.dt-card:hover .dt-map,
.dt-card:focus-within .dt-map {
    --tg-route: #D20158;
}

.dt-card:hover .dt-map .tg-map-drive,
.dt-card:focus-within .dt-map .tg-map-drive {
    stroke-width: 4;
}

/* The map and the words are placed by name, so the admin's edit link can share the map's cell. */
.dt-map {
    grid-column: 1;
    grid-row: 1;
}

.dt-text {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 24px 26px;
}

.dt-kicker {
    margin: 0;
    font: 700 12px Roboto, system-ui, sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #757575;
}

.dt-name {
    margin: 0;
    font: 500 22px/1.25 'Roboto Serif', Georgia, serif;
    color: #191919;
}

.dt-name a {
    color: inherit;
    text-decoration: none;
}

.dt-name a:hover {
    text-decoration: underline;
}

.dt-day {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    color: #3D3D3D;
}

.dt-day strong {
    font-weight: 500;
    color: #191919;
}

.dt-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 6px;
}

.dt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 25px;
    padding: 9px 18px;
    font: 500 14px Roboto, system-ui, sans-serif;
    background: #D20158;
    color: #fff;
    text-decoration: none;
    border: 1px solid #D20158;
}

.dt-btn:hover {
    background: #B0014A;
    color: #fff;
}

.dt-btn-alt {
    background: #fff;
    color: #191919;
    border-color: #191919;
}

.dt-btn-alt:hover {
    background: #F5F1E8;
    color: #191919;
}

@media (max-width: 760px) {
    .dt-cards {
        gap: 24px;
    }

    .dt-card {
        grid-template-columns: 1fr;
    }

    .dt-map {
        border-right: 0;
        border-bottom: 1px solid #E0E0E0;
        min-height: 0;
    }

    .dt-text {
        grid-column: 1;
        grid-row: 2;
        padding: 16px;
    }

    .dt-name {
        font-size: 20px;
    }

    .dt-actions {
        display: grid;
        gap: 8px;
    }

    .dt-btn {
        min-height: 44px;
    }
}

/* The same card as a "::: trip map" block inside an article (PostTripCardService): the article's
   own rules for headings, paragraphs, links and images must not reach into it. */
.post-content-text .dt-cards {
    margin: 28px 0;
}

.post-content-text .dt-card h3.dt-name,
.post-content-text .dt-card p {
    margin: 0;
    padding: 0;
}

.post-content-text .dt-card a {
    text-decoration: none;
}

/* The article's paragraph size (17 px) reached the kicker and wrapped it on two lines: keep the
   card's own small kicker, one line when it fits (Florian, 11 November 2026). */
.post-content-text .dt-card p.dt-kicker {
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: .1em;
}

.post-content-text .dt-card .dt-btn-alt {
    color: #191919;
}

/* Administrators only: "Edit trip" or "Edit route" beside the card's button (TripRouteCard). */
.dt-edit,
.post-content-text a.dt-edit {
    /* The map's own grid cell (the first column, or the first row on a phone), bottom left. */
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    justify-self: start;
    position: relative;
    z-index: 1;
    margin: 0 0 12px 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #121C30;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.dt-edit:hover,
.post-content-text a.dt-edit:hover {
    background: #1E2C49;
    color: #fff;
}

.dt-edit-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--dragonroads-primary, #D20158);
}

/* ---- The highlights of a route card (TripRouteCard, 16 November 2026): a quiet button with three
   small round photos beside the card's button, and the pop-up it opens, a native dialog with every
   highlight as a photo tile. On a phone the pop-up is a sheet from the bottom with a list. ---- */

.dt-hl-open {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 6px;
    border: 0;
    background: none;
    font: 600 14.5px Roboto, system-ui, sans-serif;
    color: #B8014C;
    cursor: pointer;
}

.dt-hl-open:hover span:last-child {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.dt-hl-open:focus-visible,
.dt-hl-close:focus-visible {
    outline: 2px solid #E7AE4B;
    outline-offset: 3px;
}

.dt-hl-stack {
    display: inline-flex;
}

.dt-card .dt-hl-stack img {
    width: 28px;
    height: 28px;
    max-width: none;
    margin: 0 0 0 -10px;
    border: 2px solid #fff;
    border-radius: 50%;
    object-fit: cover;
}

.dt-card .dt-hl-stack img:first-child {
    margin-left: 0;
}

dialog.dt-hl {
    width: min(920px, calc(100vw - 32px));
    max-width: none;
    max-height: calc(100vh - 48px);
    padding: 0;
    border: 0;
    border-radius: 16px;
    background: #fff;
    color: #191919;
    box-shadow: 0 18px 50px rgba(31, 27, 24, .28);
    overflow: hidden;
    text-align: left;
}

dialog.dt-hl::backdrop {
    background: rgba(31, 27, 24, .62);
}

.dt-hl-box {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 48px);
}

.dt-hl-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 26px 30px 14px;
}

.dt-card .dt-hl-head .dt-kicker {
    margin: 0 0 6px;
}

.dt-card p.dt-hl-name {
    margin: 0;
    font: 500 26px/1.2 'Roboto Serif', Georgia, serif;
    color: #191919;
}

.dt-hl-close {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid #D8CFBC;
    border-radius: 50%;
    background: #fff;
    color: #191919;
    cursor: pointer;
}

.dt-hl-close:hover {
    background: #F5F1E8;
}

.dt-card ol.dt-hl-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px 18px;
    margin: 0;
    padding: 4px 30px 28px;
    list-style: none;
    overflow-y: auto;
}

.dt-card li.dt-hl-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.dt-card .dt-hl-photo {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    aspect-ratio: 3 / 2;
    margin: 0;
    border-radius: 8px;
    object-fit: cover;
}

.dt-card span.dt-hl-blank {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 8px;
    background: #EFE8D8;
    color: #6B625A;
    font: 500 14px 'Roboto Serif', Georgia, serif;
    text-align: center;
}

.dt-card p.dt-hl-title {
    margin: 0 0 3px;
    font: 600 15.5px/1.25 'Roboto Serif', Georgia, serif;
    color: #191919;
}

.dt-hl-n {
    margin-right: 6px;
    font: 700 11.5px Roboto, system-ui, sans-serif;
    color: #B8014C;
}

.dt-card p.dt-hl-text {
    margin: 0;
    font: 400 13px/1.45 Roboto, system-ui, sans-serif;
    color: #3D3D3D;
}

.dt-hl-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 30px;
    border-top: 1px solid #E0E0E0;
    background: #FAF7F0;
    font: 400 14px Roboto, system-ui, sans-serif;
    color: #3D3D3D;
}

.post-content-text .dt-card .dt-hl-foot a.dt-btn {
    color: #fff;
}

@media (max-width: 760px) {
    .dt-hl-open {
        min-height: 44px;
        justify-content: center;
    }

    dialog.dt-hl {
        width: 100vw;
        max-height: 88vh;
        margin: auto 0 0;
        border-radius: 16px 16px 0 0;
    }

    .dt-hl-box {
        max-height: 88vh;
    }

    .dt-hl-head {
        padding: 18px 16px 10px;
    }

    .dt-card p.dt-hl-name {
        font-size: 21px;
    }

    .dt-card ol.dt-hl-grid {
        display: block;
        padding: 0 16px 8px;
    }

    .dt-card li.dt-hl-item {
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 0;
        border-top: 1px solid #EAE3D4;
    }

    .dt-card .dt-hl-photo {
        flex: none;
        width: 88px;
        aspect-ratio: 1 / 1;
    }

    .dt-card p.dt-hl-title {
        font-size: 16px;
    }

    .dt-card p.dt-hl-text {
        font-size: 14px;
    }

    .dt-hl-foot {
        padding: 14px 16px;
    }
}
