/*
 * WarCitadel Pandaria Realm Status v1.0.0
 * Scoped to .wcps so it remains stable across FusionCMS themes.
 */

.type-pandaria_status,
.sidebox-pandaria_status {
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.type-pandaria_status > [box-overlay],
.type-pandaria_status > .box-head,
.sidebox-pandaria_status > .sidebox-head {
    display: none !important;
}

.type-pandaria_status > .box-body,
.sidebox-pandaria_status > .sidebox-body {
    overflow: visible !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.wcps {
    --wcps-accent: #9ee64a;
    --wcps-accent-rgb: 158, 230, 74;
    --wcps-gold: #d8bd70;
    --wcps-gold-bright: #f0dc96;
    --wcps-ink: #060d0c;
    --wcps-text: #f3f1e8;
    --wcps-muted: #9da9a1;
    --wcps-line: rgba(196, 177, 105, .2);
    position: relative;
    isolation: isolate;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    color: var(--wcps-text);
    border: 1px solid rgba(198, 174, 92, .34);
    border-radius: 26px;
    background-color: #07100e;
    background-image:
        linear-gradient(180deg, rgba(5, 13, 12, .72) 0%, rgba(4, 10, 9, .82) 42%, rgba(3, 8, 8, .95) 100%),
        linear-gradient(90deg, rgba(7, 16, 14, .62), rgba(7, 16, 14, .18) 52%, rgba(7, 16, 14, .68)),
        url('../images/pandaria-mist.jpg');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    box-shadow:
        0 22px 55px rgba(0, 0, 0, .48),
        0 0 0 4px rgba(5, 12, 11, .88),
        0 0 0 5px rgba(190, 166, 82, .14),
        inset 0 1px 0 rgba(255, 255, 255, .055),
        inset 0 0 80px rgba(0, 0, 0, .35);
    font-family: Inter, Roboto, "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    text-align: left;
    -webkit-font-smoothing: antialiased;
}

@supports (background-image: image-set(url("x.webp") type("image/webp"))) {
    .wcps {
        background-image:
            linear-gradient(180deg, rgba(5, 13, 12, .72) 0%, rgba(4, 10, 9, .82) 42%, rgba(3, 8, 8, .95) 100%),
            linear-gradient(90deg, rgba(7, 16, 14, .62), rgba(7, 16, 14, .18) 52%, rgba(7, 16, 14, .68)),
            image-set(
                url('../images/pandaria-mist.webp') type('image/webp'),
                url('../images/pandaria-mist.jpg') type('image/jpeg')
            );
    }
}

.wcps[data-state="partial"] {
    --wcps-accent: #efba4c;
    --wcps-accent-rgb: 239, 186, 76;
}

.wcps[data-state="offline"],
.wcps[data-state="unconfigured"] {
    --wcps-accent: #de766d;
    --wcps-accent-rgb: 222, 118, 109;
}

.wcps::before,
.wcps::after {
    position: absolute;
    z-index: 0;
    pointer-events: none;
    content: "";
}

.wcps::before {
    inset: 5px;
    border: 1px solid rgba(222, 199, 119, .12);
    border-radius: 21px;
}

.wcps::after {
    top: -25%;
    right: -32%;
    width: 85%;
    height: 62%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--wcps-accent-rgb), .17), transparent 66%);
    filter: blur(6px);
    opacity: .82;
    transition: background .35s ease;
}

.wcps__mist {
    position: absolute;
    z-index: 0;
    inset: 0;
    pointer-events: none;
    opacity: .45;
    background:
        radial-gradient(circle at 18% 13%, rgba(232, 211, 139, .1), transparent 22%),
        radial-gradient(circle at 74% 68%, rgba(var(--wcps-accent-rgb), .08), transparent 31%),
        repeating-linear-gradient(122deg, transparent 0 11px, rgba(255, 255, 255, .006) 12px 13px);
    mix-blend-mode: screen;
}

.wcps__live {
    position: relative;
    z-index: 2;
}

.wcps__panel {
    padding: clamp(19px, 5.8%, 28px);
}

