/* =====================================================================
   A RANDOM PLACE ON THE INTERNET  -  /odds.css
   The small box near the bottom of the home page's right column:
   a line of explanation and one button. The places are listed in
   /javascripts/odds.js.
   ===================================================================== */

.widget.webrand {
    --wr-ink: #1b1a17;
    --wr-faint: #9a948a;
    --wr-rule: #d9d3c7;
    --wr-accent: #8a2b1d;
    font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
    text-align: center;
}
.widget.webrand h3 { font-family: inherit; }
.widget.webrand p { text-align: center; }
.webrand-sub { margin: 0 auto 14px; max-width: 24em; font-size: 0.9rem; font-style: italic; line-height: 1.45; color: var(--wr-faint); }

/* --- the little turning globe --- */
.webrand-globe { display: block; width: 46px; height: 46px; margin: 2px auto 10px; color: var(--wr-accent); }
.webrand-globe circle, .webrand-globe ellipse, .webrand-globe path { fill: none; stroke: currentColor; stroke-width: 1.2; }
.webrand-globe .wr-m { transform-origin: 24px 24px; animation: wr-turn 6s linear infinite; }
.webrand-globe .wr-m2 { animation-delay: -3s; }
.webrand-globe .wr-lat { opacity: 0.45; }
@keyframes wr-turn {
    0%   { transform: scaleX(1);    opacity: 0; }
    10%  { opacity: 0.9; }
    50%  { transform: scaleX(0.02); opacity: 0.9; }
    90%  { opacity: 0.9; }
    100% { transform: scaleX(-1);   opacity: 0; }
}

/* --- the button --- */
a.webrand-go, a.webrand-go:visited {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border: 1px solid var(--wr-rule);
    border-radius: 999px;
    background: #fff;
    color: var(--wr-ink);
    font-size: 1rem;
    text-decoration: none;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
a.webrand-go:hover {
    background: var(--wr-ink);
    border-color: var(--wr-ink);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px -8px rgba(27, 26, 23, 0.55);
}
a.webrand-go:active { transform: translateY(0); }
a.webrand-go:focus-visible { outline: 2px solid var(--wr-accent); outline-offset: 3px; }
.webrand-dice { display: inline-block; color: var(--wr-accent); transition: transform 0.5s cubic-bezier(.2, .7, .2, 1), color 0.25s ease; }
a.webrand-go:hover .webrand-dice { transform: rotate(180deg); color: #e9b9ab; }
a.webrand-go.is-spun .webrand-dice { animation: wr-roll 0.7s cubic-bezier(.2, .7, .2, 1); }
@keyframes wr-roll { from { transform: rotate(0); } to { transform: rotate(720deg); } }

/* --- "Off to ..." line under the button --- */
.webrand-line {
    min-height: 1.4em;
    margin: 10px 0 0;
    font-size: 0.85rem;
    font-style: italic;
    color: var(--wr-faint);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.webrand-line.is-on { opacity: 1; }
.webrand-line.is-landed { color: var(--wr-accent); animation: wr-land 0.4s ease; }
@keyframes wr-land { from { transform: translateY(3px); opacity: 0.4; } }

@media (prefers-reduced-motion: reduce) {
    .webrand-globe .wr-m, .webrand-dice, a.webrand-go, .webrand-line { animation: none !important; transition: none; }
    .webrand-globe .wr-m2 { display: none; }
}
