/**
 * Halloween in the "Events" box: sidebar (subpages, home page in premiere mode) and the home gate
 * panel "Today on the server". Loaded by template.php only while the event runs
 * (system/libs/seasonal_events.php, dates from the game server's seasonal_event_dates.lua).
 * Markup: templates/telara/customEvents.php (.event-hw), container class .box-events--halloween.
 * Pictures are inline SVG, no animations.
 */

/* Sidebar box: violet glow in the head, orange ornament, bats on the right */
body .content .container .right-panel .box.box-events--halloween .head {
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 44' fill='%239b6cc4'%3E%3Cpath d='M32 10L33.2 7.2 34.3 10.2C38 7 46 4.5 58 5Q55 7 55 10.5Q51 8.5 47.5 11Q44.5 9 41.5 12.5Q38 11.5 35.5 15L32 19 28.5 15Q26 11.5 22.5 12.5Q19.5 9 16.5 11Q13 8.5 9 10.5Q9 7 6 5C18 4.5 26 7 29.7 10.2L30.8 7.2Z' transform='translate(4 0) scale(.9)'/%3E%3Cpath d='M32 10L33.2 7.2 34.3 10.2C38 7 46 4.5 58 5Q55 7 55 10.5Q51 8.5 47.5 11Q44.5 9 41.5 12.5Q38 11.5 35.5 15L32 19 28.5 15Q26 11.5 22.5 12.5Q19.5 9 16.5 11Q13 8.5 9 10.5Q9 7 6 5C18 4.5 26 7 29.7 10.2L30.8 7.2Z' transform='translate(62 14) scale(.62) rotate(-12 32 12)'/%3E%3Cpath d='M32 10L33.2 7.2 34.3 10.2C38 7 46 4.5 58 5Q55 7 55 10.5Q51 8.5 47.5 11Q44.5 9 41.5 12.5Q38 11.5 35.5 15L32 19 28.5 15Q26 11.5 22.5 12.5Q19.5 9 16.5 11Q13 8.5 9 10.5Q9 7 6 5C18 4.5 26 7 29.7 10.2L30.8 7.2Z' transform='translate(88 28) scale(.42) rotate(10 32 12)'/%3E%3C/svg%3E") right 12px top 8px / 64px auto no-repeat,
        radial-gradient(120% 100% at 50% 0%, rgba(140, 60, 200, 0.35), transparent 72%),
        linear-gradient(180deg, #23162b, #18120f);
    color: #ffb066;
    text-shadow: 0 0 12px rgba(255, 122, 26, 0.45);
    box-shadow: 0 0 0 1px var(--tl-frame-outer), inset 0 2px 0 rgba(255, 138, 31, 0.85);
}

body .content .container .right-panel .box.box-events--halloween .head::before {
    background: linear-gradient(90deg, transparent, #b34700 35%, #ff8a1f 50%, #b34700 65%, transparent);
}

body .content .container .right-panel .box.box-events--halloween .head::after {
    background: #ff8a1f;
    box-shadow: 0 0 0 3px #1f1a14, 0 0 8px rgba(255, 138, 31, 0.75);
}

body .content .container .right-panel .box.box-events--halloween .box-content {
    border-color: rgba(232, 101, 15, 0.5);
    background: linear-gradient(180deg, #1d1421, #141210 60%);
    box-shadow: 0 0 0 1px var(--tl-frame-outer), 0 0 24px -8px rgba(232, 101, 15, 0.55), 0 14px 30px -12px rgba(0, 0, 0, 0.75);
}

/* Home gate panel (.tl-panel) */
.tl-panel.box-events--halloween {
    --tl-panel-bg:
        radial-gradient(120% 70% at 50% 0%, rgba(140, 60, 200, 0.2), transparent 62%) padding-box,
        linear-gradient(180deg, #1e1522, #16110f 55%) padding-box,
        linear-gradient(180deg, #ffb35c, #e8650f 28%, #6b2fa0 72%, #3d1a5c) border-box;
    box-shadow: 0 0 0 1px #050403, 0 0 26px -6px rgba(232, 101, 15, 0.5), 0 14px 30px -12px rgba(0, 0, 0, 0.75);
}

.tl-panel.box-events--halloween::after {
    content: '';
    position: absolute;
    top: -14px;
    right: 14px;
    width: 96px;
    height: 35px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 44' fill='%239b6cc4'%3E%3Cpath d='M32 10L33.2 7.2 34.3 10.2C38 7 46 4.5 58 5Q55 7 55 10.5Q51 8.5 47.5 11Q44.5 9 41.5 12.5Q38 11.5 35.5 15L32 19 28.5 15Q26 11.5 22.5 12.5Q19.5 9 16.5 11Q13 8.5 9 10.5Q9 7 6 5C18 4.5 26 7 29.7 10.2L30.8 7.2Z' transform='translate(4 0) scale(.9)'/%3E%3Cpath d='M32 10L33.2 7.2 34.3 10.2C38 7 46 4.5 58 5Q55 7 55 10.5Q51 8.5 47.5 11Q44.5 9 41.5 12.5Q38 11.5 35.5 15L32 19 28.5 15Q26 11.5 22.5 12.5Q19.5 9 16.5 11Q13 8.5 9 10.5Q9 7 6 5C18 4.5 26 7 29.7 10.2L30.8 7.2Z' transform='translate(62 14) scale(.62) rotate(-12 32 12)'/%3E%3Cpath d='M32 10L33.2 7.2 34.3 10.2C38 7 46 4.5 58 5Q55 7 55 10.5Q51 8.5 47.5 11Q44.5 9 41.5 12.5Q38 11.5 35.5 15L32 19 28.5 15Q26 11.5 22.5 12.5Q19.5 9 16.5 11Q13 8.5 9 10.5Q9 7 6 5C18 4.5 26 7 29.7 10.2L30.8 7.2Z' transform='translate(88 28) scale(.42) rotate(10 32 12)'/%3E%3C/svg%3E") center / contain no-repeat;
    pointer-events: none;
}

.tl-panel.box-events--halloween .tl-panel__title {
    color: #ffb066;
    text-shadow: 0 0 12px rgba(255, 122, 26, 0.45);
}

/* The Halloween group: framed, pumpkin, period, "Active" in orange */
.box-events .event-hw {
    margin: 2px 14px 10px;
    border: 1px solid rgba(255, 138, 31, 0.5);
    border-left: 3px solid #ff8a1f;
    border-radius: 3px;
    background:
        linear-gradient(100deg, rgba(232, 101, 15, 0.32), rgba(107, 47, 160, 0.38) 75%, rgba(27, 16, 35, 0.7));
    box-shadow: 0 0 14px -6px rgba(255, 138, 31, 0.7);
    overflow: hidden;
}

.tl-home .box-events .event-hw {
    margin: 6px 0 10px;
}

.box-events .event-hw .event-row,
.tl-home .box-events .event-hw .event-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 12px !important;
    border: 0 !important;
}

.box-events .event-hw .event-row + .event-row,
.tl-home .box-events .event-hw .event-row + .event-row {
    padding-top: 0 !important;
}

.box-events .event-hw .event-label {
    width: auto;
    margin: 0;
    padding: 0;
    flex: 1;
    min-width: 0;
}

.box-events .event-hw .event-value {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    flex: none;
}

.box-events .event-hw__link,
.box-events .event-hw__link:visited,
.box-events .event-row--halloween .event-label {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    column-gap: 8px;
    color: #ffb066 !important;
    text-decoration: none;
}

.box-events .event-hw__link:hover,
.box-events .event-hw__link:focus {
    color: #ffe1b8 !important;
    text-decoration: none;
}

.box-events .event-hw__icon {
    grid-row: span 2;
    width: 28px;
    height: 28px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 9c-.6-3 .4-5.4 3.2-6.6' fill='none' stroke='%236b8a22' stroke-width='2.4' stroke-linecap='round'/%3E%3Cpath d='M18.4 6.2c2.6-2.3 5.6-2 7.2.2-2.8 1.3-5 1.4-7.2-.2z' fill='%238cc63f'/%3E%3Cellipse cx='10.6' cy='19' rx='7.6' ry='10' fill='%23d9560b'/%3E%3Cellipse cx='21.4' cy='19' rx='7.6' ry='10' fill='%23d9560b'/%3E%3Cellipse cx='16' cy='19' rx='7.2' ry='10.6' fill='%23ff8a1f'/%3E%3Cpath d='M10.5 17L13 13.3 15 17zM17 17l2-3.7 2.5 3.7z' fill='%232a1206'/%3E%3Cpath d='M9.6 21.4c2.3 3.4 10.5 3.4 12.8 0l-2 .9-1.5-1.3-1.6 1.4-1.3-1.4-1.3 1.4-1.6-1.4-1.5 1.3z' fill='%232a1206'/%3E%3C/svg%3E") center / contain no-repeat;
    filter: drop-shadow(0 0 6px rgba(255, 138, 31, 0.6));
}

.box-events .event-hw__name {
    font-family: var(--font-heading);
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.box-events .event-hw__period {
    grid-column: 2;
    color: #e9dcff;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: 0.02em;
    text-transform: none;
    white-space: nowrap;
}

.box-events .event-hw .event-value-active.event-hw__state {
    border-color: rgba(255, 166, 77, 0.7);
    background: linear-gradient(180deg, #ffa24a, #e8650f);
    color: #2a1206 !important;
    text-shadow: none !important;
}

.box-events .event-hw .event-row--halloween-gold .event-label {
    padding-left: 36px;
    color: #f6efe2 !important;
    font-family: inherit;
    font-size: 0.8125rem !important;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-shadow: none !important;
}

.box-events .event-hw .event-value-percent.event-hw__gold {
    margin-right: 2px;
    color: #ffd27a !important;
    font-family: var(--font-heading);
    font-size: 0.9375rem !important;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(255, 166, 77, 0.6) !important;
}
