/* ===== Class Changes — Inferno WoW ===== */

:root {
    --cc-bg:        #0d0e10;
    --cc-bg2:       #13141a;
    --cc-bg3:       #0a0b0d;
    --cc-border:    #3d2e0a;
    --cc-gold:      #c8a045;
    --cc-gold-lit:  #e8c860;
    --cc-text:      #c8b878;
    --cc-text-dim:  #7a6a44;
    --cc-radius:    8px;
    --cc-gap:       10px;
}

/* ── Width override — classchanges only ── */
.section-content > .container,
.pagebody > .container,
.section-pageheader > .container {
    max-width: 1700px !important;
}

/* ── Override theme's text-wrap: balance on all elements ── */
#cc-root * { text-wrap: auto; }

/* ── Root ── */
#cc-root {
    background: var(--cc-bg);
    color: var(--cc-text);
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 14px;
    border: 1px solid var(--cc-border);
    border-radius: 6px;
    overflow: hidden;
    user-select: none;
}

/* ── Class selector bar ── */
#cc-classbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px;
    background: var(--cc-bg3);
    border-bottom: 1px solid var(--cc-border);
}

.cc-cls {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px 5px 8px;
    background: #141608;
    border: 1px solid #3d2e0a;
    border-radius: 4px;
    color: var(--cc-text);
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    font-size: 14px;
}
.cc-cls img { border-radius: 50%; flex-shrink: 0; }
.cc-cls:hover  { background: #1e1a08; border-color: var(--cc-gold); color: var(--cc-gold-lit); }
.cc-cls.active { background: #1e1a08; border-color: var(--cc-gold-lit); color: var(--cc-gold-lit); box-shadow: 0 0 8px rgba(232,200,96,.15); }

/* ── Class header ── */
.cc-class-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--cc-bg2);
    border-bottom: 1px solid var(--cc-border);
    border-left: 3px solid var(--cc-gold);
}
.cc-class-header img { border-radius: 4px; flex-shrink: 0; }
.cc-class-name {
    font-size: 16px;
    font-weight: bold;
    letter-spacing: .3px;
}

/* ── General section (full-width strip) ── */
.cc-general {
    margin: var(--cc-gap) var(--cc-gap) 0;
    border: 2px solid var(--cc-border);
    border-radius: var(--cc-radius);
    overflow: hidden;
}

.cc-general-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    background: linear-gradient(90deg, #18160a 0%, #13141a 100%);
    border-bottom: 2px solid var(--cc-border);
}
.cc-general-head .cc-cat-label {
    color: var(--cc-text);
    font-size: 14px;
    letter-spacing: .6px;
    text-transform: uppercase;
}
.cc-general-head .cc-cat-count {
    margin-left: auto;
}

/* ── 3 equal columns ── */
.cc-columns {
    display: flex;
    gap: var(--cc-gap);
    padding: var(--cc-gap);
    min-height: 300px;
    align-items: stretch;
}

.cc-col {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    border: 2px solid var(--cc-border);
    border-radius: var(--cc-radius);
    overflow: hidden;
}

/* ── Category header ── */
.cc-cat-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 2px;
    padding: 12px 12px 14px;
    border-bottom: 2px solid var(--cc-border);
    text-align: center;
    min-height: 158px;
}
.cc-cat-head img { margin-bottom: 4px; }
.cc-cat-head .cc-cat-count { margin-top: -3px; }
.cc-cat-head img {
    border-radius: 6px;
    width: 52px;
    height: 52px;
    object-fit: cover;
    box-shadow: 0 2px 10px rgba(0,0,0,.6);
}
.cc-cat-label {
    font-size: 16px;
    font-weight: bold;
    letter-spacing: .5px;
}
.cc-cat-count {
    font-size: 13px;
    color: var(--cc-text-dim);
}

