/* ==========================================================================
   GLOBE SECTION — small, cute, info-rich
   ========================================================================== */
.globe-section { padding: 50px 0 50px; }
.globe-section .section-head { margin-bottom: 22px; text-align: center; }

.globe-frame {
    position: relative;
    border-radius: 22px;
    background:
        radial-gradient(ellipse at 30% 0%, rgba(255, 220, 230, .55), transparent 60%),
        radial-gradient(ellipse at 70% 100%, rgba(217, 122, 139, .18), transparent 60%),
        linear-gradient(180deg, #fff7f4 0%, #fde4eb 100%);
    border: 1px solid var(--hairline-2);
    box-shadow:
        0 1px 0 rgba(255,255,255,.7) inset,
        0 18px 38px -22px rgba(146, 82, 106, .3);
    overflow: hidden;
    aspect-ratio: 1 / 1;
    max-width: 520px;
    margin: 0 auto;
}
#globe-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: grab;
}
#globe-canvas:active { cursor: grabbing; }
#globe-canvas canvas { display: block; }

.globe-labels {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.globe-label {
    position: absolute;
    top: 0; left: 0;
    transform-origin: 0 0;
    margin: -10px 0 0 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 8px;
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(217, 122, 139, .25);
    border-radius: 999px;
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--ink);
    letter-spacing: .02em;
    box-shadow: 0 4px 14px -6px rgba(146, 82, 106, .35);
    transition: opacity .25s ease;
    white-space: nowrap;
    will-change: transform, opacity;
}
.globe-label::before {
    content: '';
    position: absolute;
    left: -10px; top: 50%;
    width: 10px; height: 1px;
    background: rgba(217, 122, 139, .55);
    transform: translateY(-50%);
}
.globe-label-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(255,255,255,.85);
}

.globe-hint {
    position: absolute;
    bottom: 12px; left: 50%;
    transform: translateX(-50%);
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.7);
    border: 1px solid var(--hairline-2);
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 0.78rem;
    color: var(--ink-faint);
    pointer-events: none;
    opacity: .85;
}

.dot {
    display: inline-block;
    width: 9px; height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(255,255,255,.6);
}
.dot-blue   { background: #4a90e2; }
.dot-red    { background: #e74c3c; }
.dot-purple { background: #8a4f9c; }

/* ==========================================================================
   TRAVEL CHECKLIST MAP
   ========================================================================== */
.travel-section { padding: 50px 0 18px; }
.travel-section .section-head { margin-bottom: 22px; }

.travel-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
}

.travel-input-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* Country combobox (custom — works without datalist) */
.country-combo {
    position: relative;
    flex: 1 1 280px;
    min-width: 0;
}
.country-input {
    width: 100%;
    padding: 12px 42px 12px 18px;
    border-radius: 999px;
    border: 1px solid var(--hairline);
    background: rgba(255,255,255,.85);
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    color: var(--ink);
    box-shadow: 0 4px 14px -8px rgba(146, 82, 106, .3);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.country-input:focus {
    outline: none;
    border-color: var(--rose-deep);
    box-shadow: 0 0 0 3px rgba(217, 122, 139, .15);
}
.country-input::placeholder { color: var(--ink-faint); }

.combo-caret {
    position: absolute;
    right: 8px; top: 50%;
    transform: translateY(-50%);
    width: 28px; height: 28px;
    display: grid; place-items: center;
    border-radius: 50%;
    color: var(--ink-soft);
    background: transparent;
    border: 0;
    cursor: pointer;
    transition: background var(--t-fast), color var(--t-fast);
}
.combo-caret:hover { background: rgba(217,122,139,.1); color: var(--rose-deep); }

.country-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    z-index: 8;
    max-height: 260px;
    overflow-y: auto;
    background: rgba(255, 255, 255, .98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--hairline);
    border-radius: 18px;
    box-shadow: 0 18px 40px -16px rgba(146, 82, 106, .35);
    padding: 6px;
    display: none;
}
.country-dropdown.open { display: block; }
.country-dropdown::-webkit-scrollbar { width: 8px; }
.country-dropdown::-webkit-scrollbar-thumb {
    background: rgba(217, 122, 139, .25);
    border-radius: 999px;
}
.country-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 14px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font-family: 'Inter', sans-serif;
    font-size: 0.86rem;
    color: var(--ink);
}
.country-option:hover,
.country-option.active {
    background: linear-gradient(135deg, rgba(217,122,139,.10), rgba(217,122,139,.05));
    color: var(--rose-deep);
}
.country-option .opt-flag-dot {
    display: inline-flex; align-items: center; gap: 6px;
}
.country-option .opt-flag-dot .opt-mini-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
}
.country-dropdown-empty {
    padding: 14px 16px;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    color: var(--ink-faint);
    text-align: center;
}

.travel-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 999px;
    border: 1px solid var(--hairline);
    background: rgba(255,255,255,.7);
    color: var(--ink-soft);
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform var(--t-fast), background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
}
.travel-btn:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,.95);
}
.travel-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* Tick-only toggle */
.travel-tick {
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 50%;
    flex-shrink: 0;
    background: rgba(255, 255, 255, .9);
    border: 1px solid var(--hairline);
    color: rgba(150, 110, 120, .35); /* faded tick when off */
    display: grid;
    place-items: center;
    box-shadow: 0 4px 14px -8px rgba(146, 82, 106, .3);
}
.travel-tick:hover:not(:disabled) {
    transform: translateY(-1px);
    color: rgba(150, 110, 120, .6);
    border-color: var(--rose-deep);
}
.travel-tick .tick-icon { transition: color var(--t-fast), transform var(--t-fast); }

