/* =====================================================================
   THE WORLD RIGHT NOW  -  /world-clock/world-map.css
   The glowing dot map on the World Clock page (made by world-map.js).
   It sits in the same dark plastic case as the little clocks, so it
   looks like one big old-school display. Amber is day, green is night.
   ===================================================================== */

.wm-section { margin-top: 26px; }

.wm-case {
    padding: 8px;
    border-radius: 16px;
    background: linear-gradient(160deg, #403c36, #1d1b18 55%, #2b2824);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -2px 0 rgba(0, 0, 0, 0.45), 0 14px 30px -18px rgba(27, 26, 23, 0.7);
    animation: wc-card-in 0.7s cubic-bezier(.2, .7, .2, 1) both 0.1s;
}

.wm-glass {
    --glow: var(--night);
    --glow-rgb: 143, 247, 223;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background: radial-gradient(ellipse at 50% 40%, #0f1d1a, #040807 80%);
    box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.9), 0 0 0 1px #000, 0 1px 0 rgba(255, 255, 255, 0.08);
    color: var(--glow);
    font: 0.62rem/1.4 var(--wc-mono);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    user-select: none;
    -webkit-user-select: none;
    transition: color 1.2s ease;
}
.wm-glass.is-day { --glow: var(--day); --glow-rgb: 255, 201, 107; }
.wm-glass::after {                       /* fine wire mesh, like the clocks */
    content: "";
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    background: radial-gradient(rgba(0, 0, 0, 0.5) 0.55px, transparent 0.9px) 0 0 / 3px 3px;
    opacity: 0.35;
}
.wm-glass p { margin: 0; font-size: inherit; line-height: 1.4; }

/* ---- the thin readout bars above and below the map ---- */
.wm-bar {
    position: relative;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 22px;
    padding: 9px 14px;
    color: rgba(var(--glow-rgb), 0.62);
    text-shadow: 0 0 5px rgba(var(--glow-rgb), 0.45);
}
.wm-bar b { font-weight: normal; color: var(--glow); }
.wm-bar-top { border-bottom: 1px solid rgba(var(--glow-rgb), 0.12); }
.wm-bar-bottom { justify-content: space-between; border-top: 1px solid rgba(var(--glow-rgb), 0.12); min-height: 2.9em; }
.wm-live { display: inline-flex; align-items: center; gap: 7px; }
.wm-live i { width: 6px; height: 6px; border-radius: 50%; background: #ff6b4a; box-shadow: 0 0 6px #ff6b4a; animation: wc-rec 2s ease-in-out infinite; }
.is-planned .wm-live i { background: var(--glow); box-shadow: 0 0 6px var(--glow); animation: none; }
.wm-read { text-transform: none; letter-spacing: 0.06em; font-size: 0.7rem; }
.wm-legend { display: inline-flex; gap: 14px; }
.wm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.wm-legend i { width: 7px; height: 7px; border-radius: 50%; }
.wm-legend .d { background: var(--day); box-shadow: 0 0 6px var(--day); }
.wm-legend .n { background: var(--night); box-shadow: 0 0 6px var(--night); }
.wm-legend .h { background: #ff6b4a; box-shadow: 0 0 6px #ff6b4a; }

/* ---- the map ---- */
.wm-stage {
    position: relative;
    height: 0;
    min-height: 120px;
    cursor: crosshair;
    outline: none;
    overflow: hidden;
    touch-action: manipulation;
}
.wm-stage:focus-visible { box-shadow: inset 0 0 0 1px rgba(var(--glow-rgb), 0.6); }
.wm-stage canvas { position: absolute; left: 0; top: 0; display: block; }
.wm-fx { pointer-events: none; }
.is-failed .wm-stage { height: 160px !important; }

/* the sun, where it's straight overhead */
.wm-sun { position: absolute; z-index: 1; width: 0; height: 0; pointer-events: none; }
.wm-sun i {
    position: absolute;
    left: -7px;
    top: -7px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle, #fffbe8 0 35%, #ffd27a 60%, rgba(255, 201, 107, 0) 72%);
    box-shadow: 0 0 14px 4px rgba(255, 201, 107, 0.55), 0 0 40px 14px rgba(255, 201, 107, 0.18);
    animation: wm-sun 4s ease-in-out infinite;
}
@keyframes wm-sun { 50% { transform: scale(1.18); box-shadow: 0 0 18px 6px rgba(255, 201, 107, 0.6), 0 0 50px 18px rgba(255, 201, 107, 0.22); } }

/* the clocks from the page, as pins */
.wm-pins { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.wm-pin {
    --c: var(--night);
    position: absolute;
    width: 0;
    height: 0;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    pointer-events: auto;
}
.wm-pin.is-day { --c: var(--day); }
.wm-pin.is-home { --c: #ff6b4a; }
.wm-pin i {
    position: absolute;
    left: -4px;
    top: -4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.6), 0 0 8px var(--c);
}
.wm-pin i::after {                       /* a soft ring going out, now and then */
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 1px solid var(--c);
    opacity: 0;
    animation: wm-ping 3.2s ease-out infinite;
    animation-delay: var(--d, 0s);
}
@keyframes wm-ping { 0% { transform: scale(0.6); opacity: 0.9; } 70%, 100% { transform: scale(3.4); opacity: 0; } }
.wm-pin::before {                        /* a bigger, invisible target for the mouse */
    content: "";
    position: absolute;
    left: -11px;
    top: -11px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
}
.wm-pin span {
    position: absolute;
    left: 9px;
    top: -7px;
    white-space: nowrap;
    font: 0.56rem/1 var(--wc-mono);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--c);
    text-shadow: 0 0 5px var(--c), 0 0 2px #000, 0 0 2px #000;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.wm-pin.is-home span, .wm-pin.is-you span, .wm-pin:hover span, .wm-pin:focus-visible span { opacity: 1; transform: none; }
.wm-pin:hover i { transform: scale(1.4); }

/* the crosshair that follows the mouse */
.wm-cross { position: absolute; left: 0; top: 0; z-index: 3; width: 0; height: 0; pointer-events: none; opacity: 0; transition: opacity 0.25s ease; }
.wm-cross.is-on { opacity: 1; }
.wm-ch, .wm-cv { position: absolute; display: block; background: rgba(var(--glow-rgb), 0.22); }
.wm-ch { left: -3000px; width: 6000px; top: 0; height: 1px; }
.wm-cv { top: -3000px; height: 6000px; left: 0; width: 1px; }
.wm-cross::before {                      /* the little ring at the centre */
    content: "";
    position: absolute;
    left: -6px;
    top: -6px;
    width: 10px;
    height: 10px;
    border: 1px solid var(--glow);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(var(--glow-rgb), 0.7);
}
.wm-tag {
    position: absolute;
    left: 12px;
    top: 9px;
    padding: 3px 6px;
    white-space: pre;
    border: 1px solid rgba(var(--glow-rgb), 0.35);
    border-radius: 3px;
    background: rgba(3, 8, 7, 0.78);
    color: var(--glow);
    font: 0.6rem/1 var(--wc-mono);
    letter-spacing: 0.14em;
    text-shadow: 0 0 4px rgba(var(--glow-rgb), 0.6);
}
.wm-tag.is-left { left: auto; right: 12px; }

/* the brackets around a place you've locked on to */
.wm-lock { position: absolute; z-index: 3; width: 0; height: 0; pointer-events: none; opacity: 0; }
.wm-lock.is-on { opacity: 1; animation: wm-lock-in 0.45s cubic-bezier(.2, .7, .2, 1); }
.wm-lock i {
    position: absolute;
    width: 7px;
    height: 7px;
    border: 0 solid var(--glow);
    filter: drop-shadow(0 0 3px rgba(var(--glow-rgb), 0.9));
    animation: wm-breathe 2.4s ease-in-out infinite;
}
.wm-lock i:nth-child(1) { left: -12px; top: -12px; border-width: 1.5px 0 0 1.5px; --dx: -2px; --dy: -2px; }
.wm-lock i:nth-child(2) { right: -12px; top: -12px; border-width: 1.5px 1.5px 0 0; --dx: 2px; --dy: -2px; }
.wm-lock i:nth-child(3) { left: -12px; bottom: -12px; border-width: 0 0 1.5px 1.5px; --dx: -2px; --dy: 2px; }
.wm-lock i:nth-child(4) { right: -12px; bottom: -12px; border-width: 0 1.5px 1.5px 0; --dx: 2px; --dy: 2px; }
@keyframes wm-breathe { 50% { transform: translate(var(--dx), var(--dy)); } }
@keyframes wm-lock-in { from { transform: scale(2.6) rotate(45deg); opacity: 0; } }

/* ---- the big time, over the Pacific ---- */
.wm-main {
    position: absolute;
    left: 1.4%;
    bottom: 5%;
    z-index: 4;
    box-sizing: border-box;
    max-width: 23.5%;
    padding: 11px 13px;
    border: 1px solid rgba(var(--glow-rgb), 0.16);
    border-radius: 8px;
    background: linear-gradient(160deg, rgba(10, 20, 18, 0.72), rgba(3, 7, 6, 0.6));
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    cursor: default;
}
.is-day .wm-main { background: linear-gradient(160deg, rgba(26, 19, 9, 0.72), rgba(8, 6, 3, 0.6)); }
.wm-main.is-blip { animation: wm-blip 0.45s ease; }
@keyframes wm-blip { 0% { opacity: 1; } 15% { opacity: 0.25; } 30% { opacity: 1; } 45% { opacity: 0.6; } 100% { opacity: 1; } }
.wm-glass .wm-label { margin-bottom: 7px !important; font-size: 0.62rem; color: rgba(var(--glow-rgb), 0.75); text-shadow: 0 0 5px rgba(var(--glow-rgb), 0.5); }
.wm-time { display: flex; align-items: flex-end; gap: 8px; }
.wm-digits {
    display: flex;
    align-items: center;
    gap: 4px;
    transform: skewX(-6deg);
    filter: drop-shadow(0 0 2px rgba(var(--glow-rgb), 0.85)) drop-shadow(0 0 8px rgba(var(--glow-rgb), 0.35));
}
.wm-digits .wc-d { width: 26px; height: 45px; }
.wm-digits .wc-colon { gap: 13px; }
.wm-digits .wc-colon i { width: 6px; height: 6px; opacity: 1; }
.wm-side { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-bottom: 2px; }
.wm-ap { min-height: 1em; font-size: 0.66rem; color: var(--glow); text-shadow: 0 0 5px rgba(var(--glow-rgb), 0.7); }
.wm-secs { display: flex; gap: 3px; transform: skewX(-6deg); filter: drop-shadow(0 0 2px rgba(var(--glow-rgb), 0.8)); }
.wm-secs .wc-d { width: 13px; height: 23px; }
.wm-glass .wm-date { margin-top: 9px !important; color: var(--glow); font-size: 0.7rem; letter-spacing: 0.2em; text-shadow: 0 0 5px rgba(var(--glow-rgb), 0.6); }
.wm-glass .wm-sub { margin-top: 3px !important; font-size: 0.6rem; color: rgba(var(--glow-rgb), 0.6); text-transform: none; letter-spacing: 0.08em; }
.wm-glass .wm-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px !important; }
.wm-glass .wm-actions[hidden] { display: none; }
.wm-glass .wm-actions button {
    padding: 4px 10px;
    border: 1px solid rgba(var(--glow-rgb), 0.45);
    border-radius: 999px;
    background: transparent;
    color: var(--glow);
    font: 0.6rem/1.2 var(--wc-mono);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.wm-glass .wm-actions button:hover, .wm-actions button:focus-visible { background: var(--glow); color: #050a09; box-shadow: 0 0 12px rgba(var(--glow-rgb), 0.5); outline: none; }
.wm-glass .wm-actions button[hidden] { display: none; }

/* ---- smaller screens: the big time moves under the map ---- */
@media (max-width: 1000px) {
    .wm-main { max-width: 26%; padding: 8px 9px; }
    .wm-glass .wm-date { font-size: 0.6rem; letter-spacing: 0.12em; }
    .wm-glass .wm-sub { display: none; }
    .wm-digits .wc-d { width: 22px; height: 38px; }
    .wm-digits .wc-colon { gap: 11px; }
    .wm-digits .wc-colon i { width: 4px; height: 4px; }
}
@media (max-width: 640px) {
    .wm-case { padding: 6px; border-radius: 13px; }
    .wm-hide-s { display: none; }
    .wm-main { position: relative; left: auto; bottom: auto; max-width: none; margin: 0; border-width: 1px 0 0; border-radius: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
    .wm-legend { display: none; }
    .wm-pin span { display: none; }
    .wm-pin.is-home span { display: block; }
    .wm-pin:not(.is-home) i::after { display: none; }
    .wm-pin i { left: -3px; top: -3px; width: 6px; height: 6px; }
}

@media (prefers-reduced-motion: reduce) {
    .wm-case, .wm-sun i, .wm-pin i::after, .wm-lock i, .wm-lock.is-on, .wm-main.is-blip, .wm-live i { animation: none !important; }
}