.cc-cat-glyphs  {
    background: linear-gradient(160deg, #160a2e 0%, #0f0618 100%);
}
.cc-cat-glyphs .cc-cat-label  { color: #c090e8; }

.cc-cat-spells  {
    background: linear-gradient(160deg, #0a1630 0%, #060e20 100%);
}
.cc-cat-spells .cc-cat-label  { color: #90b8e8; }

.cc-cat-talents {
    background: linear-gradient(160deg, #1e1400 0%, #140e00 100%);
}
.cc-cat-talents .cc-cat-label { color: var(--cc-gold-lit); }

/* ── Sub-tabs (inside cat-head, for Glyphs and Talents) ── */
.cc-subtabs {
    display: flex;
    gap: 6px;
    padding: 3px 0 0;
    margin-top: auto;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

.cc-subtab {
    padding: 3px 13px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    border: 1px solid rgba(200,160,69,.25);
    background: rgba(0,0,0,.25);
    color: var(--cc-text-dim);
    transition: background .15s, border-color .15s, color .15s;
    text-transform: uppercase;
    letter-spacing: .4px;
    line-height: 1.7;
}
.cc-subtab:hover {
    border-color: rgba(200,160,69,.55);
    color: var(--cc-text);
}
.cc-subtab.active {
    background: var(--tab-color, #25508a);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 1px 6px rgba(0,0,0,.4);
}

/* ── Entries list ── */
.cc-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 6px 0;
}

.cc-empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--cc-text-dim);
    font-style: italic;
    font-size: 13px;
}

/* ── Single change entry ── */
.cc-entry {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 14px;
    border-bottom: 1px solid rgba(61,46,10,.45);
    transition: background .12s;
    cursor: default;
}
.cc-entry:last-child { border-bottom: none; }
.cc-entry:hover { background: rgba(200,160,69,.05); }

.cc-entry-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #3d2e0a;
    background: #050505;
}
.cc-entry-icon img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    display: block;
}

.cc-entry-body {
    flex: 1;
    min-width: 0;
}

.cc-entry-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}

.cc-entry-name {
    color: var(--cc-gold-lit);
    font-weight: bold;
    font-size: 14px;
}

/* ── Type badge ── */
.cc-badge {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .4px;
    line-height: 1.6;
    flex-shrink: 0;
}

.cc-entry-desc {
    color: var(--cc-text);
    font-size: 13px;
    line-height: 1.55;
}

.cc-entry-note {
    margin-top: 4px;
    color: #8ab8d0;
    font-size: 13px;
    font-style: italic;
    line-height: 1.4;
}

/* ── Loading / error ── */
#cc-loading {
    padding: 32px;
    text-align: center;
    color: var(--cc-text-dim);
    font-style: italic;
}

/* ── Responsive ── */
@media (max-width: 860px) {
    #cc-root { font-size: 13px; }
    .cc-columns {
        flex-direction: column;
        padding: 8px;
        gap: 8px;
    }
    /* Prevent flex-basis:0 collapsing columns to 0 height in column layout */
    .cc-col {
        flex: 0 0 auto;
    }
    /* Bound list height so it scrolls instead of stretching infinitely */
    .cc-list {
        max-height: 420px;
    }
    .cc-general {
        margin: 8px 8px 0;
    }
    .cc-cat-head {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
        align-items: center;
        padding: 10px 14px;
        gap: 8px;
        min-height: 0;
    }
    .cc-subtabs {
        margin-top: 0;
    }
    .cc-cat-head img { width: 36px; height: 36px; margin-bottom: 0; }
    .cc-cat-label { font-size: 14px; }
    .cc-class-header { padding: 10px 14px; gap: 12px; }
    .cc-class-header img { width: 44px; height: 44px; }
    .cc-class-name { font-size: 18px; }
}

@media (max-width: 600px) {
    #cc-root { font-size: 12px; border-radius: 4px; }
    #cc-classbar { padding: 8px; gap: 4px; }
    .cc-cls { padding: 4px 8px 4px 6px; font-size: 11px; gap: 4px; }
    .cc-cls img { width: 22px; height: 22px; }
    .cc-class-header { padding: 8px 10px; gap: 10px; flex-wrap: wrap; }
    .cc-class-header img { width: 36px; height: 36px; }
    .cc-class-name { font-size: 15px; }
    .cc-general { margin: 6px 6px 0; padding: 8px; }
    .cc-general-head { padding: 8px 10px; }
    .cc-general-head .cc-cat-label { font-size: 12px; }
    .cc-columns { padding: 6px; gap: 6px; }
    .cc-col { border-radius: 4px; }
    .cc-cat-head { padding: 8px 10px; gap: 8px; }
    .cc-cat-head img { width: 28px; height: 28px; }
    .cc-cat-label { font-size: 12px; }
    .cc-cat-count { font-size: 10px; padding: 1px 7px; }
    .cc-subtabs { gap: 3px; }
    .cc-subtab { padding: 4px 8px; font-size: 11px; }
    .cc-changes { padding: 8px; gap: 4px; }
    .cc-change { padding: 4px 8px; font-size: 11px; gap: 4px; }
    .cc-change .cc-badge { font-size: 9px; padding: 1px 5px; }
}

@media (max-width: 400px) {
    .cc-cls { font-size: 10px; padding: 3px 5px; gap: 3px; }
    .cc-cls img { width: 18px; height: 18px; }
    .cc-class-name { font-size: 13px; }
    .cc-cat-label { font-size: 11px; }
    .cc-subtab { font-size: 10px; padding: 3px 6px; }
}
