/* ==========================================================================
   Community banner below the navigation (templates/partials/community-banner.php)
   Ask to share the current page + "creators wanted" as an item plate in the game look.
   Switch: Features 'community_banner'. The plate reuses the 9-slice chrome and fonts of
   tooltip-v2.css (loaded globally), scaled down to fit the ~86 px banner.
   ========================================================================== */
.cmb {
    position: relative;
    z-index: 5; /* above .main-content (z-index 1) so the plate's hover tooltip is not covered */
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 1.5rem 0;
}
.cmb__card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-height: 86px;
    padding: 0.5rem 2.6rem 0.5rem 1.4rem;
    border: 1px solid rgba(165, 9, 5, 0.45);
    border-radius: var(--border-radius, 4px);
    background:
        radial-gradient(ellipse 420px 110px at 84% 50%, rgba(165, 9, 5, 0.2), transparent 70%),
        radial-gradient(ellipse 260px 100px at 0% 50%, rgba(165, 9, 5, 0.14), transparent 70%),
        linear-gradient(180deg, #121217, #0c0c10);
}
.cmb [hidden] { display: none !important; } /* the thanks state toggles [hidden] on flex/grid items */
.cmb__card > :not(.cmb__sigils):not(.cmb__close) { position: relative; z-index: 1; }
.cmb__card > .cmb-plate { z-index: 4; }
.cmb__close {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-dimmed, #7a7870);
    cursor: pointer;
    transition: color .15s ease, background-color .15s ease;
}
.cmb__close:hover,
.cmb__close:focus-visible { color: var(--text-primary, #e0ddd5); background: rgba(255, 255, 255, 0.06); }

.cmb__main { flex: 1 1 auto; min-width: 0; }
.cmb__kicker {
    margin: 0 0 0.12rem;
    color: var(--red-bright, #d40b06);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}
.cmb__title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.15;
    color: var(--text-primary, #e0ddd5);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
}
.cmb__text {
    margin: 0.12rem 0 0;
    color: var(--text-secondary, #a09d94);
    font-size: 0.875rem;
    line-height: 1.35;
}
.cmb__text strong { color: var(--text-primary, #e0ddd5); font-weight: 700; }
.cmb__text-sm,
.cmb__lbl-sm { display: none; }

.cmb__actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.cmb__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 38px;
    padding: 0.45rem 1rem;
    border: 1px solid rgba(212, 11, 6, 0.55);
    border-radius: var(--border-radius, 4px);
    background: rgba(10, 10, 15, 0.72);
    color: var(--text-primary, #e0ddd5);
    font-family: var(--font-body);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.cmb__btn svg { flex-shrink: 0; }
.cmb__btn:hover { border-color: var(--red-bright, #d40b06); background: rgba(212, 11, 6, 0.18); color: #fff; }
.cmb__btn--primary { border-color: var(--gold, #a50905); background: var(--gold, #a50905); color: #fff; }
.cmb__btn--primary:hover { border-color: var(--red-bright, #d40b06); background: var(--red-bright, #d40b06); box-shadow: 0 0 18px rgba(212, 11, 6, 0.45); }
.cmb__btn--icon { width: 38px; padding: 0; }
.cmb__btn--icon.is-done { border-color: rgba(74, 222, 128, 0.6); color: #4ade80; }

.cmb__divider {
    flex-shrink: 0;
    width: 1px;
    align-self: stretch;
    margin: 0.4rem 0;
    background: linear-gradient(transparent, rgba(196, 162, 78, 0.3), transparent);
}

/* The class sigils as a faint watermark: every class, one community */
.cmb__sigils {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    padding: 0 22% 0 30%;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 25%, #000 50%, #000 70%, transparent 82%);
            mask-image: linear-gradient(90deg, transparent 25%, #000 50%, #000 70%, transparent 82%);
}
.cmb__sigil {
    width: 58px;
    height: 58px;
    flex-shrink: 0;
    background: rgba(212, 11, 6, 0.1);
    -webkit-mask: var(--sigil) center / contain no-repeat;
            mask: var(--sigil) center / contain no-repeat;
}
.cmb__sigil:nth-child(even) { transform: translateY(8px) scale(.82); }
.cmb__sigil--barbarian   { --sigil: url('/assets/img/classes/glyph-barbarian.webp'); }
.cmb__sigil--druid       { --sigil: url('/assets/img/classes/glyph-druid.webp'); }
.cmb__sigil--necromancer { --sigil: url('/assets/img/classes/glyph-necromancer.webp'); }
.cmb__sigil--rogue       { --sigil: url('/assets/img/classes/glyph-rogue.webp'); }
.cmb__sigil--sorcerer    { --sigil: url('/assets/img/classes/glyph-sorcerer.webp'); }
.cmb__sigil--spiritborn  { --sigil: url('/assets/img/classes/glyph-spiritborn.webp'); }
.cmb__sigil--paladin     { --sigil: url('/assets/img/classes/glyph-paladin.webp'); }
.cmb__sigil--warlock     { --sigil: url('/assets/img/classes/glyph-warlock.webp'); }

/* ---- Creator item plate: an item in the game look that fits the banner height ---- */
.cmb-plate { position: relative; flex-shrink: 0; }
.cmb-plate__link { display: block; color: inherit; text-decoration: none; border-radius: 3px; }
.cmb-plate__link:hover { color: inherit; }
.cmb-plate__link:focus-visible { outline: 2px solid #d9a879; outline-offset: 7px; }
.cmb-plate .d4tt-chrome.cmb-plate__chrome {
    width: auto;
    max-width: none;
    container-type: normal;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.75));
    transition: filter .15s ease;
}
.cmb-plate__link:hover .cmb-plate__chrome { filter: drop-shadow(0 0 10px rgba(170, 100, 235, 0.45)) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.75)); }
/* 9-slice corners for the small plate (original: 38/77/72 px at 400 px width) */
.cmb-plate__chrome .d4tt-9s-base   { --c: 12px; }
.cmb-plate__chrome .d4tt-9s-rarity { --c: 22px; }
.cmb-plate__chrome .d4tt-9s-ornate { --c: 20px; inset: -5px; }
.cmb-plate__chrome .d4tt-tint { inset: 3px; }
.cmb-plate__chrome .d4tt-content {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8px 18px 8px 9px;
    font-size: 12.5px;
    line-height: 1.25;
}
.cmb-plate__slot {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(192, 161, 216, 0.38);
    background: radial-gradient(circle at 50% 42%, rgba(150, 80, 220, 0.42), rgba(22, 9, 36, 0.92) 72%);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.85);
}
.cmb-plate__slot img { width: 38px; height: 38px; display: block; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8)); }
.cmb-plate__txt { display: flex; flex-direction: column; min-width: 0; }
.cmb-plate__name {
    font-family: var(--d4tt-head);
    font-size: 16px;
    line-height: 1.05;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: #d9a879;
    white-space: nowrap;
}
.cmb-plate__type { margin-top: 2px; color: #ba8f67; white-space: nowrap; }
.cmb-plate__cta {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
    color: #e9e9e9;
    white-space: nowrap;
    transition: color .15s ease;
}
.cmb-plate__cta img { height: 13px; width: auto; }
.cmb-plate__cta i { font-style: normal; display: inline-block; transition: transform .15s ease; }
.cmb-plate__link:hover .cmb-plate__cta,
.cmb-plate__link:focus-visible .cmb-plate__cta { color: #d9a879; }
.cmb-plate__link:hover .cmb-plate__cta i { transform: translateX(2px); }

/* Full item tooltip below the plate (pure tooltip, no click targets) */
.cmb-plate__pop {
    position: absolute;
    top: calc(100% + 16px);
    right: -8px;
    z-index: 60;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity .14s ease, transform .14s ease, visibility 0s linear .14s;
}
.cmb-plate:hover .cmb-plate__pop,
.cmb-plate:focus-within .cmb-plate__pop {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s;
}
@media (hover: none) { .cmb-plate__pop { display: none; } }
.cmb-plate__pop .d4tt-chrome { width: 360px; }
.cmb-plate__pop .it-headtext { max-width: 66cqw; }
/* item art inset from the ornate corner, like the inventory art in the game tooltip */
.cmb-plate__pop .cmb-plate__art { top: 1.5cqw; right: 4cqw; width: 16cqw; height: 16cqw; object-fit: contain; }
.cmb-plate__pop .tt-ip { color: #b79e7a; }
.cmb-plate__hint {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.35em;
    margin-top: 1.2cqw;
    color: #e9e9e9;
    font-size: 4.4cqw;
}
.cmb-plate__hint img { height: 1.2em; width: auto; }

/* Thanks state after sharing: same height, a check mark instead of the buttons */
.cmb__done {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(74, 222, 128, 0.55);
    border-radius: 50%;
    background: radial-gradient(circle at 50% 40%, rgba(74, 222, 128, 0.18), rgba(10, 10, 15, 0.9) 70%);
    box-shadow: 0 0 18px rgba(74, 222, 128, 0.18);
    color: #4ade80;
}
.cmb--thanks .cmb__kicker { color: #4ade80; }

@media (max-width: 768px) {
    .cmb { padding: 0.75rem 1rem 0; }
    /* Title + short text, below it Share and the plate side by side */
    .cmb__card { flex-wrap: wrap; gap: 0.6rem; min-height: 0; padding: 0.7rem 0.8rem 0.8rem; }
    .cmb__main { flex: 1 1 100%; }
    .cmb__kicker { display: none; }
    .cmb__title { font-size: 1.08rem; padding-right: 1.5rem; }
    .cmb__text { font-size: 0.84rem; }
    .cmb__text-lg,
    .cmb__lbl-lg,
    .cmb__divider,
    .cmb__btn--icon { display: none; }
    .cmb__text-sm,
    .cmb__lbl-sm { display: inline; }
    .cmb__actions .cmb__btn { min-height: 44px; padding: 0 0.9rem; }
    .cmb__sigils {
        align-items: flex-start;
        padding: 0.4rem 2rem 0 38%;
        -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%);
                mask-image: linear-gradient(90deg, transparent, #000 40%);
    }
    .cmb__sigil { width: 34px; height: 34px; }
    .cmb-plate { flex: 1 1 0; min-width: 0; margin: 2px 4px 0 6px; }
    .cmb-plate__type { display: none; }
    .cmb-plate__chrome .d4tt-content { gap: 9px; padding: 6px 12px 6px 7px; font-size: 12px; }
    .cmb-plate__slot { width: 34px; height: 34px; }
    .cmb-plate__slot img { width: 27px; height: 27px; }
    .cmb-plate__name { font-size: 14px; }
    /* longer CTA texts (pt-BR) wrap instead of widening the page to 399 px on a 375 px phone */
    .cmb-plate__cta { margin-top: 2px; white-space: normal; }
    .cmb-plate__name { overflow-wrap: anywhere; }
    .cmb--thanks .cmb__done { display: none; }
    .cmb--thanks .cmb__kicker { display: block; }
    .cmb--thanks .cmb__title { font-size: 1rem; }
}
