/* Gorilla AI Trail Suite -- Public styles */

.gats-section-title {
    font-size: 22px;
    font-weight: 700;
    margin-top: 36px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #c8a84b;
    letter-spacing: 0.3px;
}

/* Specs */
.gats-specs-wrap { margin: 24px 0; }
.gats-specs {
    width: 100%;
    border-collapse: collapse;
    background: #f7f7f7;
    border-radius: 4px;
    overflow: hidden;
}
.gats-specs th,
.gats-specs td {
    padding: 10px 14px;
    border-bottom: 1px solid #e5e5e5;
    text-align: left;
    font-size: 14px;
}
.gats-specs th {
    background: #efefef;
    font-weight: 600;
    width: 32%;
    color: #333;
}

/* Map */
.gats-map-wrap { margin: 20px 0; }
.gats-map-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.gats-map-filters select,
.gats-map-filters .gats-map-filter-search {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: #1a1a1a;
}
.gats-map-filters .gats-map-filter-search {
    flex: 1 1 240px;
    min-width: 200px;
}
.gats-map-filters .gats-map-filter-search:focus {
    border-color: #c8a84b;
    outline: none;
}
.gats-map {
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Rating summary */
.gats-ratings { margin: 24px 0; }
.gats-rating-summary {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 16px;
    background: #f7f7f7;
    border-radius: 4px;
    padding: 16px;
}
@media (max-width: 640px) {
    .gats-rating-summary { grid-template-columns: 1fr; }
}
.gats-rating-box { padding: 8px; }
.gats-rating-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    margin-bottom: 4px;
}
.gats-rating-value { font-size: 20px; font-weight: 600; }

/* Star input */
.gats-star-input { display: inline-flex; gap: 4px; align-items: center; }
.gats-star {
    background: none;
    border: none;
    font-size: 28px;
    color: #ddd;
    cursor: pointer;
    padding: 2px;
    transition: color 0.15s;
}
.gats-star:hover,
.gats-star.active { color: #c8a84b; }

/* Rating form */
.gats-rating-form,
.gats-condition-form,
.gats-photo-form {
    background: #fff;
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 4px;
    margin-top: 16px;
}
.gats-rating-form h4,
.gats-condition-form h4,
.gats-photo-form h4 {
    margin-top: 0;
    font-size: 16px;
}
.gats-form-row { margin: 12px 0; }
.gats-form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 13px;
    color: #444;
}
.gats-form-row input[type=text],
.gats-form-row input[type=date],
.gats-form-row input[type=file],
.gats-form-row select,
.gats-form-row textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    box-sizing: border-box;
}
.gats-form-row textarea { resize: vertical; }

.gats-btn {
    display: inline-block;
    background: #c8a84b;
    color: #fff !important;
    border: none;
    padding: 10px 20px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}
