/* Extra punishment-board edits: one frame, centered controls and original artwork. */
.fox-punishments > .fox-punishments__search-row {
    display: flex;
    justify-content: flex-end;
    min-width: 0;
    margin: 0 0 8px;
}

#fox-punishment-search {
    grid-template-columns: minmax(0, 1fr) 86px;
    flex: 0 1 420px;
    width: min(100%, 420px);
    gap: 7px;
    margin: 0;
}

#fox-punishment-search > button {
    width: 86px;
    min-width: 86px;
    gap: 7px;
    padding: 0 11px;
    font-size: 12px;
    font-weight: 700;
}

#fox-punishment-search > button > i { font-size: 12px; }

#fox-punishment-panel {
    padding: 0;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(var(--fox-rgb-ts2l3, 29, 19, 45), .96), rgba(var(--fox-rgb-ts1l2, 17, 13, 28), .96) 155px);
}

#fox-punishment-header {
    gap: 13px;
    margin: 0;
    padding: 19px 18px 18px;
    border: 0;
    border-radius: 16px 16px 0 0;
    background: transparent;
    box-shadow: none;
}

#fox-punishment-header > .fox-punishments__title-frame {
    width: 100%;
    max-width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

#fox-punishment-header .fox-punishments__servers {
    justify-content: center;
    width: 100%;
    min-width: 0;
    gap: 8px;
    padding: 0;
    border: 0;
    text-align: center;
}