/* ON state — colored fill, white tick */
.travel-tick[data-state="on"] {
    border-color: transparent;
    color: white;
    box-shadow: 0 8px 18px -6px rgba(0, 0, 0, .3);
    transform: scale(1.04);
}
.travel-tick[data-state="on"] .tick-icon { transform: scale(1.08); }
.travel-btn-hins[data-state="on"]   { background: linear-gradient(135deg, #6aa9ec, #4a90e2); }
.travel-btn-rania[data-state="on"]  { background: linear-gradient(135deg, #ed7765, #e74c3c); }

/* OFF state — show role's color in the tick stroke as a hint */
.travel-btn-hins[data-state="off"]:not(:disabled)  { color: rgba(74, 144, 226, .55); }
.travel-btn-rania[data-state="off"]:not(:disabled) { color: rgba(231, 76, 60, .55); }
.travel-btn-hins[data-state="off"]:not(:disabled):hover  { color: #4a90e2; border-color: #4a90e2; }
.travel-btn-rania[data-state="off"]:not(:disabled):hover { color: #e74c3c; border-color: #e74c3c; }

.travel-stats {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    color: var(--ink-soft);
}
.travel-stats .stat {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.7);
    border: 1px solid var(--hairline-2);
}

.travel-map-frame {
    position: relative;
    isolation: isolate;
    border-radius: 22px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(255, 233, 220, .6), transparent 60%),
        linear-gradient(180deg, #fffaf6 0%, #fdeee8 100%);
    border: 1px solid var(--hairline-2);
    box-shadow:
        0 1px 0 rgba(255,255,255,.7) inset,
        0 18px 40px -22px rgba(146, 82, 106, .25);
    overflow: hidden;
    padding: 12px;
}
#travel-map {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 14px;
    background:
        radial-gradient(ellipse at 30% 30%, rgba(255, 232, 240, .7), transparent 60%),
        linear-gradient(180deg, #fdf6ef 0%, #fde7eb 100%);
    cursor: grab;
}
#travel-map:active { cursor: grabbing; }
#travel-map svg { display: block; width: 100%; height: 100%; }

/* Background ocean sphere */
#travel-map .sphere {
    fill: #d6eaf6;
    stroke: rgba(217, 122, 139, .25);
    stroke-width: 0.8;
}
/* Faint lat/lng grid */
#travel-map .graticule {
    fill: none;
    stroke: rgba(255, 255, 255, .55);
    stroke-width: 0.5;
}
/* Default country styling */
#travel-map .country {
    fill: #f5e3d8;
    stroke: #e0a890;
    stroke-width: 0.5;
    transition: fill 200ms ease, stroke 200ms ease;
    cursor: pointer;
    vector-effect: non-scaling-stroke;
}
#travel-map .country.hovered {
    fill: #f1d5c5;
    stroke: var(--rose-deep);
    stroke-width: 1.2;
}
/* Visited colors */
#travel-map .country.hins  { fill: #6aa9ec; stroke: #3a7fc8; }
#travel-map .country.rania { fill: #ed7765; stroke: #c8402d; }
#travel-map .country.both  { fill: #8a4f9c; stroke: #5e3170; }
#travel-map .country.hins.hovered  { fill: #5598dc; }
#travel-map .country.rania.hovered { fill: #df5a45; }
#travel-map .country.both.hovered  { fill: #743d83; }
/* Brief flash when a country is just selected */
#travel-map .country.flash {
    animation: countryFlash 1200ms ease-out;
}
@keyframes countryFlash {
    0%   { stroke-width: 4; stroke: #fff7d6; filter: drop-shadow(0 0 8px #fff0a0); }
    100% { stroke-width: 0.5; }
}
#travel-map svg {
    width: 100%;
    height: 100%;
    display: block;
}
#travel-map .country {
    fill: #f5e3d8;
    stroke: #e8b8a3;
    stroke-width: 0.5;
    transition: fill var(--t-fast), stroke var(--t-fast), filter var(--t-fast);
    cursor: pointer;
}
#travel-map .country:hover {
    fill: #f1d5c5;
    stroke: var(--rose-deep);
    stroke-width: 0.8;
}
#travel-map .country.hins {
    fill: #6aa9ec;
    stroke: #3a7fc8;
}
#travel-map .country.rania {
    fill: #ed7765;
    stroke: #c8402d;
}
#travel-map .country.both {
    fill: #8a4f9c;
    stroke: #5e3170;
}
#travel-map .land-bg {
    fill: rgba(217, 122, 139, .04);
    pointer-events: none;
}
.map-error {
    height: 100%;
    display: grid;
    place-items: center;
    padding: 30px;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    color: var(--ink-faint);
    text-align: center;
}

.country-tooltip {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translate(-50%, -10px);
    padding: 9px 18px;
    border-radius: 999px;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--hairline);
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 0.95rem;
    color: var(--ink);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease, transform 220ms ease;
    box-shadow: 0 10px 24px -10px rgba(146, 82, 106, .35);
    z-index: 4;
    white-space: nowrap;
}
.country-tooltip.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

@media (max-width: 640px) {
    .globe-frame { aspect-ratio: 4 / 5; }
    .globe-hint { font-size: 0.74rem; padding: 4px 10px; }
    #travel-map { aspect-ratio: 4 / 3; }
    .travel-input-row { gap: 8px; flex-wrap: nowrap; }
    /* Keep the tick toggle round on mobile too */
    .travel-tick {
        flex: 0 0 46px;
        width: 46px;
        height: 46px;
        padding: 0;
    }
}