.wcps__header,
.wcps__footer,
.wcps__kicker,
.wcps__status,
.wcps__hero,
.wcps__eyebrow,
.wcps__meta,
.wcps__stat,
.wcps__stable,
.wcps__info {
    display: flex;
    align-items: center;
}

.wcps__header {
    min-height: 36px;
    justify-content: space-between;
    gap: 12px;
}

.wcps__kicker {
    min-width: 0;
    gap: 10px;
    color: #b5c0b8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .19em;
    line-height: 1;
    text-transform: uppercase;
}

.wcps__signal {
    width: 20px;
    height: 20px;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2.3;
}

.wcps__status {
    flex: 0 0 auto;
    justify-content: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 13px;
    color: var(--wcps-accent);
    border: 1px solid rgba(var(--wcps-accent-rgb), .25);
    border-radius: 999px;
    background: rgba(var(--wcps-accent-rgb), .075);
    box-shadow: inset 0 0 18px rgba(var(--wcps-accent-rgb), .04);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .17em;
    line-height: 1;
    text-transform: uppercase;
}

.wcps__status-dot,
.wcps__players-dot {
    display: block;
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--wcps-accent);
    box-shadow: 0 0 0 4px rgba(var(--wcps-accent-rgb), .08), 0 0 14px rgba(var(--wcps-accent-rgb), .78);
    animation: wcps-pulse 2.4s ease-in-out infinite;
}

.wcps__rule {
    height: 1px;
    margin: 20px 0;
    background: linear-gradient(90deg, transparent, var(--wcps-line) 7%, var(--wcps-line) 93%, transparent);
}

.wcps__realm + .wcps__realm {
    padding-top: 22px;
    margin-top: 22px;
    border-top: 1px solid var(--wcps-line);
}

.wcps__hero {
    position: relative;
    gap: 16px;
    min-width: 0;
}

.wcps__panda-ring {
    --wcps-population: 0%;
    position: relative;
    flex: 0 0 91px;
    width: 91px;
    height: 91px;
    padding: 3px;
    border-radius: 50%;
    background: conic-gradient(
        var(--wcps-accent) 0 var(--wcps-population),
        rgba(196, 177, 105, .16) var(--wcps-population) 100%
    );
    box-shadow:
        0 0 0 1px rgba(225, 199, 107, .28),
        0 12px 28px rgba(0, 0, 0, .4),
        0 0 24px rgba(var(--wcps-accent-rgb), .1);
    transition: filter .3s ease, box-shadow .3s ease;
}

.wcps__panda-ring::before {
    position: absolute;
    z-index: 0;
    inset: 4px;
    content: "";
    border-radius: 50%;
    background: #07100d;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, .7);
}

.wcps__panda-ring picture {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
}

.wcps__panda {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none !important;
    object-fit: contain;
    filter: drop-shadow(0 4px 7px rgba(0, 0, 0, .5));
    transform: translateZ(0);
    animation: wcps-float 5.5s ease-in-out infinite;
}

.wcps__realm[data-state="offline"] .wcps__panda-ring {
    filter: grayscale(.75) saturate(.5);
    box-shadow: 0 0 0 1px rgba(202, 151, 139, .2), 0 12px 28px rgba(0, 0, 0, .42);
}

.wcps__identity {
    min-width: 0;
    flex: 1 1 auto;
}

.wcps__eyebrow {
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 7px;
    color: #b2bdb5;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .16em;
    line-height: 1.35;
    text-transform: uppercase;
}

.wcps__eyebrow i {
    display: inline-block;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--wcps-gold);
    box-shadow: 0 0 6px rgba(216, 189, 112, .7);
}

.wcps__identity h3 {
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--wcps-text) !important;
    background: none !important;
    border: 0 !important;
    font-family: "Trebuchet MS", Inter, Roboto, sans-serif !important;
    font-size: clamp(20px, 6.2vw, 27px) !important;
    font-weight: 800 !important;
    letter-spacing: -.035em !important;
    line-height: 1.08 !important;
    text-overflow: ellipsis;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .72);
    white-space: nowrap;
}

.wcps__meta {
    flex-wrap: wrap;
    gap: 7px 9px;
    margin-top: 9px;
}