#fox-punishment-header .fox-punishments__server {
    justify-content: center;
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    min-height: 40px;
    padding: 8px 19px;
    border: 1px solid rgba(var(--fox-rgb-as4l15, 183, 116, 255), .55);
    border-radius: 11px;
    color: var(--fox-tone-as4l16, #cf9eff);
    background: linear-gradient(135deg, var(--fox-tone-ts2l3, #271b3c), var(--fox-tone-ts1l2, #181222));
    box-shadow: inset 0 1px rgba(var(--fox-rgb-gs4l19, 241, 219, 255), clamp(0, calc(.06 * var(--fox-glow-strength, 1)), 1)), 0 0 14px rgba(var(--fox-rgb-gs3l12, 156, 75, 235), clamp(0, calc(.12 * var(--fox-glow-strength, 1)), 1));
    font-size: clamp(16px, 1.8vw, 19px);
    font-weight: 750;
    line-height: 1.25;
    overflow-wrap: anywhere;
    text-align: center;
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

#fox-punishment-header .fox-punishments__server.is-active {
    border-color: rgba(var(--fox-rgb-as4l16, 203, 145, 255), .82);
    box-shadow: inset 0 0 13px rgba(var(--fox-rgb-gs4l14, 181, 95, 255), clamp(0, calc(.08 * var(--fox-glow-strength, 1)), 1)), 0 0 16px rgba(var(--fox-rgb-gs3l12, 165, 76, 241), clamp(0, calc(.2 * var(--fox-glow-strength, 1)), 1));
}

@supports ((background-clip: text) or (-webkit-background-clip: text)) {
    #fox-punishment-header .fox-punishments__server {
        background-image: linear-gradient(105deg, var(--fox-tone-ts4l15, #b178ff) 0%, var(--fox-tone-ts4l18, #ebd0ff) 35%, var(--fox-tone-ts4l15, #be83fb) 62%, var(--fox-tone-ts4l18, #ebd0ff) 82%, var(--fox-tone-ts4l15, #b178ff) 100%),
                          linear-gradient(135deg, var(--fox-tone-ts2l3, #271b3c), var(--fox-tone-ts1l2, #181222));
        background-size: 240% 100%, 100% 100%;
        background-position: 0% 50%, 0 0;
        background-clip: text, padding-box;
        -webkit-background-clip: text, padding-box;
        -webkit-text-fill-color: transparent;
        animation: fox-punishment-server-shimmer 7s ease-in-out infinite alternate;
    }
}

#fox-punishment-header .fox-punishments__server:hover,
#fox-punishment-header .fox-punishments__server:focus-visible {
    transform: translateY(-1px);
    border-color: var(--fox-tone-as4l17, #d8a7ff);
    box-shadow: inset 0 0 15px rgba(var(--fox-rgb-gs4l14, 186, 111, 253), clamp(0, calc(.1 * var(--fox-glow-strength, 1)), 1)), 0 0 21px rgba(var(--fox-rgb-gs3l12, 166, 76, 241), clamp(0, calc(.3 * var(--fox-glow-strength, 1)), 1));
}

#fox-punishment-header .fox-punishments__server:focus-visible,
#fox-punishment-panel .fox-punishments__types a:focus-visible {
    outline: 2px solid var(--fox-tone-as4l17, #e0b7ff);
    outline-offset: 3px;
}

/* Same fading neon separator as the forum's joined heading/list blocks. */
#fox-punishment-panel > .fox-punishments__divider {
    height: 1px;
    margin: 0 18px;
    border: 0;
    background: linear-gradient(90deg, transparent, rgba(var(--fox-rgb-ts4l14, 186, 100, 255), .58), transparent);
    box-shadow: 0 1px 7px rgba(var(--fox-rgb-gs3l12, 165, 77, 235), clamp(0, calc(.14 * var(--fox-glow-strength, 1)), 1));
    pointer-events: none;
}

#fox-punishment-panel > .fox-punishments__body { padding: 0 14px 14px; }

#fox-punishment-panel .fox-punishments__toolbar {
    justify-content: center;
    gap: 0;
    padding: 12px 0 11px;
}

#fox-punishment-panel .fox-punishments__types {
    justify-content: center;
    max-width: 100%;
    gap: 6px;
    padding: 4px;
    border: 1px solid rgba(var(--fox-rgb-as4l14, 183, 116, 249), .2);
    border-radius: 12px;
    background: rgba(var(--fox-rgb-as2l1, 11, 8, 22), .45);
    box-shadow: inset 0 1px rgba(var(--fox-rgb-gs4l18, 233, 204, 255), clamp(0, calc(.04 * var(--fox-glow-strength, 1)), 1));
}

#fox-punishment-panel .fox-punishments__types a {
    justify-content: center;
    min-width: 78px;
    min-height: 33px;
    padding: 7px 15px;
    border-color: transparent;
    border-radius: 8px;
    color: var(--fox-tone-as2l16, #c9b3df);
    background: transparent;
    font-size: 12px;
    line-height: 1.2;
    text-align: center;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

#fox-punishment-panel .fox-punishments__types a.is-active {
    border-color: rgba(var(--fox-rgb-as4l15, 199, 137, 255), .6);
    color: var(--fox-tone-as4l19, #f0dfff);
    background: linear-gradient(135deg, rgba(var(--fox-rgb-ts2l11, 138, 64, 209), .42), rgba(var(--fox-rgb-ts2l8, 95, 45, 153), .26));
    box-shadow: inset 0 1px rgba(var(--fox-rgb-gs4l18, 238, 210, 255), clamp(0, calc(.08 * var(--fox-glow-strength, 1)), 1)), 0 0 12px rgba(var(--fox-rgb-gs3l12, 169, 79, 237), clamp(0, calc(.14 * var(--fox-glow-strength, 1)), 1));
}

#fox-punishment-panel .fox-punishments__types a:hover {
    border-color: rgba(var(--fox-rgb-as4l15, 199, 137, 255), .5);
    color: var(--fox-tone-as4l19, #f0dfff);
    background-color: rgba(var(--fox-rgb-as3l11, 148, 72, 218), .19);
    box-shadow: 0 0 11px rgba(var(--fox-rgb-gs3l12, 167, 75, 235), clamp(0, calc(.18 * var(--fox-glow-strength, 1)), 1));
    text-decoration: none;
}

/* Both states use the same cell heights and outer spacing at every breakpoint. */
#fox-punishment-list > tr.fox-punishment-row {
    box-sizing: border-box;
    grid-template-rows: 36px;
    min-height: 44px;
    padding: 3px 10px;
    align-items: center;
}

#fox-punishment-list > tr.fox-punishment-row > td {
    box-sizing: border-box;
    min-height: 36px;
    height: 36px;
    padding: 0;
}

#fox-punishment-list .fox-punishment-row__type { gap: 2px; }

#fox-punishment-list > .fox-punishment-row--active > .fox-punishment-row__remaining::before,
#fox-punishment-list > .fox-punishment-row--active > .fox-punishment-row__date::before {
    content: none;
    display: none;
}

