/* Shared seasonal-event chrome. Theme colors stay in event_{season}.css */

.season-event-menu,
.season-event-menu[hidden] {
    display: none !important;
}

html.event-season .season-event-menu:not([hidden]) {
    display: block !important;
    position: relative;
    overflow: visible;
}

html.event-season body.site-app .season-event-btn {
    display: block;
    position: relative !important;
    overflow: visible;
    border-radius: 3px;
    text-align: center;
}

.season-event-card {
    display: block;
    width: 100%;
    margin: 0;
    padding: 16px 18px;
    border: 1px solid #d46a2f;
    border-radius: 10px;
    background: #1c1612;
    color: #f3e6d8;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.season-event-card:hover {
    border-color: #ea7a3a;
    background: #241c16;
}

.season-event-card-title {
    display: block;
    font-size: 18px;
    font-weight: 750;
    letter-spacing: 0.04em;
    color: #fb923c;
    word-break: break-word;
}

body.site-app:not(.dark-mode) .season-event-card {
    background: #fff7ed;
    border-color: #ea8c2a;
}

body.site-app:not(.dark-mode) .season-event-card-title {
    color: #c2410c;
}

.event-potion-icon {
    width: 1.05em;
    height: 1.05em;
    margin-right: 2px;
    vertical-align: -0.16em;
    fill: currentColor;
}

html[data-boot-tab="event"] #pageHeader {
    text-align: center;
}

html[data-boot-tab="event"] #pageHeader #tabTitle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 6px;
}

.event-statement-toolbar {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 12px 16px;
    flex-wrap: nowrap;
    width: 100%;
    margin: 0 0 18px;
}

.season-event-page .event-statement-toolbar .limits,
.season-event-page .event-statement-toolbar .task-limits {
    margin: 0;
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.event-submit-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    gap: 8px;
    box-sizing: border-box;
    padding: 0 16px;
    border: 0;
    border-radius: 6px;
    background: #ea580c;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.2;
    white-space: nowrap;
    flex: 0 0 auto;
    min-width: max-content;
    box-shadow: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.event-submit-link:hover {
    background: #d14e0b;
    color: #fff;
    text-decoration: none;
}

.event-submit-link i {
    font-size: 0.85em;
}

body.site-app.dark-mode .event-submit-link,
body.site-app:not(.dark-mode) .event-submit-link {
    background: #ea580c;
    color: #fff;
}

body.site-app.dark-mode .event-submit-link:hover,
body.site-app:not(.dark-mode) .event-submit-link:hover {
    background: #d14e0b;
    color: #fff;
}

.season-event-page {
    padding: 8px 8px 32px;
}

.season-event-cover {
    position: relative;
    max-width: 920px;
    margin: 0 0 20px;
    border-radius: 14px;
    overflow: hidden;
    isolation: isolate;
    background: #140e0c;
    border: 1px solid rgba(234, 88, 12, 0.4);
    box-shadow:
        0 22px 48px rgba(0, 0, 0, 0.42),
        0 0 0 1px rgba(251, 146, 60, 0.08);
}

.season-event-cover img {
    display: block;
    width: 100%;
    height: clamp(188px, 32vw, 360px);
    object-fit: cover;
    object-position: center 46%;
}

.season-event-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(11, 18, 32, 0.1) 0%, transparent 30%, transparent 58%, rgba(11, 18, 32, 0.42) 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

body.site-app:not(.dark-mode) .season-event-cover {
    background: #1c120c;
    border-color: rgba(194, 65, 12, 0.32);
    box-shadow: 0 16px 36px rgba(67, 20, 7, 0.12);
}

body.site-app:not(.dark-mode) .season-event-cover::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 34%, rgba(255, 247, 237, 0.14) 100%);
}

.season-event-page .task-statement {
    max-width: 920px;
}

.season-event-page .task-statement > .title {
    display: none;
}

body.site-app.trainings-rating-tall #eventRatingWidget .rating-container {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
}

body.dark-mode.site-app #eventRatingWidget {
    background: #121826 !important;
    border: 1px solid #243044 !important;
    box-shadow: none !important;
}

body.dark-mode.site-app #eventRatingWidget .rating-container {
    background: #121826 !important;
}

body.dark-mode.site-app #eventRatingWidget .rating-item {
    border-bottom-color: #243044 !important;
}

body.dark-mode.site-app #eventRatingWidget .rating-item:hover {
    background: #151c2c !important;
}

body.dark-mode.site-app #eventRatingWidget .rating-name {
    color: #e8eef8 !important;
}

body.dark-mode.site-app #eventRatingWidget .rating-graph-btn {
    background: #151c2c !important;
    border-color: #243044 !important;
    color: #93c5fd !important;
}