.wcps__patch {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0 7px;
    color: var(--wcps-gold-bright);
    border: 1px solid rgba(216, 189, 112, .24);
    border-radius: 5px;
    background: rgba(216, 189, 112, .07);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .13em;
    line-height: 1;
}

.wcps__description {
    overflow: hidden;
    max-width: 100%;
    color: var(--wcps-muted);
    font-size: 10px;
    letter-spacing: .025em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wcps__stats {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1px minmax(0, .82fr);
    gap: 0 14px;
    align-items: center;
    margin-top: 21px;
    padding: 16px;
    border: 1px solid rgba(199, 174, 88, .25);
    border-radius: 17px;
    background:
        linear-gradient(125deg, rgba(var(--wcps-accent-rgb), .055), transparent 42%),
        rgba(3, 10, 9, .73);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .025),
        0 11px 23px rgba(0, 0, 0, .19);
    backdrop-filter: blur(7px);
}

.wcps__stat {
    min-width: 0;
    gap: 10px;
}

.wcps__stat-icon {
    display: grid;
    flex: 0 0 39px;
    width: 39px;
    height: 39px;
    place-items: center;
    color: var(--wcps-accent);
    border: 1px solid rgba(var(--wcps-accent-rgb), .23);
    border-radius: 11px;
    background: rgba(var(--wcps-accent-rgb), .055);
    box-shadow: inset 0 0 14px rgba(var(--wcps-accent-rgb), .04);
}

.wcps__stat-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.wcps__stat-copy {
    min-width: 0;
}

.wcps__stat-label {
    display: block;
    overflow: hidden;
    margin-bottom: 4px;
    color: #939e97;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .13em;
    line-height: 1.2;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.wcps__stat-copy strong {
    display: block;
    overflow: hidden;
    color: #f4f2e9;
    font-family: "Trebuchet MS", Inter, sans-serif;
    font-size: 16px;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    letter-spacing: .01em;
    line-height: 1.15;
    text-overflow: ellipsis;
    text-shadow: 0 2px 9px rgba(0, 0, 0, .55);
    white-space: nowrap;
}

.wcps__stat--players {
    justify-content: flex-start;
}

.wcps__players-dot {
    width: 7px;
    height: 7px;
}

.wcps__stat-separator {
    align-self: stretch;
    width: 1px;
    min-height: 38px;
    background: linear-gradient(180deg, transparent, rgba(196, 177, 105, .2), transparent);
}

.wcps__factions {
    grid-column: 1 / -1;
    margin-top: 14px;
}

.wcps__faction-track {
    display: flex;
    overflow: hidden;
    height: 7px;
    border-radius: 99px;
    background: linear-gradient(
        90deg,
        rgba(229, 72, 72, .14) 0 50%,
        rgba(67, 141, 255, .14) 50% 100%
    );
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5);
}

.wcps__faction-fill {
    display: block;
    height: 100%;
    transition: width .55s ease;
}

