/* World Info MVP: use the same OctoBot site shell, palette and spacing as the existing tabs. */
:root{font-family:Arial,Helvetica,sans-serif}
*{box-sizing:border-box}
.world-intro{display:flex;justify-content:space-between;align-items:center;gap:14px;margin:1px 0 24px;flex-wrap:wrap}
.world-intro p{margin:0}
.muted{font-size:12px;color:#9eaabc;line-height:1.6}
.source-label{font-size:11px;color:#a5b3c6;font-variant-numeric:tabular-nums}
.source-label.fresh{color:#78dfa6}
.source-label.stale{color:#e3bd57}
section{min-width:0}
.section-title{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:22px 0 12px}
.section-title h2{font-size:23px;font-weight:500;margin:0;color:var(--gold)}
.world-grid{display:grid;gap:16px}
.world-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.world-panel{min-width:0;background:var(--panel);border:1px solid var(--line);border-radius:6px;padding:20px 22px}
.raid-reset-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
.raid-reset{
  display:flex;
  flex-direction:column;
  min-height:168px;
  position:relative;
  isolation:isolate;
  overflow:hidden;
}
.raid-reset::before{
  content:"";
  position:absolute;
  z-index:-1;
  pointer-events:none;
  /* Keep the loading screen logo and borders outside the card at all aspect ratios. */
  inset:-60% 0 -54%;
  background-image:linear-gradient(90deg,rgba(14,22,34,.93),rgba(14,22,34,.68)),var(--raid-art);
  background-position:center;
  background-size:cover;
}
.raid-reset-zul-gurub{--raid-art:url("img/raid-resets/zul-gurub.webp")}
.raid-reset-onyxias-lair{--raid-art:url("img/raid-resets/onyxias-lair.webp")}
.raid-reset-lower-karazhan-halls{--raid-art:url("img/raid-resets/lower-karazhan-halls.webp")}
.raid-reset-molten-core{--raid-art:url("img/raid-resets/molten-core.webp")}
.raid-reset-blackwing-lair{--raid-art:url("img/raid-resets/blackwing-lair.webp")}
.raid-reset h3{font-size:18px;margin-bottom:20px}
.raid-reset h3 a{color:inherit;text-decoration:none}
.raid-reset h3 a:hover,.raid-reset h3 a:focus-visible{text-decoration:underline}
.raid-reset .field-label,.raid-reset .buff-grid small{color:#aab7c7}
.raid-reset-sources{margin:8px 0 0}
@media(max-width:1120px){.raid-reset-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.raid-reset-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:500px){.raid-reset-grid{grid-template-columns:1fr}}
.panel-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.eyebrow{display:block;color:#96a7ba;font-size:10px;font-weight:700;letter-spacing:.12em;margin-bottom:7px}
.world-panel h2,.world-panel h3{color:var(--gold);font-size:22px;font-weight:500;margin:0}
.state-tag{flex:none;font-size:10px;font-weight:600;letter-spacing:.055em;border:1px solid #6a5930;background:#302e22;color:#dabc6d;border-radius:3px;padding:5px 7px;white-space:nowrap}
.state-tag.online{background:#1e3b33;border-color:#3d7961;color:#88e2ad}
.state-tag.estimated{background:#29394b;border-color:#52758e;color:#a8d8f2}
.state-tag.unknown{background:#282f3b;border-color:#49566b;color:#a2aebd}
.hero-stat{display:flex;align-items:baseline;gap:13px;margin:22px 0 17px;flex-wrap:wrap}
.hero-stat strong{font-size:20px;line-height:1.05;font-weight:400;color:var(--gold);font-variant-numeric:tabular-nums}
.hero-stat strong.no-data{font-size:20px;color:#a4b0be}
.hero-stat span{font-size:20px;color:#9eacbd}
.mini-divider{border-top:1px solid var(--line)}
.field-header{display:flex;justify-content:space-between;gap:10px;margin:15px 0 9px;font-size:12px;color:#d5dce7}
.field-hint{font-size:11px;color:#8f9cab}
.timer-list{min-height:52px}
.timer-row{display:flex;flex-direction:column;justify-content:flex-start;gap:4px;align-items:flex-start;border-bottom:1px solid #344052;padding:10px 0;font-size:12px}
.timer-row:last-child{border-bottom:0}
.timer-row span{color:#c6d0dc;font-size:13px;overflow-wrap:anywhere;max-width:100%}
.timer-row strong{color:#78dfa6;font-size:24px;line-height:1.2;font-weight:500;white-space:nowrap}
/* Only the bracketed guild name is bold; never inherit the green 24px timer styling. */
.timer-row span strong.raid-guild{color:inherit;font-size:inherit;font-weight:700;line-height:inherit;white-space:normal}
.timer-row small{display:block;color:#8898aa;font-size:10px;margin-top:5px}
.empty{color:#8594a7;font-size:12px;margin:13px 0}
.bottom-line{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:11px;padding-top:17px;margin-top:13px;border-top:1px solid var(--line);font-size:12px;color:#aab7c7}
.bottom-line strong{color:#e5e9ef;font-size:15px;font-weight:500}
.evidence{font-size:11px;color:#91a0b2;line-height:1.55;margin:14px 0 0;min-height:16px}
.mono{font-variant-numeric:tabular-nums;white-space:nowrap}
.boss-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;margin-top:24px}
.boss-grid>div{min-width:0;padding-right:18px}
.boss-grid>div+div{border-left:1px solid var(--line);padding-left:20px;padding-right:0}
.field-label{display:block;font-size:11px;color:#a4b0c0;margin-bottom:9px}
.clock{display:block;font-size:20px;line-height:1.3;font-weight:400;color:var(--gold);white-space:normal}
.buff-grid small,.boss-grid small{display:block;color:#91a0b2;line-height:1.45;font-size:11px;margin-top:8px}
.disclaimer{font-size:11px;color:#8898ac;line-height:1.6;margin:10px 1px 0}
.bottom-grid{margin-top:20px}
.dmf-location{display:flex;align-items:center;gap:25px;margin:24px 0 19px;min-height:74px}
.dmf-location>strong{font-size:44px;line-height:1;letter-spacing:.03em;font-weight:400;color:var(--gold);min-width:93px}
.dmf-location>div{display:flex;flex-direction:column;gap:7px;min-width:0}
.dmf-location span{font-size:13px;color:#d7dfeb}
.dmf-location small{font-size:11px;color:#91a0b2;line-height:1.55}
.location-key{display:flex;gap:13px;flex-wrap:wrap;padding-top:15px;border-top:1px solid var(--line)}
.location-key span{font-size:11px;color:#95a3b5}
.location-key strong{color:#d9c477;margin-right:4px;font-weight:600}
.boss-name{display:block;color:var(--gold);font-size:22px;font-weight:400;line-height:1.3}
.calendar-panel{margin-top:20px}
.calendar-title{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;flex-wrap:wrap}
.calendar-title .muted{margin:9px 0 0}
.calendar-controls{display:flex;align-items:center;gap:7px}
.calendar-controls strong{font-size:12px;font-weight:500;color:#d9e1ec;min-width:132px;text-align:center}
button{font:inherit;border:1px solid var(--line);border-radius:4px;background:#233044;color:#c5d1e0;padding:7px 11px;cursor:pointer;font-size:12px}
button:hover{border-color:var(--gold);color:var(--gold)}
button:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
.calendar-controls button{min-width:32px}
.madness-calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;margin-top:22px}
.weekday{font-size:10px;letter-spacing:.05em;text-align:center;text-transform:uppercase;color:#99a7b9;padding:8px 0}
.day{min-width:0;min-height:65px;border:1px solid #3c495b;border-radius:3px;background:#1a2738;padding:9px;position:relative}
.day.other-month{opacity:.28}
.day.is-today{border-color:#ebcf59;box-shadow:inset 0 0 0 1px #ebcf59}
.day-number{display:block;font-size:11px;color:#d1d9e5}
.day-boss{display:block;font-size:11px;color:#c3d2e0;margin-top:10px;overflow-wrap:anywhere}
.day.is-change .day-boss{font-weight:600;color:#f2d971}
.day[data-boss="grilek"]{background:#30392d}
.day[data-boss="hazzarah"]{background:#2e3344}
.day[data-boss="renataki"]{background:#40332e}
.day[data-boss="wushoolay"]{background:#263e47}
.rotation-key{display:flex;gap:10px 20px;flex-wrap:wrap;margin-top:17px}
.rotation-key span{display:flex;gap:7px;align-items:center;color:#adbac9;font-size:11px}
.rotation-key i{width:10px;height:10px;border:1px solid #748199;border-radius:2px}
.rotation-key i.grilek{background:#606e4f}
.rotation-key i.hazzarah{background:#626b98}
.rotation-key i.renataki{background:#97735c}
.rotation-key i.wushoolay{background:#4c8997}
.source-note{font-size:11px;color:#91a0b2;line-height:1.65;margin:20px 0 0;padding-top:14px;border-top:1px solid var(--line)}
a{color:#a7b9cf}
footer{display:flex;justify-content:space-between;gap:15px;margin:26px 0;color:#8190a4;font-size:11px;line-height:1.6}
@media(max-width:800px){
 .world-grid.two{grid-template-columns:1fr}
 .world-panel{padding:18px 15px}
 .day{min-height:58px;padding:6px}
 .day-boss{font-size:10px}
 footer{flex-direction:column}
}
@media(max-width:500px){
 .source-label{font-size:10px}
 .boss-grid>div{padding-right:9px}
 .boss-grid>div+div{padding-left:10px}
 .clock{font-size:18px}
 .boss-name{font-size:19px}
 .dmf-location{gap:14px}
 .dmf-location>strong{font-size:38px;min-width:77px}
 .madness-calendar{gap:3px}
 .day{min-height:50px;padding:5px}
 .day-boss{display:none}
 .day.is-change .day-boss{display:block;font-size:9px;margin-top:4px}
 .calendar-controls{flex-wrap:wrap}
 .calendar-controls strong{min-width:104px}
}

.heading-with-icon{display:flex;align-items:center;gap:12px}.heading-with-icon .eyebrow{margin-bottom:5px}
.boss-icon{width:44px;height:44px;flex:none;border:1px solid #3a4a60;border-radius:4px;background:#0d1420}
.buff-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:0;margin-top:24px}
.raid-reset .buff-grid{margin-top:auto}
.buff-grid>div{min-width:0;padding-right:18px}.buff-grid>div+div{border-left:1px solid var(--line);padding-left:20px}.buff-grid>div:last-child{padding-right:0}
.faction-alliance{background:linear-gradient(135deg,#162c57 0%,var(--panel) 62%);border-color:#2a4a86;border-left:4px solid #2f5cb3}
.faction-horde{background:linear-gradient(135deg,#5C1010 0%,var(--panel) 62%);border-color:#772020;border-left:4px solid #8c2323}
@media(max-width:780px){.buff-grid{grid-template-columns:1fr}.buff-grid>div+div{border-left:0;border-top:1px solid var(--line);padding:14px 0 0;margin-top:14px}.buff-grid>div{padding-right:0}}
.faction-icon{width:36px;height:36px;flex:none;object-fit:contain}.faction-icon[hidden]{display:none}
.dmf-location>.dmf-icon{width:48px;height:48px}
.dmf-location>strong{font-size:34px;min-width:0}

.clear-block{margin:8px 0 14px;display:flex;flex-direction:column;gap:5px}.clear-block .clock{font-size:24px;line-height:1.2}
.clear-block small{color:#91a0b2;font-size:11px;line-height:1.5}
.clear-tag{align-self:flex-start;font-size:9px;letter-spacing:.08em;font-weight:700;color:#a8d8f2;background:#29394b;border:1px solid #52758e;border-radius:3px;padding:3px 6px}
.clear-tag[hidden]{display:none}
.drops-line{align-items:flex-start}.drop-pair{display:flex;flex-direction:column;gap:3px;text-align:right;font-size:11px;color:#bcc8d8}

.faction-moving{background:linear-gradient(135deg,#4a525e 0%,var(--panel) 62%);border-color:#5b6573;border-left:4px solid #7a8494}
.dmf-detail{margin-top:18px;display:flex;flex-direction:column;gap:7px}.dmf-detail span{font-size:13px;color:#d7dfeb}.dmf-detail span[hidden]{display:none}.dmf-detail small{font-size:11px;color:#a5b0bf;line-height:1.55}

/* Darkmoon Faire is only as big as what it shows; Edge of Madness takes the rest of the row */
.world-grid.two.bottom-grid{grid-template-columns:fit-content(480px) minmax(0,1fr);align-items:start}
@media(max-width:780px){.world-grid.two.bottom-grid{grid-template-columns:minmax(0,1fr)}}
.heading-actions{display:flex;align-items:center;gap:8px;flex:none}
.panel-arrow{width:28px;height:24px;padding:0;display:inline-flex;align-items:center;justify-content:center;background:#182333;border:1px solid #39465a;border-radius:4px;color:#a0b1c8;cursor:pointer}
.panel-arrow:hover,.panel-arrow:focus-visible{border-color:#9d8a35;color:#f4d65c}
.panel-arrow span{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:6px solid currentColor}
.panel-arrow[aria-expanded=true] span{transform:rotate(180deg)}
/* Calendar, compact and inside the Edge of Madness panel */
.calendar-body{margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}
.calendar-body[hidden]{display:none}
.calendar-body .calendar-title{align-items:center;gap:8px}
.calendar-body .calendar-title .muted{margin:0;font-size:10px;max-width:190px;line-height:1.4}
.calendar-body .calendar-controls{gap:4px}
.calendar-body .calendar-controls strong{font-size:11px;min-width:92px}
.calendar-body .calendar-controls button{min-width:26px;padding:4px 7px;font-size:11px}
.calendar-body .madness-calendar{gap:3px;margin-top:12px}
.calendar-body .weekday{font-size:9px;padding:4px 0}
.calendar-body .day{min-height:40px;padding:4px 5px}
.calendar-body .day-number{font-size:10px}
.calendar-body .day-boss{font-size:9px;margin-top:3px}
.calendar-body .rotation-key{margin-top:12px;gap:6px 14px}.calendar-body .rotation-key span{font-size:10px}
.calendar-body .source-note{font-size:10px;margin-top:12px;padding-top:10px}

/* Empty notes take no space; the explanatory text lives behind the small (i) at the bottom right of each block */
.world-panel{position:relative}
small:empty,.evidence:empty{display:none}
.info-i{position:absolute;right:12px;bottom:10px;width:16px;height:16px;border:1px solid #5b6b82;border-radius:50%;color:#8fa0b6;font:italic 700 11px/14px Georgia,serif;text-align:center;cursor:help;user-select:none}
.info-i:hover,.info-i:focus-visible{border-color:#9d8a35;color:#f4d65c;outline:0}
.info-i::after{content:attr(data-tip);position:absolute;right:-6px;bottom:24px;width:min(300px,70vw);padding:9px 11px;background:#0e1623;border:1px solid #39465a;border-radius:6px;color:#c6d0dc;font:400 11px/1.55 system-ui,sans-serif;text-align:left;box-shadow:0 8px 22px rgba(0,0,0,.45);opacity:0;visibility:hidden;pointer-events:none;z-index:5}
.info-i:hover::after,.info-i:focus::after{opacity:1;visibility:visible}
.world-panel{padding-bottom:30px}

/* Darkmoon Faire location stays on one line; the panel grows to fit it */
#dmf-heading{white-space:nowrap}

/* Raid panels glow in the colour of the flame in each head's icon: Onyxia's fire (#DD500A) and Nefarian's violet (#8050B0) */
.raid-onyxia{background:linear-gradient(135deg,#6E2808 0%,var(--panel) 62%);border-color:#93390c;border-left:4px solid #bd4510}
.raid-nefarian{background:linear-gradient(135deg,#3C2760 0%,var(--panel) 62%);border-color:#58398a;border-left:4px solid #7049a6}

/* Current and next boss take the hue of their calendar colour, lightened to read on the panel */
.boss-name[data-boss="grilek"]{color:#a3bd86}
.boss-name[data-boss="hazzarah"]{color:#98a4e6}
.boss-name[data-boss="renataki"]{color:#dca17b}
.boss-name[data-boss="wushoolay"]{color:#72c9dd}

/* Estimate confidence: low red, medium yellow, high green */
.conf{font-weight:700}
.conf-low{color:#ff6b5e}
.conf-medium{color:#f2d54a}
.conf-high{color:#6fe08f}

/* Darkmoon Faire banner hangs from the top-right of the panel; the state tag sits to its left */
#dmf-panel{overflow:hidden;padding-right:88px}
.dmf-banner{position:absolute;top:0;right:16px;width:60px;height:auto;pointer-events:none;filter:drop-shadow(0 3px 5px rgba(0,0,0,.55));z-index:2}
#dmf-panel .state-tag{display:none}

#dmf-panel{padding-bottom:20px}

/* Zul'Gurub / Edge of Madness glows in the same way as the faction and raid panels */
.zg-panel{background:linear-gradient(135deg,#314115 0%,var(--panel) 62%);border-color:#455a22;border-left:4px solid #62823a}


.clock.na{color:#ff6b5e}
.hero-stat span[hidden]{display:none}

.clock .tm{font-size:.38em;font-weight:400;margin-left:2px;vertical-align:super;line-height:0;opacity:.85}

/* Raid panels: "Last raid finished" and "Last confirmed head drop" are pinned to the bottom, so both panels line up whatever is above them */
.world-panel.raid-onyxia,.world-panel.raid-nefarian{display:flex;flex-direction:column}
.raid-onyxia>.bottom-line:not(.drops-line),.raid-nefarian>.bottom-line:not(.drops-line){margin-top:auto}

/* "Raid in progress: 2": the label leads and the count follows */
.hero-stat span{order:-1}
/* Sound alerts */
.section-tools{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.sound-button{display:inline-flex;align-items:center;gap:7px;padding:5px 10px;font-size:12px;color:#c0ccda}
.sound-button strong{font-weight:700;color:#8fa0b6}
.sound-button.on strong{color:#6fe08f}
.sound-button:hover,.sound-button:focus-visible{border-color:#9d8a35;color:#f4d65c}
.sound-panel{margin:0 0 14px;padding:14px 16px;background:var(--panel);border:1px solid var(--line);border-radius:6px}
.sound-panel[hidden]{display:none}
.sound-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:7px 0;border-bottom:1px solid #2c384a}
.sound-row:last-child{border-bottom:0}
.sound-master{padding-top:0}
.sound-event-label{display:flex;align-items:center;gap:8px;flex:1 1 230px;font-size:13px;color:#d7dfeb}
.sound-row select{min-width:150px;max-width:210px;height:30px;font-size:12px;border-radius:1px}
.sound-controls{display:flex;align-items:center;gap:8px;margin-left:auto}
.sound-row.disabled{opacity:.55}
.sound-row.disabled .sound-event-label{color:#8f9cab}
.sound-disabled-note{flex:1 0 100%;margin:0;font-size:11px;font-style:italic;color:#9aa8ba}
.sound-disabled-note[hidden]{display:none}
.sound-volume{display:flex;align-items:center;gap:8px;font-size:12px;color:#aab7c7}
.sound-volume input{width:140px}
.sound-test{width:30px;height:30px;padding:0;display:inline-flex;align-items:center;justify-content:center}
.sound-note{margin:10px 0 0;font-size:12px;color:#6fe08f}
.sound-note:empty{display:none}
.sound-fine{margin:10px 0 0;font-size:11px;color:#8898ac;line-height:1.5}

/* Loading states: trailing dots appear one by one (nothing, . .. ...) without changing the element's text.
   The three dots are always there but clipped to a width that grows in four steps, which animates reliably everywhere. */
.dots::after{content:"...";display:inline-block;overflow:hidden;white-space:nowrap;vertical-align:bottom;width:0;animation:loading-dots 1.2s steps(4,end) infinite}
@keyframes loading-dots{to{width:1.13em}}
@media (prefers-reduced-motion:reduce){.dots::after{animation:none;width:auto}}

/* Edge of Madness: countdown urgency changes as its next rotation approaches. */
.zg-panel #eom-countdown.rotation-safe{color:#78dfa6}
.zg-panel #eom-countdown.rotation-week{color:#ffd100}
.zg-panel #eom-countdown.rotation-soon{color:#ff6b5e}