body.site-app:not(.dark-mode) #eventRatingWidget {
    background: #ffffff !important;
    border: 1px solid #e8edf5 !important;
    box-shadow: none !important;
}

body.site-app:not(.dark-mode) #eventRatingWidget .rating-container {
    background: #ffffff !important;
}

body.site-app:not(.dark-mode) #eventRatingWidget .rating-item {
    border-bottom-color: #e8edf5 !important;
}

body.site-app:not(.dark-mode) #eventRatingWidget .rating-name {
    color: #0f172a !important;
}

body.site-app:not(.dark-mode) #eventRatingWidget .rating-rank,
body.site-app:not(.dark-mode) #eventRatingWidget .rating-details {
    color: #64748b !important;
}

#eventRatingCount {
    pointer-events: none;
    cursor: default;
}

#eventRatingWidget .event-rating-empty {
    justify-content: center;
    gap: 18px;
    cursor: default;
}

#eventRatingWidget .event-rating-empty .fa-ghost {
    font-size: 48px;
    flex-shrink: 0;
}

#eventRatingWidget .event-rating-empty h3 {
    margin: 0;
}

.season-event-badge {
    position: absolute;
    top: -8px;
    right: 8px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    min-width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    appearance: none;
    -webkit-appearance: none;
    border-radius: 50%;
    background: #dc2626;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 0 0 2px #121826;
}

.season-event-badge:hover {
    background: #ef4444;
}

html.event-season body.site-app:not(.dark-mode) .season-event-badge {
    box-shadow: 0 0 0 2px #ffffff;
}

.season-event-panel-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.55);
}

.season-event-panel-backdrop[hidden] {
    display: none;
}

.season-event-panel {
    position: relative;
    width: min(480px, 100%);
    max-height: min(86vh, 760px);
    overflow: auto;
    padding: 16px 16px 14px;
    border: 1px solid #d46a2f;
    border-radius: 12px;
    background: #17120f;
    color: #f3e6d8;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
}

body.site-app:not(.dark-mode) .season-event-panel {
    background: #fffaf5;
    color: #3f1d12;
    border-color: #e0b090;
}

.season-event-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.season-event-panel-head strong {
    font-size: 16px;
    line-height: 1.3;
}

.season-event-panel-close {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.season-event-panel-section {
    margin: 0 0 14px;
}

.season-event-panel-section:last-child {
    margin-bottom: 0;
}

.season-event-panel-section h3 {
    margin: 0 0 8px;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #e08a55;
}

.season-event-panel-rules {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

.season-event-panel-rules p {
    margin: 0 0 10px;
}

.season-event-panel-rules p:last-child {
    margin-bottom: 0;
}

.season-event-panel-empty {
    padding: 16px 8px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}

.season-event-panel .season-event-card {
    max-width: none;
}

.season-event-panel .season-event-card-title {
    text-transform: uppercase;
}

@media (max-width: 860px) {
    html.event-season body.site-app .season-event-btn {
        min-height: 44px;
        width: 100%;
        justify-content: center;
    }

    .season-event-page {
        padding: 4px 0 24px;
    }

    .season-event-cover {
        border-radius: 10px;
        margin-bottom: 14px;
    }

    .season-event-cover img {
        height: clamp(168px, 46vw, 240px);
    }

    .season-event-page .task-statement {
        max-width: none;
        overflow-wrap: anywhere;
    }

    .event-statement-toolbar {
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
        gap: 10px;
    }

    .season-event-page .event-statement-toolbar .limits,
    .season-event-page .event-statement-toolbar .task-limits {
        width: 100%;
        flex: none;
        flex-wrap: wrap;
        gap: 8px 12px;
        box-sizing: border-box;
    }

    .event-submit-link {
        width: 100%;
        min-width: 0;
        min-height: 44px;
        padding: 10px 14px;
        font-size: 15px;
        align-self: stretch;
        justify-content: center;
    }

    .season-event-page .task-statement .sample-test {
        flex-direction: column;
        gap: 12px;
    }

    .season-event-page .task-statement .sample-test .input,
    .season-event-page .task-statement .sample-test .output {
        min-width: 0;
        width: 100%;
        flex: 1 1 auto;
    }

    .season-event-panel-backdrop {
        align-items: flex-end;
        padding: 8px;
        padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
    }

    .season-event-panel {
        width: 100%;
        max-height: min(88dvh, 760px);
        border-radius: 12px;
        padding: 14px 12px 16px;
    }

    .season-event-panel-close {
        width: 44px;
        height: 44px;
    }

    .season-event-card {
        min-height: 44px;
        padding: 14px;
    }

    #eventRatingWidget .event-rating-empty {
        flex-direction: column;
        padding: 28px 12px !important;
    }
}