.wcps__faction-fill--horde {
    background: linear-gradient(90deg, #9f252b, #e54848);
    box-shadow: 0 0 12px rgba(229, 72, 72, .48);
}

.wcps__faction-fill--alliance {
    background: linear-gradient(90deg, #438dff, #2358bb);
    box-shadow: 0 0 12px rgba(67, 141, 255, .48);
}

.wcps__faction-copy {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 7px;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .11em;
    line-height: 1;
}

.wcps__faction-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.wcps__faction-label i {
    display: block;
    flex: 0 0 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.wcps__faction-label strong {
    color: #eef1ec;
    font-variant-numeric: tabular-nums;
    font-weight: 900;
}

.wcps__faction-label--horde {
    color: #f06a6a;
}

.wcps__faction-label--horde i {
    background: #e54848;
    box-shadow: 0 0 8px rgba(229, 72, 72, .65);
}

.wcps__faction-label--alliance {
    justify-content: flex-end;
    color: #67a4ff;
    text-align: right;
}

.wcps__faction-label--alliance i {
    background: #438dff;
    box-shadow: 0 0 8px rgba(67, 141, 255, .65);
}

.wcps__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 11px 8px 5px;
    text-align: center;
}

.wcps__empty picture,
.wcps__empty img {
    display: block;
    width: 112px;
    height: 112px;
}

.wcps__empty img {
    filter: grayscale(.75) saturate(.45) drop-shadow(0 9px 16px rgba(0, 0, 0, .45));
}

.wcps__empty strong {
    margin-top: 12px;
    color: var(--wcps-accent);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .17em;
}

.wcps__empty span {
    margin-top: 6px;
    color: var(--wcps-muted);
    font-size: 11px;
}

.wcps__rule--footer {
    margin-top: 22px;
    margin-bottom: 16px;
}

.wcps__footer {
    justify-content: space-between;
    gap: 13px;
}

.wcps__stable {
    min-width: 0;
    gap: 8px;
    color: #8e9a92;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .12em;
    line-height: 1.25;
    text-transform: uppercase;
}

.wcps__stable svg {
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
    fill: rgba(169, 184, 174, .11);
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.wcps__info {
    min-width: 0;
    justify-content: flex-end;
    gap: 7px;
    color: #d9dcd6 !important;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .11em;
    line-height: 1.25;
    text-align: right;
    text-decoration: none !important;
    text-transform: uppercase;
    transition: color .2s ease, transform .2s ease;
}

.wcps__info span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.wcps__info svg {
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
    fill: none;
    stroke: var(--wcps-accent);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    transition: transform .2s ease;
}

.wcps__info:hover,
.wcps__info:focus-visible {
    color: var(--wcps-accent) !important;
    outline: none;
    transform: translateY(-1px);
}

.wcps__info:hover svg,
.wcps__info:focus-visible svg {
    transform: translateX(3px);
}

.wcps__refresh {
    position: absolute;
    z-index: 5;
    top: 15px;
    left: 50%;
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    color: var(--wcps-accent);
    border: 1px solid rgba(var(--wcps-accent-rgb), .2);
    border-radius: 50%;
    background: rgba(4, 11, 10, .9);
    box-shadow: 0 7px 18px rgba(0, 0, 0, .32);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -8px) scale(.85);
    transition: opacity .2s ease, transform .2s ease;
}

.wcps__refresh svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.wcps.wcps-is-refreshing .wcps__refresh {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}

.wcps.wcps-is-refreshing .wcps__refresh svg {
    animation: wcps-spin .8s linear infinite;
}

.wcps.wcps-has-error .wcps__refresh {
    color: #ef8b80;
    border-color: rgba(239, 139, 128, .25);
}

@keyframes wcps-pulse {
    0%, 100% { opacity: .72; transform: scale(.9); }
    50% { opacity: 1; transform: scale(1.12); }
}

@keyframes wcps-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

@keyframes wcps-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 380px) {
    .wcps {
        border-radius: 22px;
    }

    .wcps__panel {
        padding: 18px 16px;
    }

    .wcps__kicker {
        font-size: 9px;
        letter-spacing: .14em;
    }

    .wcps__status {
        min-height: 30px;
        padding: 0 10px;
        font-size: 8px;
        letter-spacing: .13em;
    }

    .wcps__hero {
        gap: 12px;
    }

    .wcps__panda-ring {
        flex-basis: 76px;
        width: 76px;
        height: 76px;
    }

    .wcps__identity h3 {
        font-size: 21px !important;
    }

    .wcps__description {
        display: none;
    }

    .wcps__stats {
        gap: 0 10px;
        padding: 14px 12px;
    }

    .wcps__stat-icon {
        display: none;
    }

    .wcps__stat-copy strong {
        font-size: 14px;
    }

    .wcps__stable span,
    .wcps__info span {
        font-size: 7px;
        letter-spacing: .08em;
    }
}

@media (max-width: 315px) {
    .wcps__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .wcps__status {
        align-self: flex-start;
    }

    .wcps__hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .wcps__identity h3 {
        white-space: normal;
    }

    .wcps__stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .wcps__stat-separator {
        width: 100%;
        min-height: 1px;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(196, 177, 105, .2), transparent);
    }

    .wcps__footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .wcps__info {
        justify-content: flex-start;
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wcps *,
    .wcps *::before,
    .wcps *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