.gats-btn:hover { background: #b0933f; }
.gats-btn-primary { background: #c8a84b; }
.gats-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.gats-form-msg {
    margin-left: 12px;
    font-size: 13px;
}
.gats-form-msg.success { color: #4a8f3a; }
.gats-form-msg.error   { color: #c0392b; }

/* Reviews */
.gats-reviews-list { margin-top: 20px; }
.gats-review {
    background: #fafafa;
    border-left: 3px solid #c8a84b;
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 3px;
}
.gats-review-head {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 13px;
    margin-bottom: 6px;
}
.gats-review-stars { color: #c8a84b; }
.gats-review-diff, .gats-review-date { color: #888; }
.gats-review-body { font-size: 14px; line-height: 1.5; }

/* Condition reports */
.gats-conditions { margin: 24px 0; }
.gats-empty { color: #888; font-style: italic; }
.gats-conditions-list { margin: 12px 0; }
.gats-condition {
    background: #fafafa;
    border-left: 4px solid #666;
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 3px;
}
.gats-condition.gats-severity-caution { border-left-color: #e8a633; }
.gats-condition.gats-severity-closure { border-left-color: #c0392b; background: #fff3f1; }
.gats-condition-head {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 6px;
    font-size: 13px;
}
.gats-condition-sev {
    text-transform: uppercase;
    font-weight: 600;
    font-size: 11px;
    padding: 2px 8px;
    background: #666;
    color: #fff;
    border-radius: 2px;
}
.gats-severity-caution .gats-condition-sev { background: #e8a633; }
.gats-severity-closure .gats-condition-sev { background: #c0392b; }
.gats-condition-date, .gats-condition-author { color: #888; }
.gats-condition-body { font-size: 14px; line-height: 1.5; }

/* Photos */
.gats-photos { margin: 24px 0; }
.gats-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin: 12px 0 16px;
}
.gats-photo-thumb {
    display: block;
    position: relative;
    border-radius: 3px;
    overflow: hidden;
    background: #eee;
}
.gats-photo-thumb img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}
.gats-photo-caption {
    position: absolute;
    bottom: 0;
    left: 0; right: 0;
    padding: 6px 10px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 12px;
}

/* Driven */
.gats-driven-toggle {
    margin: 20px 0;
    display: flex;
    gap: 14px;
    align-items: center;
}
.gats-driven-btn.active {
    background: #4a8f3a;
}
.gats-driven-count { color: #666; font-size: 14px; }

/* Login prompt */
.gats-login-prompt {
    padding: 16px;
    background: #fff8e5;
    border-left: 3px solid #c8a84b;
    border-radius: 3px;
    margin: 16px 0;
    font-size: 14px;
}

/* Latest conditions */
.gats-latest-conditions { margin: 16px 0; }

/* ── Vehicle field + required marker ────────────────────────────────────── */
.gats-required {
    color: #c0392b;
    font-weight: 700;
    margin-left: 2px;
}
.gats-form-help {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    line-height: 1.45;
}
.gats-rating-form input[name=vehicle] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d4d0c4;
    border-radius: 3px;
    font-size: 14px;
    box-sizing: border-box;
}
.gats-rating-form input[name=vehicle]:invalid {
    border-color: #d4d0c4;
}
.gats-rating-form input[name=vehicle]:focus {
    outline: none;
    border-color: #c8a84b;
}

/* Vehicle line on review listings */
.gats-review-vehicle {
    margin: 6px 0 8px;
    font-size: 13px;
    color: #555;
}
.gats-vehicle-label {
    font-weight: 600;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 11px;
    margin-right: 6px;
}

/* ── Flag button + modal ────────────────────────────────────────────────── */
.gats-review-actions {
    margin-top: 8px;
    text-align: right;
}
.gats-flag-btn {
    background: transparent;
    border: none;
    color: #999;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 3px;
    transition: all 0.15s ease;
}
.gats-flag-btn:hover {
    color: #c0392b;
    background: rgba(192, 57, 43, 0.06);
}
.gats-flag-already {
    font-size: 12px;
    color: #c0392b;
    font-style: italic;
}

.gats-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    padding: 20px;
}
.gats-modal-content {
    background: #fff;
    padding: 28px;
    border-radius: 4px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
.gats-modal-content h3 {
    margin: 0 0 12px;
    font-size: 1.3rem;
}
.gats-flag-help {
    color: #666;
    font-size: 13px;
    line-height: 1.55;
    margin: 0 0 16px;
}
.gats-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 16px;
}
.gats-flag-result {
    margin-top: 12px;
    font-size: 13px;
}
.gats-flag-result.success { color: #4a8f3a; }
.gats-flag-result.error   { color: #c0392b; }

/* ──────────────────────────────────────────────────────────────────────
   Collapsible panels — hide rating/condition/photo forms behind a button
   ────────────────────────────────────────────────────────────────────── */

.gats-collapsible {
    margin: 20px 0;
}

.gats-collapsible-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
}

.gats-collapsible-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 18px;
    line-height: 1;
    font-weight: 400;
    transition: transform 0.25s ease;
}
.gats-collapsible-toggle.is-open .gats-collapsible-icon {
    transform: rotate(45deg);
}

.gats-collapsible-panel {
    transition: height 0.28s ease, opacity 0.22s ease;
    /* Initial state — JS sets explicit height during animation */
}

.gats-collapsible-panel[hidden] {
    display: none !important;
}

/* Fallback for users with prefers-reduced-motion: skip the height animation */
@media (prefers-reduced-motion: reduce) {
    .gats-collapsible-panel,
    .gats-collapsible-icon {
        transition: none !important;
    }
}

/* When a panel is open, give it a slight visual offset from the toggle */
.gats-collapsible-panel:not([hidden]) {
    margin-top: 14px;
}

/* Secondary button — used for collapsible toggles and subtler actions */
.gats-btn-secondary {
    background: transparent !important;
    color: #1a1a1a !important;
    border: 1px solid #c8a84b !important;
}
.gats-btn-secondary:hover {
    background: #c8a84b !important;
    color: #1a1a1a !important;
}
.gats-btn-secondary.is-open {
    background: #c8a84b !important;
    color: #1a1a1a !important;
}

/* ──────────────────────────────────────────────────────────────────────
   Photo upload — featured-image consent checkbox
   ────────────────────────────────────────────────────────────────────── */
.gats-form-row-checkbox {
    background: rgba(200, 168, 75, 0.06);
    border: 1px solid rgba(200, 168, 75, 0.25);
    border-radius: 4px;
    padding: 14px 16px;
    margin-top: 8px;
}
.gats-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    color: #1a1a1a;
}
.gats-checkbox-label input[type=checkbox] {
    flex: 0 0 auto;
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #c8a84b;
}
.gats-checkbox-label span {
    flex: 1;
    line-height: 1.4;
}
.gats-form-row-checkbox .gats-form-help {
    margin-top: 8px;
    margin-left: 28px;
    color: #555;
    font-style: normal;
}

/* ──────────────────────────────────────────────────────────────────────
   Photo credit overlay — bottom-right of featured images
   ────────────────────────────────────────────────────────────────────── */
.gats-photo-credit-wrap {
    position: relative;
    display: inline-block;
    line-height: 0;
}
.gats-photo-credit-wrap img {
    max-width: 100%;
    height: auto;
}
.gats-photo-credit {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.65);
    color: rgba(255, 255, 255, 0.95);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    border-radius: 3px;
    backdrop-filter: blur(4px);
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.gats-photo-credit a {
    color: rgba(245, 234, 211, 0.95);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease, color 0.15s ease;
}
.gats-photo-credit a:hover {
    color: #c8a84b;
    border-bottom-color: #c8a84b;
}
.gats-photo-credit-icon {
    opacity: 0.9;
    font-size: 0.85rem;
    line-height: 1;
}
@media (max-width: 600px) {
    .gats-photo-credit {
        bottom: 8px;
        right: 8px;
        font-size: 0.7rem;
        padding: 4px 9px;
    }
}

/* ──────────────────────────────────────────────────────────────────────
   Marker clustering — overrides the default blue/green bubbles to match
   the rust + gold brand palette
   ────────────────────────────────────────────────────────────────────── */

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    background-clip: padding-box;
    border-radius: 50%;
}
.marker-cluster-small {
    background: rgba(200, 168, 75, 0.45);   /* gold, low density */
}
.marker-cluster-small div {
    background: rgba(200, 168, 75, 0.92);
    color: #1a1a1a;
    font-weight: 700;
    font-family: 'Inter', system-ui, sans-serif;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
.marker-cluster-medium {
    background: rgba(190, 114, 49, 0.45);   /* rust, mid density */
}
.marker-cluster-medium div {
    background: rgba(190, 114, 49, 0.94);
    color: #fff;
    font-weight: 700;
    font-family: 'Inter', system-ui, sans-serif;
    box-shadow: 0 2px 6px rgba(0,0,0,0.22);
}
.marker-cluster-large {
    background: rgba(146, 76, 22, 0.5);     /* darker rust, high density */
}
.marker-cluster-large div {
    background: rgba(146, 76, 22, 0.96);
    color: #fff;
    font-weight: 700;
    font-family: 'Inter', system-ui, sans-serif;
    box-shadow: 0 3px 8px rgba(0,0,0,0.28);
}
/* Tighten the inner-circle padding so the count is centered nicely */
.marker-cluster div {
    width: 30px;
    height: 30px;
    margin-left: 5px;
    margin-top: 5px;
    text-align: center;
    border-radius: 50%;
    line-height: 30px;
    font-size: 12px;
}

/* ── Saves: trail-single save button bar ────────────────────────────────── */
.gats-save-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 20px 0 8px;
    flex-wrap: wrap;
}
.gats-save-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #333 !important;
    border: 2px solid #c8a84b;
    padding: 8px 18px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.gats-save-btn:hover {
    background: #fff8e5;
    border-color: #b0933f;
    color: #333 !important;
}
.gats-save-btn .gats-save-icon {
    font-size: 18px;
    line-height: 1;
}
.gats-save-btn.active {
    background: #c8a84b;
    color: #fff !important;
    border-color: #c8a84b;
}
.gats-save-btn.active:hover {
    background: #b0933f;
    border-color: #b0933f;
}
.gats-save-btn-login {
    border-color: #c8a84b;
}
.gats-save-count {
    color: #666;
    font-size: 14px;
}

/* ── Coordinates: click-to-copy rows ────────────────────────────────────── */
.gats-specs .gats-coord-row th {
    vertical-align: middle;
}
.gats-coord-copy {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px dashed transparent;
    color: #1a1a1a;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 14px;
    padding: 4px 8px;
    margin: -4px -8px;
    border-radius: 3px;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s, border-color 0.12s;
}
.gats-coord-copy:hover,
.gats-coord-copy:focus-visible {
    background: #fff8e5;
    border-color: #c8a84b;
    outline: none;
}
.gats-coord-copy.copied {
    background: #f0f7ec;
    border-color: #4a8f3a;
}
.gats-coord-icon {
    font-size: 13px;
    color: #888;
    line-height: 1;
}
.gats-coord-copy:hover .gats-coord-icon,
.gats-coord-copy:focus-visible .gats-coord-icon {
    color: #b0933f;
}
.gats-coord-copy.copied .gats-coord-icon {
    color: #4a8f3a;
}

/* "Copy both" link row */
.gats-specs .gats-coord-row-both th {
    background: #efefef;
}
.gats-coord-copy-both {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #b0933f;
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
}
.gats-coord-copy-both:hover,
.gats-coord-copy-both:focus-visible {
    color: #c8a84b;
    text-decoration: underline;
    outline: none;
}
.gats-coord-copy-both.copied {
    color: #4a8f3a;
}
.gats-coord-hint {
    display: block;
    color: #888;
    font-size: 12px;
    margin-top: 4px;
}

/* Floating "Copied!" toast (shared by all click-to-copy affordances) */
.gats-toast {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translate(-50%, 12px);
    background: #1a1a1a;
    color: #fff;
    padding: 10px 18px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 99999;
}
.gats-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ── Account page ────────────────────────────────────────────────────────── */
.gats-account { margin: 20px 0; }
.gats-account-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 14px;
    padding-bottom: 18px;
    margin-bottom: 24px;
    border-bottom: 2px solid #c8a84b;
}
.gats-account-name {
    margin: 0 0 4px;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
}
.gats-account-meta {
    margin: 0;
    color: #666;
    font-size: 13px;
}
.gats-account-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.gats-account-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 0 0 28px;
}
.gats-account-stat {
    background: #f7f7f7;
    border-radius: 4px;
    padding: 16px 12px;
    text-align: center;
    border-bottom: 3px solid #c8a84b;
}
.gats-account-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.1;
}
.gats-account-stat-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #666;
    margin-top: 4px;
}
@media (max-width: 600px) {
    .gats-account-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ── Saved trails grid ──────────────────────────────────────────────────── */
.gats-saved-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
    margin: 16px 0 32px;
}
.gats-saved-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.15s, transform 0.15s;
}
.gats-saved-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.gats-saved-thumb-link { display: block; }
.gats-saved-thumb {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    background: #efefef;
}
.gats-saved-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #c8a84b;
    background: #fff8e5;
}
.gats-saved-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.gats-saved-title {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
}
.gats-saved-title a {
    color: #1a1a1a;
    text-decoration: none;
}
.gats-saved-title a:hover { color: #b0933f; }
.gats-saved-tagline {
    margin: 0 0 10px;
    color: #555;
    font-size: 13px;
    line-height: 1.4;
}
.gats-saved-meta {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    font-size: 12px;
    color: #666;
}
.gats-saved-meta li { margin-bottom: 2px; }
.gats-saved-meta li span {
    color: #888;
    font-weight: 600;
    margin-right: 4px;
}
.gats-saved-actions {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}
.gats-saved-view {
    color: #b0933f;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.gats-saved-view:hover {
    color: #c8a84b;
    text-decoration: underline;
}
.gats-saved-remove {
    background: transparent;
    border: 1px solid #ddd;
    color: #888;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.gats-saved-remove:hover {
    background: #fff3f1;
    color: #c0392b;
    border-color: #c0392b;
}
.gats-saved-card.is-removing {
    opacity: 0.4;
    pointer-events: none;
}
.gats-saved-empty {
    padding: 28px 24px;
    background: #f7f7f7;
    border-radius: 4px;
    text-align: center;
    color: #555;
}
.gats-saved-empty p { margin: 0 0 12px; }
.gats-saved-empty p:last-child { margin-bottom: 0; }
.gats-saved-empty-icon {
    display: inline-block;
    background: #fff;
    border: 2px solid #c8a84b;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 600;
    color: #1a1a1a;
}

/* ── Trail action bar (wraps save + share) ──────────────────────────────── */
.gats-trail-action-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 20px 0 8px;
}
/* When inside the action bar, the save bar drops its own outer margin */
.gats-trail-action-bar .gats-save-bar { margin: 0; }

/* ── Share button + dropdown menu ───────────────────────────────────────── */
.gats-share-wrap {
    position: relative;
    display: inline-block;
}
.gats-share-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #333 !important;
    border: 2px solid #c8a84b;
    padding: 8px 18px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.gats-share-toggle:hover,
.gats-share-toggle:focus-visible {
    background: #fff8e5;
    border-color: #b0933f;
    color: #333 !important;
    outline: none;
}
.gats-share-toggle[aria-expanded="true"] {
    background: #c8a84b;
    color: #fff !important;
    border-color: #c8a84b;
}
.gats-share-toggle svg { flex: 0 0 auto; }

.gats-share-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 100;
    min-width: 220px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    padding: 6px;
    display: none;
}
.gats-share-menu.is-open { display: block; }