#fox-punishment-list .fox-punishment-row__type small {
    display: block;
    max-width: 100%;
    overflow: hidden;
    font-size: 9px;
    line-height: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#fox-punishment-list .fox-punishment-person__name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#fox-punishment-list .fox-punishment-row__reason > .fox-punishment-pill {
    display: block;
    padding: 5px 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#fox-punishment-notes > .fox-punishment-note {
    background-color: var(--fox-tone-as1l2, #171020);
    background-image: linear-gradient(90deg, rgba(var(--fox-rgb-ts2l1, 13, 9, 24), .68), rgba(var(--fox-rgb-ts2l1, 13, 9, 24), .43) 65%, rgba(var(--fox-rgb-ts2l1, 13, 9, 24), .25)), var(--fox-punishment-note-art);
    background-size: cover;
    background-position: center, right 65%;
    background-repeat: no-repeat;
}

#fox-punishment-notes > .fox-punishment-note--judgment {
    --fox-punishment-note-art: url("../img/fox/punishment-note-judgment-v1.webp");
}

#fox-punishment-notes > .fox-punishment-note--peace {
    --fox-punishment-note-art: url("../img/fox/punishment-note-peace-v1.webp");
}

#fox-punishment-notes > .fox-punishment-note p {
    color: var(--fox-tone-as4l18, #e1caff);
    text-shadow: 0 1px 5px rgba(var(--fox-rgb-gs3l1, 4, 2, 12), clamp(0, calc(.9 * var(--fox-glow-strength, 1)), 1));
}

@keyframes fox-punishment-server-shimmer {
    from { background-position: 0% 50%, 0 0; }
    to { background-position: 100% 50%, 0 0; }
}

@media (max-width: 1100px) {
    #fox-punishment-list > tr.fox-punishment-row {
        grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr);
        grid-template-rows: repeat(2, 36px);
        grid-template-areas: "player type admin" "reason remaining date";
        gap: 4px 9px;
    }
    #fox-punishment-list > tr.fox-punishment-row--removed {
        grid-template-areas: "player type admin" "remaining remaining remaining";
    }
    #fox-punishment-list > .fox-punishment-row > .fox-punishment-row__player { grid-area: player; }
    #fox-punishment-list > .fox-punishment-row > .fox-punishment-row__type { grid-area: type; }
    #fox-punishment-list > .fox-punishment-row > .fox-punishment-row__admin { grid-area: admin; }
    #fox-punishment-list > .fox-punishment-row > .fox-punishment-row__reason { grid-area: reason; }
    #fox-punishment-list > .fox-punishment-row > .fox-punishment-row__remaining { grid-area: remaining; }
    #fox-punishment-list > .fox-punishment-row > .fox-punishment-row__date { grid-area: date; }
}

@media (max-width: 600px) {
    #fox-punishment-search { flex-basis: 100%; width: 100%; }
    #fox-punishment-header { gap: 11px; padding: 16px 10px; }
    #fox-punishment-header .fox-punishments__server { padding: 8px 12px; }
    #fox-punishment-panel > .fox-punishments__divider { margin-inline: 10px; }
    #fox-punishment-panel > .fox-punishments__body { padding: 0 8px 9px; }
    #fox-punishment-panel .fox-punishments__types { gap: 4px; }
    #fox-punishment-panel .fox-punishments__types a { min-width: 69px; padding-inline: 11px; }
    #fox-punishment-list > tr.fox-punishment-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: repeat(3, 32px);
        grid-template-areas: "player type" "reason admin" "remaining date";
        gap: 4px 8px;
        padding: 5px 8px;
    }
    #fox-punishment-list > tr.fox-punishment-row--removed {
        grid-template-areas: "player type" "admin admin" "remaining remaining";
    }
    #fox-punishment-list > tr.fox-punishment-row > td { min-height: 32px; height: 32px; }
    #fox-punishment-list .fox-punishment-row__type small { line-height: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    #fox-punishment-header .fox-punishments__server { animation: none; transition: none; }
    #fox-punishment-header .fox-punishments__server:hover { transform: none; }
    #fox-punishment-panel .fox-punishments__types a { transition: none; }
}