.gats-share-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 3px;
    color: #1a1a1a !important;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s;
    box-sizing: border-box;
}
.gats-share-item:hover,
.gats-share-item:focus-visible {
    background: #fff8e5;
    color: #1a1a1a !important;
    outline: none;
}
.gats-share-item svg {
    flex: 0 0 18px;
}
/* Brand colors on platform icons */
.gats-share-fb svg  { color: #1877f2; }
.gats-share-pin svg { color: #e60023; }
.gats-share-sms svg { color: #4a8f3a; }
.gats-share-ig svg  { color: #c13584; }

/* On narrow viewports, anchor the menu to the right edge so it doesn't
   overflow the content column when the share button sits at the edge. */
@media (max-width: 600px) {
    .gats-share-menu {
        left: auto;
        right: 0;
    }
}

/* ── Map markers (colored circle divIcons) ──────────────────────────────── */
/* Leaflet wraps our HTML in a default-styled div with a white background;
   neutralize that so just our circle shows. */
.gats-marker {
    background: transparent !important;
    border: none !important;
}
.gats-marker-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.32);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    text-shadow: 0 1px 1px rgba(0,0,0,0.25);
    box-sizing: border-box;
    /* Hide the cluster plugin's anchor border bleed-through */
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.gats-marker:hover .gats-marker-circle,
.gats-marker:focus .gats-marker-circle {
    transform: scale(1.15);
    box-shadow: 0 3px 10px rgba(0,0,0,0.4);
}

/* ── Map popup (styled to match the cleaner divIcon markers) ────────────── */
.gats-map-popup { min-width: 180px; }
.gats-map-popup img {
    width: 100%;
    border-radius: 3px;
    margin-bottom: 6px;
    display: block;
}
.gats-map-popup strong { display: block; margin-bottom: 2px; }
.gats-map-popup strong a {
    color: #1a1a1a;
    text-decoration: none;
}
.gats-map-popup strong a:hover { color: #b0933f; }
.gats-map-popup-meta {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}
.gats-map-popup-excerpt {
    font-size: 12px;
    margin-top: 4px;
    color: #444;
    line-height: 1.4;
}

/* ── Floating legend panel (overlaid on map, left side, collapsible) ─────
 *
 * Architecture:
 *   .gats-map-wrap (normal flow — chrome stacks above the map)
 *     ├─ .gats-map-route-panel  (route from/to + summary)
 *     ├─ .gats-map-filter-label ("Search by")
 *     ├─ .gats-map-filters      (country + keyword search)
 *     └─ .gats-map-area (position: relative — the legend's anchor)
 *           ├─ .gats-map (the Leaflet container)
 *           └─ .gats-map-legend-wrap (absolute positioned overlay)
 *                 ├─ .gats-map-legend-launcher (shown when collapsed)
 *                 └─ .gats-map-legend-panel (shown when expanded)
 *                       ├─ header (title + close)
 *                       ├─ help text
 *                       ├─ .gats-map-legend (filter buttons grid)
 *                       └─ "Show all" reset link
 *
 * State is driven by data-collapsed="true|false" on .gats-map-legend-wrap.
 * Persisted to localStorage so the user's preference carries across pages.
 *
 * Previously the wrap itself was the positioning context, which meant the
 * legend anchored to the TOP of the wrap — covering the route panel and
 * filters above the map. Adding .gats-map-area as a dedicated inner
 * positioning context fixes that without restructuring everything else.
 */

/* The wrap holds chrome (route panel, filters) above the map area in
   normal document flow. The inner .gats-map-area is the positioning
   context for overlay UI (legend panel) so absolute-positioned children
   anchor to the map's top edge, not the wrap's. */
.gats-map-wrap { position: static; }
.gats-map-area {
    position: relative;
    /* Avoid trapping the legend inside if the panel grows tall on small
       maps — let it scroll inside itself via the max-height rule below. */
}

.gats-map-legend-wrap {
    /* Position over the map, top-left, just below the zoom + fullscreen
       controls. Leaflet's top-left control cluster ends around 88px from
       the top with our custom fullscreen button stacked on the zoom. */
    position: absolute;
    top: 10px;
    left: 50px; /* sit beside, not behind, the zoom +/- controls */
    z-index: 1000;
    pointer-events: none; /* allow map drag on the gap between launcher/panel */
}
.gats-map-legend-wrap > .gats-map-legend-launcher,
.gats-map-legend-wrap > .gats-map-legend-panel {
    pointer-events: auto; /* but the panel + launcher themselves accept clicks */
}

/* ── Launcher tab (collapsed state) ────────────────────────────────────── */
.gats-map-legend-launcher {
    appearance: none;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    padding: 8px 12px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    cursor: pointer;
    display: none; /* shown when wrap is data-collapsed=true */
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    transition: background 0.12s, color 0.12s;
}
.gats-map-legend-launcher:hover {
    background: #fff8e5;
    color: #1a1a1a;
}
.gats-legend-launcher-icon {
    font-size: 16px;
    line-height: 1;
    color: #c8a84b;
}

/* ── Expanded panel ────────────────────────────────────────────────────── */
.gats-map-legend-panel {
    display: block;
    width: 220px;
    max-height: calc(100% - 20px); /* never taller than the map minus padding */
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.18);
    padding: 10px 12px 12px;
    overflow-y: auto;
}

/* Collapsed/expanded toggle */
.gats-map-legend-wrap[data-collapsed="true"] .gats-map-legend-panel { display: none; }
.gats-map-legend-wrap[data-collapsed="true"] .gats-map-legend-launcher { display: inline-flex; }
.gats-map-legend-wrap[data-collapsed="false"] .gats-map-legend-launcher { display: none; }

.gats-map-legend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
}
.gats-map-legend-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #555;
}
.gats-map-legend-close {
    appearance: none;
    background: transparent;
    border: 0;
    font-size: 22px;
    line-height: 1;
    color: #888;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.12s;
}
.gats-map-legend-close:hover { color: #1a1a1a; }

.gats-map-legend-help {
    margin: 0 0 10px;
    font-size: 11px;
    color: #888;
    line-height: 1.4;
}
.gats-map-legend-reset {
    display: block;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #c8a84b;
    text-decoration: underline;
}
.gats-map-legend-reset:hover { color: #b0933f; }

/* ── Filter buttons grid (stacked column inside panel, not horizontal) ── */
.gats-map-legend {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0;
    background: transparent;
    border: 0;
    font-size: 13px;
    color: #1a1a1a;
}
.gats-map-legend .gats-legend-item {
    appearance: none;
    background: transparent;
    border: 1px solid transparent;
    padding: 5px 8px 5px 6px;
    border-radius: 4px;
    cursor: pointer;
    font: inherit;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    text-align: left;
    transition: background 0.12s, border-color 0.12s, opacity 0.12s;
}
.gats-map-legend .gats-legend-item:hover {
    background: #fff8e5;
    border-color: #c8a84b;
}
.gats-map-legend .gats-legend-item:focus-visible {
    outline: 2px solid #c8a84b;
    outline-offset: 2px;
}
.gats-map-legend .gats-legend-item.is-off {
    opacity: 0.45;
}
.gats-map-legend .gats-legend-item.is-off .gats-legend-dot {
    filter: grayscale(1);
    box-shadow: none;
}
.gats-map-legend .gats-legend-item.is-off .gats-legend-label {
    text-decoration: line-through;
}
.gats-map-legend .gats-legend-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    line-height: 1;
    flex: 0 0 auto;
    text-shadow: 0 1px 1px rgba(0,0,0,0.25);
}

/* Dark-band variants — for sections wrapped in .tdm-dark-band (homepage
   Atlas, trails archive map). Inverts the legend chrome to dark with
   gold accents so it reads against the dark background. */
.tdm-dark-band .gats-map-legend-panel {
    background: rgba(20, 14, 8, 0.92);
    border-color: rgba(255,255,255,0.15);
    color: #eee;
}
.tdm-dark-band .gats-map-legend-title { color: #c8a84b; }
.tdm-dark-band .gats-map-legend-help { color: #aaa; }
.tdm-dark-band .gats-map-legend-header { border-bottom-color: rgba(255,255,255,0.1); }
.tdm-dark-band .gats-map-legend-reset { border-top-color: rgba(255,255,255,0.1); }
.tdm-dark-band .gats-map-legend { color: #eee; }
.tdm-dark-band .gats-map-legend .gats-legend-item:hover {
    background: rgba(200,168,75,0.15);
}
.tdm-dark-band .gats-map-legend-launcher {
    background: rgba(20, 14, 8, 0.92);
    border-color: rgba(255,255,255,0.18);
    color: #fff;
}
.tdm-dark-band .gats-map-legend-launcher:hover {
    background: rgba(200,168,75,0.2);
}

/* Narrow screens: the panel takes more relative width, but cap it so it
   doesn't completely cover the map. */
@media (max-width: 600px) {
    .gats-map-legend-panel { width: 180px; }
    .gats-map-legend-wrap { left: 50px; right: auto; }
}

@media (max-width: 600px) {
    .gats-map-legend {
        gap: 6px 8px;
        padding: 10px 12px;
        font-size: 12px;
    }
    .gats-map-legend .gats-legend-item {
        padding: 6px 10px 6px 6px; /* slightly larger tap target on mobile */
    }
    .gats-map-legend .gats-legend-dot {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
}

/* ── Places archive (shortcode) ─────────────────────────────────────────── */
.gats-places-archive { margin: 24px 0; }

.gats-places-filters {
    display: flex;
    gap: 14px;
    align-items: flex-end;
    flex-wrap: wrap;
    padding: 16px 18px;
    background: #f7f7f7;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    margin-bottom: 20px;
}
.gats-places-filter {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
    flex: 1 1 160px;
}
.gats-places-filter-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
    font-weight: 600;
}
.gats-places-filters select {
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #fff;
    font-size: 14px;
    line-height: 1.3;
    width: 100%;
    box-sizing: border-box;
}
.gats-places-filters .gats-btn {
    align-self: flex-end;
}
.gats-places-filter-clear {
    align-self: flex-end;
    padding: 8px 12px;
    color: #888;
    font-size: 13px;
    text-decoration: underline;
}
.gats-places-filter-clear:hover { color: #1a1a1a; }

.gats-places-count {
    color: #555;
    font-size: 14px;
    margin: 0 0 14px;
}

/* Grid layout — same responsive auto-fill as the saved-trails grid */
.gats-places-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 0 0 28px;
}

.gats-place-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.15s, transform 0.15s;
}
.gats-place-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.gats-place-card-thumb-link {
    display: block;
    position: relative;
    line-height: 0;
}
.gats-place-card-thumb {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    background: #efefef;
}
.gats-place-card-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    color: #c8a84b;
    background: linear-gradient(135deg, #fff8e5 0%, #f3e8c4 100%);
}

.gats-place-card-type {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(26, 26, 26, 0.85);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 10px;
    border-radius: 3px;
    line-height: 1.3;
}

.gats-place-card-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    line-height: 1.4;
}
.gats-place-card-title {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
}
.gats-place-card-title a {
    color: #1a1a1a;
    text-decoration: none;
}
.gats-place-card-title a:hover { color: #b0933f; }
.gats-place-card-tagline {
    margin: 0 0 10px;
    color: #555;
    font-size: 13px;
    line-height: 1.4;
}
.gats-place-card-meta {
    list-style: none;
    margin: auto 0 0;
    padding: 10px 0 0;
    border-top: 1px solid #f0f0f0;
    font-size: 12px;
    color: #666;
}
.gats-place-card-meta li { margin-bottom: 2px; }
.gats-place-card-meta li span {
    color: #888;
    font-weight: 600;
    margin-right: 4px;
}

/* Pagination */
.gats-places-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 24px 0 8px;
    font-size: 14px;
}
.gats-places-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 3px;
    color: #1a1a1a;
    text-decoration: none;
    background: #fff;
    transition: background 0.12s, border-color 0.12s;
}
.gats-places-pagination .page-numbers:hover {
    background: #fff8e5;
    border-color: #c8a84b;
}
.gats-places-pagination .page-numbers.current {
    background: #c8a84b;
    border-color: #c8a84b;
    color: #fff;
    font-weight: 600;
}
.gats-places-pagination .dots {
    border-color: transparent;
    background: transparent;
    color: #aaa;
}

.gats-places-empty {
    padding: 36px 24px;
    background: #f7f7f7;
    border-radius: 4px;
    text-align: center;
    color: #555;
}
.gats-places-empty p { margin: 0 0 12px; }
.gats-places-empty p:last-child { margin-bottom: 0; }

/* ── Trail / Place disclaimer ──────────────────────────────────────────── */
.gats-disclaimer {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 18px 0 28px;
    padding: 14px 18px;
    background: #fff8e5;
    border-left: 4px solid #c8a84b;
    border-radius: 0 4px 4px 0;
    color: #4a4233;
    font-size: 14px;
    line-height: 1.55;
}
.gats-disclaimer-icon {
    flex: 0 0 auto;
    font-size: 18px;
    line-height: 1.4;
    color: #b0933f;
    font-weight: 700;
}
.gats-disclaimer-text {
    flex: 1 1 auto;
}
.gats-disclaimer-text strong {
    color: #1a1a1a;
}

/* ── Listing reports (public-facing inaccuracy reports) ────────────────── */
.gats-reports {
    margin: 18px 0 28px;
    padding: 16px 18px;
    background: #fafafa;
    border: 1px solid #e8e6df;
    border-radius: 4px;
}
.gats-reports-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.gats-reports-toggle-form,
.gats-reports-login-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #d4ccba;
    border-radius: 3px;
    color: #4a4233;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
}
.gats-reports-toggle-form:hover,
.gats-reports-login-link:hover {
    border-color: #c8a84b;
    color: #b0933f;
}
.gats-reports-toggle-icon {
    font-size: 14px;
    line-height: 1;
}

.gats-reports-count-pill {
    padding: 3px 10px;
    background: #fff8e5;
    color: #b0933f;
    border: 1px solid #c8a84b;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.gats-reports-form:not([hidden]) {
    margin-top: 14px;
    padding: 14px;
    background: #fff;
    border: 1px solid #e8e6df;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.gats-reports-form-label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.gats-reports-form select,
.gats-reports-form textarea {
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #fff;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: #1a1a1a;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}
.gats-reports-form textarea {
    resize: vertical;
    min-height: 70px;
}
.gats-reports-form-foot {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.gats-reports-form-cancel {
    background: transparent;
    border: 0;
    color: #888;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    padding: 8px 4px;
}
.gats-reports-form-cancel:hover { color: #1a1a1a; }
.gats-reports-form-msg {
    font-size: 13px;
    color: #b34;
}
.gats-reports-form-msg.is-success { color: #4a8f3a; }

/* Open reports list */
.gats-reports-list {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.gats-report-item {
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e8e6df;
    border-radius: 4px;
}
.gats-report-head {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.gats-report-reason-badge {
    padding: 3px 9px;
    background: #fff8e5;
    color: #4a4233;
    border: 1px solid #c8a84b;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.gats-report-meta {
    font-size: 12px;
    color: #777;
}
.gats-report-note {
    margin: 0 0 10px;
    font-size: 14px;
    color: #1a1a1a;
    line-height: 1.5;
}
.gats-report-foot {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}
.gats-report-vote {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #fff;
    border: 1px solid #d4ccba;
    border-radius: 3px;
    color: #4a4233;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.gats-report-vote:hover {
    border-color: #c8a84b;
    background: #fff8e5;
}
.gats-report-vote.is-voted {
    background: #c8a84b;
    border-color: #c8a84b;
    color: #1a1a1a;
}
.gats-report-vote-icon {
    font-size: 13px;
    line-height: 1;
}
.gats-report-vote-count {
    font-size: 12px;
    color: #888;
}
.gats-report-vote-login {
    font-size: 12px;
    color: #888;
    text-decoration: underline;
}
.gats-report-self-note {
    font-size: 12px;
    color: #888;
    font-style: italic;
}

/* ── Find on Google row + approximate-location notice ───────────────────── */
.gats-google-search-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #1a73e8;
    text-decoration: none;
    transition: color 0.12s;
}
.gats-google-search-link:hover {
    color: #0d47a1;
    text-decoration: underline;
}

.gats-map-approximate-notice {
    margin: 0 0 14px;
    padding: 12px 16px;
    background: #fff8e5;
    border-left: 4px solid #c8a84b;
    border-radius: 0 4px 4px 0;
    color: #4a4233;
    font-size: 14px;
    line-height: 1.55;
}
.gats-map-approximate-notice strong {
    color: #1a1a1a;
}

/* ── Add to Trip button + dropdown ──────────────────────────────────────── */
.gats-add-to-trip {
    position: relative;
    display: inline-block;
}
.gats-add-to-trip-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid #d8d3c0;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.gats-add-to-trip-btn:hover {
    background: #fff8e5;
    border-color: #c8a84b;
    color: #b0933f;
}
.gats-add-to-trip-icon {
    font-size: 16px;
    line-height: 1;
    font-weight: 700;
    color: #c8a84b;
}
.gats-add-to-trip-btn[aria-expanded="true"] {
    background: #fff8e5;
    border-color: #c8a84b;
}

.gats-add-to-trip-dropdown:not([hidden]) {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 1100;
    min-width: 280px;
    max-width: 360px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(26, 26, 26, 0.14);
    padding: 12px;
}
.gats-add-to-trip-dropdown-head {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    padding: 0 4px 8px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 8px;
}
.gats-add-to-trip-list {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    max-height: 280px;
    overflow-y: auto;
}
.gats-add-to-trip-list li {
    margin: 0;
    padding: 0;
}
.gats-add-to-trip-loading,
.gats-add-to-trip-empty {
    padding: 8px 4px;
    color: #888;
    font-size: 13px;
    font-style: italic;
}
.gats-add-to-trip-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    background: transparent;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.1s;
}
.gats-add-to-trip-item:hover { background: #fff8e5; }
.gats-add-to-trip-item:disabled { opacity: 0.6; cursor: progress; }
.gats-add-to-trip-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}
.gats-add-to-trip-item-meta {
    font-size: 11px;
    color: #888;
}
.gats-add-to-trip-status {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    vertical-align: 1px;
}
.gats-add-to-trip-status-planning  { background: #888; }
.gats-add-to-trip-status-upcoming  { background: #c8a84b; }
.gats-add-to-trip-status-on_trip   { background: #4a8f3a; }
.gats-add-to-trip-status-completed { background: #1a73e8; }
.gats-add-to-trip-newform {
    display: flex;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}
.gats-add-to-trip-newtitle {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #d8d3c0;
    border-radius: 3px;
    font-size: 13px;
}
.gats-add-to-trip-newgo {
    padding: 6px 12px;
    background: #c8a84b;
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.gats-add-to-trip-newgo:hover { background: #b0933f; }
.gats-add-to-trip-newgo:disabled { opacity: 0.6; cursor: progress; }

/* ── Trip map: numbered markers + popup ─────────────────────────────────── */
.gats-marker-circle-trip {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1a1a1a;
    color: #c8a84b;
    border: 2px solid #c8a84b;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.gats-marker-popup-num {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #c8a84b;
    font-weight: 600;
}
.gats-marker-popup-title {
    font-size: 14px;
    font-weight: 600;
    margin: 2px 0;
}
.gats-marker-popup-type {
    font-size: 11px;
    color: #888;
}

/* ── Trip stop list (single trip page) ──────────────────────────────────── */
.gats-trip-stops {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 24px 0;
}
.gats-trip-day {
    margin: 0 0 8px;
}
.gats-trip-day-head {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #c8a84b;
    margin: 18px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f0e8c4;
}
.gats-trip-stop {
    display: flex;
    gap: 16px;
    padding: 14px;
    background: #fff;
    border: 1px solid #e8e6df;
    border-radius: 6px;
    transition: box-shadow 0.12s, border-color 0.12s;
}
.gats-trip-stop:hover {
    box-shadow: 0 4px 12px rgba(26,26,26,0.06);
    border-color: #d8d3c0;
}
.gats-trip-stop-num {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1a1a1a;
    color: #c8a84b;
    border: 2px solid #c8a84b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
}
.gats-trip-stop-body {
    flex: 1 1 auto;
    line-height: 1.5;
}
.gats-trip-stop-head {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.gats-trip-stop-type {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
.gats-trip-stop-title {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
}
.gats-trip-stop-title a {
    color: #1a1a1a;
    text-decoration: none;
}
.gats-trip-stop-title a:hover { color: #b0933f; }
.gats-trip-stop-meta {
    margin-top: 6px;
    font-size: 13px;
    color: #666;
}
.gats-trip-stop-meta span + span::before {
    content: '·';
    margin: 0 6px;
    color: #ccc;
}
.gats-trip-stop-notes {
    margin: 8px 0 0;
    font-size: 14px;
    color: #555;
    font-style: italic;
}
.gats-trip-stop-orphan {
    opacity: 0.6;
}

/* ── My Trips list (account / shortcode) ────────────────────────────────── */
.gats-my-trips {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin: 18px 0;
}
.gats-my-trip {
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e8e6df;
    border-radius: 6px;
}
.gats-my-trip-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}
.gats-my-trip-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}
.gats-my-trip-title a {
    color: #1a1a1a;
    text-decoration: none;
}
.gats-my-trip-title a:hover { color: #b0933f; }
.gats-my-trip-status {
    flex: 0 0 auto;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fff;
    white-space: nowrap;
}
.gats-my-trip-status-planning  { background: #888; }
.gats-my-trip-status-upcoming  { background: #c8a84b; }
.gats-my-trip-status-on_trip   { background: #4a8f3a; }
.gats-my-trip-status-completed { background: #1a73e8; }
.gats-my-trip-meta {
    font-size: 12px;
    color: #666;
}
.gats-my-trip-meta span + span::before {
    content: '·';
    margin: 0 6px;
    color: #ccc;
}

/* ── Owner inline edits on public trip stop cards ─────────────────────── */
.gats-trip-stop-meta-edit {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-top: 8px;
    position: relative;
}
.gats-trip-stop-edit-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.gats-trip-stop-edit-field-block {
    flex: 1 1 100%;
}
.gats-trip-stop-edit-field span {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.gats-trip-stop-public-input {
    padding: 5px 8px;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fafafa;
    transition: border-color 0.12s, background 0.12s;
}
.gats-trip-stop-public-input:focus {
    border-color: #c8a84b;
    background: #fff;
    outline: none;
}
.gats-trip-stop-public-input-narrow {
    width: 70px;
}
.gats-trip-stop-public-textarea {
    width: 100%;
    resize: vertical;
    min-height: 38px;
    font-family: inherit;
    line-height: 1.4;
}
.gats-trip-stop-edit-notes {
    margin-top: 10px;
}
.gats-trip-stop-save-status {
    position: absolute;
    right: 0;
    top: 0;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 3px;
    background: transparent;
    color: transparent;
    transition: opacity 0.2s, color 0.2s, background 0.2s;
}
.gats-trip-stop-save-status.is-saving { color: #c8a84b; background: #fff8e5; }
.gats-trip-stop-save-status.is-saved  { color: #4a8f3a; background: #ebf7e8; }
.gats-trip-stop-save-status.is-error  { color: #c00; background: #fee; }

/* ── Public trip checklist ──────────────────────────────────────────────── */
.gats-pub-checklist {
    margin: 24px 0;
}
.gats-pub-checklist-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    padding: 12px 16px;
    background: #fff8e5;
    border-radius: 6px;
}
.gats-pub-checklist-progressbar {
    flex: 1 1 auto;
    height: 8px;
    background: rgba(176, 147, 63, 0.2);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}
.gats-pub-checklist-progressfill {
    display: block;
    height: 100%;
    background: #c8a84b;
    border-radius: 4px;
    transition: width 0.25s ease-out;
}
.gats-pub-checklist-progresstext {
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 600;
    color: #4a4233;
}
.gats-pub-checklist-cat {
    margin-bottom: 18px;
}
.gats-pub-checklist-cathead {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #c8a84b;
    margin: 0 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #f0e8c4;
}
.gats-pub-checklist-items {
    list-style: none;
    margin: 0;
    padding: 0;
}
.gats-pub-checklist-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    margin: 2px 0;
    border-radius: 4px;
    transition: background 0.1s;
}
.gats-pub-checklist-item:hover {
    background: #fafaf6;
}
.gats-pub-checklist-item label {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}
.gats-pub-checklist:not(.is-editable) .gats-pub-checklist-item label {
    cursor: default;
}
.gats-pub-checklist-toggle {
    width: 18px;
    height: 18px;
    accent-color: #c8a84b;
    cursor: pointer;
}
.gats-pub-checklist:not(.is-editable) .gats-pub-checklist-toggle {
    cursor: not-allowed;
}
.gats-pub-checklist-text {
    font-size: 15px;
    line-height: 1.4;
    color: #1a1a1a;
}
.gats-pub-checklist-item.is-checked .gats-pub-checklist-text {
    text-decoration: line-through;
    color: #999;
}
.gats-pub-checklist-remove {
    background: transparent;
    border: 1px solid transparent;
    color: #ccc;
    font-size: 18px;
    line-height: 1;
    padding: 2px 8px;
    cursor: pointer;
    border-radius: 3px;
    transition: background 0.1s, color 0.1s, border-color 0.1s;
}
.gats-pub-checklist-remove:hover {
    background: #fee;
    color: #c00;
    border-color: #f4c4c4;
}
.gats-pub-checklist-empty {
    padding: 16px;
    background: #f7f7f7;
    border-radius: 6px;
    margin-bottom: 16px;
    color: #666;
}
.gats-pub-checklist-empty p { margin: 0; }
.gats-pub-checklist-add {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
}
.gats-pub-checklist-newcat,
.gats-pub-checklist-newtext {
    padding: 8px 10px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fff;
}
.gats-pub-checklist-newtext {
    flex: 1 1 200px;
    min-width: 200px;
}
.gats-pub-checklist-newgo {
    flex: 0 0 auto;
}

/* ── Plan a new trip — inline create form on /account/ ──────────────────── */
.gats-trip-create {
    margin: 18px 0 24px;
}
.gats-trip-create-toggle {
    /* Inherits .gats-btn .gats-btn-primary, just need spacing */
    display: inline-block;
}
.gats-trip-create-form {
    margin-top: 16px;
    padding: 20px 22px;
    background: #fff;
    border: 1px solid #e8e6df;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(26, 26, 26, 0.04);
}
.gats-trip-create-row {
    display: flex;
    gap: 14px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.gats-trip-create-row:last-of-type {
    margin-bottom: 18px;
}
.gats-trip-create-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1 1 200px;
}
.gats-trip-create-field-grow {
    flex: 1 1 100%;
}
.gats-trip-create-field span {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
}
.gats-trip-create-field span em {
    font-style: normal;
    color: #aaa;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}
.gats-trip-create-field input,
.gats-trip-create-field select,
.gats-trip-create-field textarea {
    padding: 8px 10px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.4;
    border: 1px solid #d8d3c0;
    border-radius: 4px;
    background: #fafaf6;
    transition: border-color 0.12s, background 0.12s;
}
.gats-trip-create-field input:focus,
.gats-trip-create-field select:focus,
.gats-trip-create-field textarea:focus {
    border-color: #c8a84b;
    background: #fff;
    outline: none;
}
.gats-trip-create-field textarea {
    resize: vertical;
    min-height: 50px;
}
.gats-trip-create-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}
.gats-trip-create-status {
    font-size: 13px;
    margin-left: 6px;
}

/* ── Added-to-trip state ────────────────────────────────────────────────── */
.gats-add-to-trip.is-added .gats-add-to-trip-btn {
    background: rgba(200, 168, 75, 0.18);
    border-color: #c8a84b;
    color: #6e5a25;
}
.gats-add-to-trip.is-added .gats-add-to-trip-btn:hover {
    background: rgba(200, 168, 75, 0.28);
}
.gats-add-to-trip.is-added .gats-add-to-trip-icon {
    color: #c8a84b;
    font-weight: 700;
}
.gats-add-to-trip-item.is-already-added {
    opacity: 0.7;
    cursor: not-allowed;
}
.gats-add-to-trip-item.is-already-added:hover {
    background: transparent;
}
.gats-add-to-trip-check {
    display: inline-block;
    margin-left: 6px;
    color: #c8a84b;
    font-weight: 700;
    font-size: 12px;
}

/* ── Per-stop status (planned/current/completed) ────────────────────────── */
.gats-trip-stop-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid transparent;
    background: transparent;
    cursor: default;
    line-height: 1.2;
    margin-left: auto;
    flex: 0 0 auto;
    font-family: inherit;
}
.gats-trip-stop-status-pill.is-clickable {
    cursor: pointer;
    transition: filter 0.12s, transform 0.12s;
}
.gats-trip-stop-status-pill.is-clickable:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}
.gats-trip-stop-status-pill.is-clickable:active {
    transform: translateY(0);
    filter: brightness(0.95);
}
.gats-trip-stop-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex: 0 0 auto;
    background: currentColor;
}
.gats-trip-stop-status-pill-planned {
    background: #f5f3ec;
    color: #888;
    border-color: #e0dccf;
}
.gats-trip-stop-status-pill-current {
    background: #c8a84b;
    color: #1a1a1a;
    border-color: #b0933f;
    animation: gatsStopPulse 2.4s ease-in-out infinite;
}
.gats-trip-stop-status-pill-completed {
    background: #e8efe2;
    color: #4a8f3a;
    border-color: #c5d4ba;
}
@keyframes gatsStopPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(200, 168, 75, 0.35); }
    50%      { box-shadow: 0 0 0 6px rgba(200, 168, 75, 0); }
}

/* Whole-card visual treatment per status */
.gats-trip-stop-status-current {
    border-left: 3px solid #c8a84b;
    padding-left: 10px;
}
.gats-trip-stop-status-completed .gats-trip-stop-title a {
    text-decoration: line-through;
    color: #888;
}
.gats-trip-stop-status-completed .gats-trip-stop-num {
    background: #e8efe2;
    color: #4a8f3a;
    border-color: #c5d4ba;
}
.gats-trip-stop-status-completed {
    opacity: 0.78;
}
.gats-trip-stop-status-completed:hover {
    opacity: 1;
}

/* The stop head needs to host the title + pill on the same row.
   Existing layout uses display:flex on .gats-trip-stop-head; if it doesn't
   yet, the pill's `margin-left: auto` will still push right when the head
   becomes flex by the title using flex:1. Keep both selectors safe. */
.gats-trip-stop-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}
.gats-trip-stop-head .gats-trip-stop-title {
    flex: 1 1 auto;
    min-width: 0;
}

/* ── "View {trip name}" follow-up links beside Add to trip ─────────────── */
.gats-add-to-trip-views {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-left: 8px;
}
.gats-add-to-trip-views:empty {
    margin-left: 0;
}
.gats-add-to-trip-view {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #1a1a1a;
    background: #f5f3ec;
    border: 1px solid #e0dccf;
    border-radius: 999px;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
    line-height: 1.2;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gats-add-to-trip-view:hover {
    background: #c8a84b;
    border-color: #b0933f;
    color: #1a1a1a;
    transform: translateX(1px);
}
.gats-add-to-trip-view span {
    font-size: 11px;
    margin-left: 2px;
    transition: transform 0.15s;
}
.gats-add-to-trip-view:hover span {
    transform: translateX(2px);
}

/* ── Trip wrapup section ────────────────────────────────────────────────── */
.gats-wrapup {
    margin-top: 36px;
    padding: 24px;
    background: #fafaf6;
    border: 1px solid #e0dccf;
    border-radius: 8px;
}
.gats-wrapup-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8d8a4;
}
.gats-wrapup-title {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
}
.gats-wrapup-sub {
    margin: 0;
    color: #666;
    max-width: 540px;
    font-size: 14px;
    line-height: 1.5;
}
.gats-wrapup-progress {
    flex: 0 0 auto;
    text-align: center;
    background: #fff;
    border: 1px solid #e8d8a4;
    border-radius: 6px;
    padding: 8px 16px;
    min-width: 90px;
}
.gats-wrapup-progress-num {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #c8a84b;
}
.gats-wrapup-progress-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
}
.gats-wrapup-trip-complete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
    margin-bottom: 18px;
    background: #fff8e5;
    border: 1px solid #c8a84b;
    border-radius: 6px;
    font-size: 14px;
}
.gats-wrapup-trip-complete strong { color: #1a1a1a; }
.gats-wrapup-stops {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: wrapup;
}
.gats-wrapup-stop {
    background: #fff;
    border: 1px solid #e8e6df;
    border-radius: 6px;
    padding: 16px 18px;
    margin-bottom: 12px;
    transition: border-color 0.15s, opacity 0.15s;
}
.gats-wrapup-stop.is-complete {
    border-color: #c5d4ba;
    background: #f7faf3;
}
.gats-wrapup-stop-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.gats-wrapup-stop-num {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #1a1a1a;
    color: #c8a84b;
    border: 2px solid #c8a84b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}
.gats-wrapup-stop.is-complete .gats-wrapup-stop-num {
    background: #4a8f3a;
    color: #fff;
    border-color: #4a8f3a;
}
.gats-wrapup-stop-meta {
    flex: 1 1 auto;
    min-width: 0;
}
.gats-wrapup-stop-title {
    margin: 0 0 2px;
    font-size: 16px;
    font-weight: 700;
}
.gats-wrapup-stop-title a {
    color: #1a1a1a;
    text-decoration: none;
}
.gats-wrapup-stop-title a:hover {
    color: #c8a84b;
    text-decoration: underline;
}
.gats-wrapup-stop-type {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
}
.gats-wrapup-stop-done {
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #4a8f3a;
    background: #e8efe2;
    border: 1px solid #c5d4ba;
    padding: 4px 10px;
    border-radius: 999px;
}
.gats-wrapup-stop-placeholder {
    padding: 12px 16px;
    background: #f5f3ec;
    border-radius: 4px;
    color: #888;
    font-size: 13px;
}
.gats-wrapup-stop-forms {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.gats-wrapup-form {
    background: #fafaf6;
    border: 1px solid #e8e6df;
    border-radius: 4px;
    overflow: hidden;
}
.gats-wrapup-form.is-submitted {
    background: #f7faf3;
    border-color: #c5d4ba;
}
.gats-wrapup-form summary {
    padding: 10px 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    user-select: none;
    list-style: none;
}
.gats-wrapup-form summary::-webkit-details-marker { display: none; }
.gats-wrapup-form summary::before {
    content: '▸';
    color: #c8a84b;
    margin-right: 8px;
    transition: transform 0.15s;
    display: inline-block;
}
.gats-wrapup-form[open] summary::before {
    transform: rotate(90deg);
}
.gats-wrapup-form-label {
    flex: 1;
    font-size: 13px;
    color: #1a1a1a;
}
.gats-wrapup-form-status {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #4a8f3a;
}
.gats-wrapup-form-body {
    padding: 14px;
    border-top: 1px solid #e8e6df;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.gats-wrapup-form-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.gats-wrapup-form-row label,
.gats-wrapup-form-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 140px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
}
.gats-wrapup-form-block { flex: 1 1 100%; }
.gats-wrapup-form-row label em,
.gats-wrapup-form-block em {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: #aaa;
}
.gats-wrapup-form-row input,
.gats-wrapup-form-row select,
.gats-wrapup-form-block input,
.gats-wrapup-form-block textarea,
.gats-wrapup-form-block select {
    padding: 7px 10px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.4;
    border: 1px solid #d8d3c0;
    border-radius: 4px;
    background: #fff;
    color: #1a1a1a;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}
.gats-wrapup-form-row input:focus,
.gats-wrapup-form-row select:focus,
.gats-wrapup-form-block input:focus,
.gats-wrapup-form-block textarea:focus,
.gats-wrapup-form-block select:focus {
    border-color: #c8a84b;
    outline: none;
}
.gats-wrapup-form-block textarea {
    resize: vertical;
    min-height: 60px;
}
.gats-wrapup-form-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: #555;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    line-height: 1.4;
}
.gats-wrapup-form-consent input {
    margin-top: 3px;
}
.gats-wrapup-form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.gats-wrapup-form-msg {
    font-size: 12px;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}
.gats-wrapup-form-msg.is-success { color: #4a8f3a; }
.gats-wrapup-form-msg.is-error   { color: #c00; }

@media (max-width: 600px) {
    .gats-wrapup { padding: 16px; }
    .gats-wrapup-head { flex-direction: column; }
    .gats-wrapup-trip-complete { flex-direction: column; align-items: flex-start; }
    .gats-wrapup-form-row { flex-direction: column; }
    .gats-wrapup-form-row label { flex: 1 1 100%; }
}

/* ── Account: credit stat tile + post-checkout notices ──────────────────── */
.gats-account-stat-credits .gats-account-stat-value { color: #c8a84b; }
.gats-account-notice {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: 14px;
}
.gats-account-notice-success {
    background: #e8efe2;
    border: 1px solid #c5d4ba;
    color: #2d5a23;
}
.gats-account-notice-info {
    background: #fff8e5;
    border: 1px solid #e8d8a4;
    color: #4a4233;
}

/* ── Public AI Builder on the trip page ─────────────────────────────────── */
.gats-ai-builder {
    margin-top: 36px;
    padding: 24px;
    background: #fff;
    border: 1px solid #e0dccf;
    border-radius: 8px;
}
.gats-ai-builder-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8d8a4;
}
.gats-ai-builder-title {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 700;
}
.gats-ai-builder-sub {
    margin: 0;
    color: #666;
    max-width: 540px;
    font-size: 14px;
    line-height: 1.5;
}
.gats-ai-builder-balance {
    flex: 0 0 auto;
    text-align: center;
    background: #fff8e5;
    border: 1px solid #e8d8a4;
    border-radius: 6px;
    padding: 10px 16px;
    min-width: 120px;
}
.gats-ai-builder-balance-num {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #c8a84b;
}
.gats-ai-builder-balance-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
}
.gats-ai-builder-buy {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    color: #1a1a1a;
    text-decoration: underline;
}
.gats-ai-builder-balance-admin {
    background: #f5f3ec;
    border-color: #d8d3c0;
}
.gats-ai-builder-balance-admin .gats-ai-builder-balance-label {
    color: #4a8f3a;
    font-weight: 600;
}

.gats-ai-builder-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e0dccf;
}
.gats-ai-builder-tab {
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    font-family: inherit;
    font-size: 14px;
    margin-bottom: -1px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.gats-ai-builder-tab:hover { color: #1a1a1a; }
.gats-ai-builder-tab.active {
    color: #1a1a1a;
    border-bottom-color: #c8a84b;
}
.gats-ai-builder-tab[disabled] { opacity: 0.45; cursor: not-allowed; }
.gats-ai-builder-cost {
    font-size: 11px;
    color: #c8a84b;
    background: #fff8e5;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.gats-ai-builder-pane { display: none; padding: 8px 0 4px; }
.gats-ai-builder-pane.active { display: block; }

.gats-ai-builder-fields {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.gats-ai-builder-fields label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 180px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    font-weight: 600;
}
.gats-ai-builder-fields label em {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    color: #aaa;
}
.gats-ai-builder-fields input {
    padding: 8px 10px;
    font-size: 14px;
    font-family: inherit;
    border: 1px solid #d8d3c0;
    border-radius: 4px;
    text-transform: none;
    letter-spacing: 0;
    color: #1a1a1a;
    font-weight: 400;
}
.gats-ai-builder-fields input:focus {
    border-color: #c8a84b;
    outline: none;
}
.gats-ai-builder-empty {
    padding: 18px;
    background: #f5f3ec;
    border-radius: 4px;
    color: #888;
    font-style: italic;
    margin: 0;
}
.gats-ai-builder-working {
    padding: 18px;
    background: #fafaf6;
    border-radius: 4px;
    color: #888;
    font-style: italic;
}
.gats-ai-builder-no-credits {
    padding: 18px;
    background: #fff8e5;
    border: 1px solid #c8a84b;
    border-radius: 6px;
    text-align: center;
}
.gats-ai-builder-no-credits p { margin: 0 0 12px; }
.gats-ai-builder-error {
    padding: 14px 18px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 4px;
    color: #c00;
}
.gats-ai-builder-suggestions {
    list-style: none;
    margin: 0;
    padding: 14px;
    background: #f9f7ee;
    border: 1px solid #e8d8a4;
    border-radius: 6px;
}
.gats-ai-builder-suggestion {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: start;
    padding: 12px;
    background: #fff;
    border: 1px solid #e8e6df;
    border-radius: 4px;
    margin-bottom: 8px;
}
.gats-ai-builder-suggestion:last-child { margin-bottom: 0; }
.gats-ai-builder-toggle { margin-top: 4px; }
.gats-ai-builder-suggestion-meta {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}
.gats-ai-builder-suggestion-title {
    margin: 0 0 2px;
    font-size: 15px;
    font-weight: 700;
}
.gats-ai-builder-suggestion-why {
    margin: 4px 0 0;
    font-size: 13px;
    color: #555;
    font-style: italic;
    line-height: 1.45;
}
.gats-ai-builder-suggestion-fields {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    color: #888;
}
.gats-ai-builder-suggestion-fields label {
    display: flex;
    align-items: center;
    gap: 4px;
}
.gats-ai-builder-suggestion-fields input {
    width: 60px;
    padding: 4px 6px;
}
.gats-ai-builder-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e8d8a4;
}
.gats-ai-builder-summary { color: #666; font-size: 13px; }

/* ── Buy credits packs ──────────────────────────────────────────────────── */
.gats-buy-credits-balance {
    background: #fff8e5;
    border: 1px solid #e8d8a4;
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #4a4233;
}
.gats-buy-credits-packs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}
@media (max-width: 800px) {
    .gats-buy-credits-packs { grid-template-columns: 1fr; }
}
.gats-buy-credits-pack {
    position: relative;
    background: #fff;
    border: 1px solid #e0dccf;
    border-radius: 8px;
    padding: 24px 20px;
    text-align: center;
    transition: transform 0.15s, box-shadow 0.15s;
}
.gats-buy-credits-pack:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(26, 26, 26, 0.08);
}
.gats-buy-credits-pack.is-highlight {
    border-color: #c8a84b;
    border-width: 2px;
    background: #fffcf3;
}
.gats-buy-credits-ribbon {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #c8a84b;
    color: #1a1a1a;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 12px;
    border-radius: 999px;
}
.gats-buy-credits-pack-label {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
}
.gats-buy-credits-price {
    font-size: 32px;
    font-weight: 700;
    color: #c8a84b;
    line-height: 1;
}
.gats-buy-credits-credits {
    margin-top: 6px;
    font-size: 14px;
    color: #888;
    font-weight: 600;
}
.gats-buy-credits-blurb {
    margin: 12px 0 8px;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}
.gats-buy-credits-rate {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 14px;
}
.gats-buy-credits-fineprint {
    font-size: 12px;
    color: #888;
    text-align: center;
    margin: 0;
}

/* ── Credit transaction history ─────────────────────────────────────────── */
.gats-credits-history {
    margin-top: 18px;
    background: #fafaf6;
    border: 1px solid #e0dccf;
    border-radius: 6px;
    padding: 0;
}
.gats-credits-history > summary {
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 600;
    color: #1a1a1a;
    user-select: none;
    list-style: none;
    font-size: 14px;
}
.gats-credits-history > summary::-webkit-details-marker { display: none; }
.gats-credits-history > summary::before {
    content: '▸';
    color: #c8a84b;
    margin-right: 8px;
    transition: transform 0.15s;
    display: inline-block;
}
.gats-credits-history[open] > summary::before {
    transform: rotate(90deg);
}
.gats-credits-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    border-top: 1px solid #e0dccf;
}
.gats-credits-history-table th {
    background: #f5f3ec;
    text-align: left;
    padding: 8px 14px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    font-weight: 600;
    border-bottom: 1px solid #e0dccf;
}
.gats-credits-history-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f0ede2;
    color: #444;
}
.gats-credits-history-table tr:last-child td { border-bottom: none; }
.gats-credits-history-table .is-positive {
    color: #4a8f3a;
    font-weight: 700;
}
.gats-credits-history-table .is-negative {
    color: #b03a3a;
    font-weight: 700;
}
@media (max-width: 700px) {
    .gats-credits-history-table { font-size: 12px; }
    .gats-credits-history-table th,
    .gats-credits-history-table td { padding: 8px 10px; }
}

/* ── Leaflet fullscreen control (custom) — gold hover, charcoal active to match ──── */
.gats-fs-control a.gats-fs-btn {
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    font-size: 18px;
    color: #1a1a1a;
    background: #fff;
    text-decoration: none;
}
.gats-fs-control a.gats-fs-btn:hover {
    background: #fff8e5;
}

/* When the wrapper is fullscreen, fill the screen and make the map area
   fill the wrapper. The legend stays inside .gats-map-area which goes
   fullscreen with it; the route panel and filters lift to absolute
   overlays so they stay reachable without exiting fullscreen.

   Structure recap:
     .gats-map-wrap (becomes flex column, fullscreen)
       ├─ .gats-map-route-panel  (absolute overlay)
       ├─ .gats-map-filter-label (hidden)
       ├─ .gats-map-filters      (absolute overlay)
       └─ .gats-map-area         (flex-grow to fill remaining space)
             ├─ .gats-map        (height: 100% of area)
             └─ .gats-map-legend-wrap (absolute overlay)

   Note: .gats-map-area is the flex child, NOT .gats-map. Pre-2.22 the
   map element was a direct child of the wrap and could flex-grow itself;
   the new map-area inner container changes that. */
.gats-map-is-fullscreen {
    background: #fff;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
}
.gats-map-is-fullscreen .gats-map-area {
    flex: 1 1 auto;
    min-height: 0;
    /* position: relative is already on .gats-map-area; don't override */
}
.gats-map-is-fullscreen .gats-map {
    width: 100%;
    height: 100% !important;
    min-height: 0;
}
/* The floating filter panel is already absolute-positioned inside
   .gats-map-area, so it carries naturally into fullscreen. We just bump
   z-index a touch to clear any fullscreen-only chrome the browser might
   overlay. */
.gats-map-is-fullscreen .gats-map-legend-wrap {
    z-index: 9999;
}
/* Filter bar (country dropdown + keyword search), route panel, and the
   "Search by" label all sit in the normal document flow above the map.
   When fullscreen, the JS moves both panels into a shared
   .gats-map-fs-overlay container that sits as a single absolute overlay
   in the top-right of the fullscreen map. They stack naturally by DOM
   order — no fragile pixel offsets. */
.gats-map-is-fullscreen .gats-map-filter-label {
    display: none; /* the "Search by" header would be cramped in overlay mode */
}

/* The shared overlay container — chrome lives here, not on the inner
   panels. Both panels render as transparent sections inside, separated
   by a hairline divider. */
.gats-map-fs-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 9999;
    width: 320px;
    max-width: calc(100vw - 280px); /* keep clear of the 220px legend + gutter */
    max-height: calc(100vh - 20px);
    overflow-y: auto;
    background: rgba(20, 14, 8, 0.92);
    color: #eee;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
    text-align: left;
}
/* Inner panel sections — transparent, just padding and the divider
   between them. */
.gats-map-fs-overlay > .gats-map-filters,
.gats-map-fs-overlay > .gats-map-route-panel {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 12px 14px;
    margin: 0;
    color: inherit;
    width: auto;
    max-width: none;
    position: static; /* override any earlier absolute positioning */
}
/* Divider between the two sections — appears as a hairline at the top
   of whichever panel is second in DOM order. */
.gats-map-fs-overlay > * + * {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* Stack items inside each section */
.gats-map-fs-overlay > .gats-map-filters > * + *,
.gats-map-fs-overlay > .gats-map-route-panel > * + * {
    margin-top: 8px;
}

/* Inputs and dropdowns inside the merged overlay — invert from the
   default light theme so they read against the dark chrome. */
.gats-map-fs-overlay select,
.gats-map-fs-overlay input[type="text"],
.gats-map-fs-overlay input[type="search"] {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #1a1a1a;
    width: 100%;
    box-sizing: border-box;
}
/* Route panel typography matches the legend — uppercase gold heading,
   muted body, gold links. */
.gats-map-fs-overlay .gats-map-route-heading {
    color: #c8a84b;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.gats-map-fs-overlay .gats-map-route-sub {
    color: #aaa;
    font-size: 11px;
    margin: 0 0 10px;
    line-height: 1.4;
}
.gats-map-fs-overlay .gats-map-route-status,
.gats-map-fs-overlay .gats-map-route-summary {
    color: #ddd;
    font-size: 12px;
}
.gats-map-fs-overlay .gats-map-route-clear,
.gats-map-fs-overlay a {
    color: #c8a84b;
}

/* ── Save bar inside map popups — compact variant ───────────────────────── */
.gats-save-bar-popup {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-start;
}
.gats-save-bar-popup .gats-save-btn {
    font-size: 12px;
    padding: 5px 10px;
    line-height: 1.2;
}
.gats-save-bar-popup .gats-save-icon { font-size: 14px; }
.gats-save-bar-popup .gats-save-count { display: none; } /* hide aggregate count in popups for space */
/* Inline variant on /account/ saved-place cards — same compact style */
.gats-save-bar-inline {
    margin-top: 10px;
    display: flex;
    justify-content: flex-start;
}
.gats-save-bar-inline .gats-save-btn {
    font-size: 12px;
    padding: 5px 10px;
}
.gats-save-bar-inline .gats-save-count { display: none; }

/* ── Drive-path route panel (above the filter bar on archive maps) ──────── */
.gats-map-route-panel {
    margin-bottom: 14px;
    padding: 14px 16px;
    background: #fafaf6;
    border: 1px solid #e0dccf;
    border-radius: 6px;
}
.gats-map-route-heading {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
}
.gats-map-route-sub {
    margin: 0 0 12px;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}
.gats-map-filter-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #888;
    margin: 0 0 6px;
}

/* Dark-band variants */
.tdm-dark-band .gats-map-route-heading { color: #fff; }
.tdm-dark-band .gats-map-route-sub { color: #ccc; }
.tdm-dark-band .gats-map-filter-label { color: #c8a84b; }
.gats-map-route-form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.gats-map-route-from,
.gats-map-route-to {
    flex: 1 1 200px;
    min-width: 160px;
    padding: 7px 10px;
    border: 1px solid #d8d3c0;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: #1a1a1a;
}
.gats-map-route-from:focus,
.gats-map-route-to:focus {
    border-color: #c8a84b;
    outline: none;
}
.gats-map-route-arrow {
    color: #c8a84b;
    font-weight: 700;
    font-size: 18px;
    flex: 0 0 auto;
}
.gats-map-route-go {
    appearance: none;
    background: #1a1a1a;
    color: #c8a84b;
    border: 1px solid #c8a84b;
    padding: 7px 14px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: background 0.12s, color 0.12s;
}
.gats-map-route-go:hover:not(:disabled) {
    background: #c8a84b;
    color: #1a1a1a;
}
.gats-map-route-go:disabled {
    opacity: 0.5;
    cursor: wait;
}
.gats-map-route-status {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
    min-height: 18px;
}
.gats-map-route-status.is-success { color: #1a1a1a; }
.gats-map-route-status.is-success strong { color: #c8a84b; }
.gats-map-route-status.is-error { color: #c00; }
.gats-map-route-clear {
    margin-left: 12px;
    color: #c8a84b;
    text-decoration: underline;
    font-size: 12px;
}
.gats-map-route-clear:hover { color: #b0933f; }

/* When inside a dark band (homepage Atlas section), recolor for contrast */
.tdm-dark-band .gats-map-route-panel {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}
.tdm-dark-band .gats-map-route-status { color: #ccc; }
.tdm-dark-band .gats-map-route-status.is-success { color: #fff; }

@media (max-width: 600px) {
    .gats-map-route-arrow { display: none; }
    .gats-map-route-go { flex: 1 1 100%; }
}

/* ── Modal login + register ───────────────────────────────────────────────
 *
 * Single global modal injected into the footer for anonymous visitors.
 * Hidden by default via [hidden]; .is-open adds the visible class for
 * animated entry. Body scroll is locked via .gats-modal-locked on <html>
 * so the page doesn't scroll behind the modal.
 */
html.gats-modal-locked { overflow: hidden; }

.gats-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.gats-modal[hidden] { display: none; }

.gats-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 14, 8, 0.78);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.gats-modal-panel {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
    padding: 28px 28px 24px;
    animation: gats-modal-in 0.18s ease-out;
}

@keyframes gats-modal-in {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

.gats-modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: transparent;
    border: 0;
    font-size: 28px;
    line-height: 1;
    color: #888;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.15s;
}
.gats-modal-close:hover { color: #1a1a1a; }

/* Tab strip */
.gats-modal-tabs {
    display: flex;
    gap: 0;
    margin: 0 0 20px;
    border-bottom: 1px solid #e6e1d5;
}
.gats-modal-tab {
    flex: 1;
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    padding: 12px 8px;
    font-size: 14px;
    font-weight: 700;
    color: #888;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: color 0.15s, border-color 0.15s;
}
.gats-modal-tab:hover { color: #1a1a1a; }
.gats-modal-tab.is-active {
    color: #1a1a1a;
    border-bottom-color: #c8a84b;
}

.gats-modal-pane { display: none; }
.gats-modal-pane.is-active { display: block; }

.gats-modal-title {
    margin: 0 0 4px;
    font-size: 20px;
    color: #1a1a1a;
}
.gats-modal-sub {
    margin: 0 0 18px;
    font-size: 13px;
    color: #666;
}

.gats-modal-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.gats-modal-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #555;
}
.gats-modal-label input {
    padding: 9px 12px;
    border: 1px solid #d8d3c0;
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    color: #1a1a1a;
    transition: border-color 0.15s;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
}
.gats-modal-label input:focus {
    border-color: #c8a84b;
    outline: none;
}
.gats-modal-hint {
    margin-top: 2px;
    font-size: 11px;
    color: #888;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
}
.gats-modal-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
}
.gats-modal-checkbox input { margin: 0; }

.gats-modal-submit {
    margin-top: 4px;
    background: #1a1a1a;
    color: #c8a84b;
    border: 1px solid #c8a84b;
    padding: 11px 14px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: background 0.12s, color 0.12s;
}
.gats-modal-submit:hover:not(:disabled) {
    background: #c8a84b;
    color: #1a1a1a;
}
.gats-modal-submit:disabled {
    opacity: 0.6;
    cursor: wait;
}

.gats-modal-error {
    display: none;
    margin-top: 4px;
    padding: 8px 10px;
    background: #fef2f2;
    border-left: 3px solid #c0392b;
    color: #8a2a1f;
    font-size: 13px;
    border-radius: 2px;
}
.gats-modal-error.is-visible { display: block; }

.gats-modal-aside {
    margin: 8px 0 0;
    text-align: center;
    font-size: 13px;
}
.gats-modal-aside a {
    color: #c8a84b;
    text-decoration: underline;
}
.gats-modal-aside a:hover { color: #b0933f; }

/* Compact on narrow screens */
@media (max-width: 480px) {
    .gats-modal-panel { padding: 20px 20px 18px; }
    .gats-modal-title { font-size: 18px; }
}

/* ── Marker popup specs list (trail + place details) ──────────────────── */
.gats-map-popup-specs {
    margin: 6px 0;
    padding: 6px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 10px;
    row-gap: 3px;
    font-size: 12px;
    line-height: 1.35;
}
.gats-map-popup-specs dt {
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 10px;
    align-self: center;
    margin: 0;
}
.gats-map-popup-specs dd {
    color: #1a1a1a;
    margin: 0;
}

/* ── Newsletter signup form ─────────────────────────────────────────────── */
.gats-subscribe {
    background: #fafaf6;
    border: 1px solid #e0dccf;
    border-radius: 8px;
    padding: 20px 22px;
}
.gats-subscribe-title {
    margin: 0 0 6px;
    font-size: 18px;
    color: #1a1a1a;
}
.gats-subscribe-desc {
    margin: 0 0 14px;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}
.gats-subscribe-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.gats-subscribe-form input[type="text"],
.gats-subscribe-form input[type="email"] {
    flex: 1 1 200px;
    min-width: 0;
    padding: 9px 11px;
    border: 1px solid #d8d3c0;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: #1a1a1a;
}
.gats-subscribe-form input:focus {
    border-color: #c8a84b;
    outline: none;
}
.gats-subscribe-form button {
    flex: 0 0 auto;
}
.gats-subscribe-msg {
    flex: 1 1 100%;
    margin-top: 8px;
    font-size: 13px;
    min-height: 18px;
}
.gats-subscribe-msg.is-success {
    color: #2c6e2c;
}
.gats-subscribe-msg.is-error {
    color: #c0392b;
}

/* Dark-band variant — when dropped into a dark theme section */
.tdm-dark-band .gats-subscribe {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.18);
}
.tdm-dark-band .gats-subscribe-title { color: #fff; }
.tdm-dark-band .gats-subscribe-desc { color: #ccc; }

/* Confirm / unsub landing pages */
.gats-subscribe-status {
    max-width: 540px;
    margin: 40px auto;
    padding: 24px 28px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0dccf;
    text-align: center;
}
.gats-subscribe-status.is-success { border-top: 4px solid #2c6e2c; }
.gats-subscribe-status.is-error   { border-top: 4px solid #c0392b; }
.gats-subscribe-status.is-neutral { border-top: 4px solid #888; }
.gats-subscribe-status h2 {
    margin: 0 0 8px;
    font-size: 24px;
    color: #1a1a1a;
}
.gats-subscribe-status p {
    margin: 0;
    font-size: 15px;
    color: #555;
}
