/**
 * ==========================================
 * Elvebredd Adopt Me Values Table
 * ==========================================
 * Theme: Forest / Green
 * ==========================================
 */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@600;700;800;900&display=swap');

/* === ROOT VARIABLES === */
.evt-values-table {
    --evt-bg: #0f1419;
    --evt-panel: #1a2421;
    --evt-card: #243d2e;
    --evt-card-hover: #2d4a38;
    --evt-border: #2d4a38;
    --evt-text: #ffffff;
    --evt-text-muted: #9ca89f;
    --evt-radius: 16px;
    --evt-radius-sm: 12px;
    --evt-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --evt-shadow-lg: 0 8px 28px rgba(0, 0, 0, 0.4);
    font-family: 'Nunito', sans-serif;
    background: var(--evt-bg);
    color: var(--evt-text);
    padding: 16px;
    border-radius: var(--evt-radius);
    position: relative;
    min-height: 500px;
}

/* === COPY PROTECTION === */
.evt-values-table,
.evt-values-table * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.evt-values-table .evt-search {
    -webkit-user-select: text;
    user-select: text;
}

/* Preview: same card design as full table – isolate from theme and enforce same layout */
#evt-table-root-preview.evt-values-table {
    contain: layout style;
}
#evt-table-root-preview .evt-panel,
#evt-table-root-preview .evt-main,
#evt-table-root-preview .evt-items-grid {
    min-width: 0;
}
#evt-table-root-preview .evt-item-card {
    min-height: 0;
    box-sizing: border-box;
}

/* === PANEL LAYOUT === */
.evt-panel {
    display: flex;
    gap: 0;
    background: var(--evt-panel);
    border-radius: var(--evt-radius);
    overflow: hidden;
    box-shadow: var(--evt-shadow);
    border: 1px solid var(--evt-border);
}

/* === SIDEBAR === */
.evt-sidebar {
    width: 200px;
    flex-shrink: 0;
    background: var(--evt-panel);
    border-right: 1px solid var(--evt-border);
    padding: 20px 12px;
}

.evt-sidebar-header {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffffff;
    margin-bottom: 16px;
    padding-left: 8px;
}

.evt-nav-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.evt-nav-btn {
    display: block;
    width: 100%;
    padding: 12px 10px;
    border: none;
    background: var(--evt-card);
    color: var(--evt-text);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 800;
    text-align: center;
    border-radius: var(--evt-radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.evt-nav-btn:hover {
    background: var(--evt-card-hover);
}

.evt-nav-btn.active {
    background: #40916c;
    color: #fff;
    box-shadow: 0 2px 12px rgba(64, 145, 108, 0.4);
}

/* === MAIN CONTENT === */
.evt-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 450px;
    overflow: hidden;
}

.evt-header {
    padding: 16px 24px;
    background: #1b4332;
    border-bottom: none;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
}

/* === SEARCH BAR === */
.evt-search-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.evt-search-wrap::before {
    content: 'Search:';
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: inherit;
}

.evt-search-wrap .evt-search-icon {
    display: none;
}

.evt-search-wrap .evt-search-icon svg {
    display: none;
}

.evt-search {
    width: 100%;
    padding: 14px 20px;
    background: #e5ebe5;
    border: none;
    border-radius: 25px;
    color: #1a2421;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.2s ease;
    box-shadow: none;
}

.evt-search::placeholder {
    color: #5a6b5e;
    font-weight: 400;
    opacity: 1;
}

.evt-search:hover {
    background: #e8f0e8;
    box-shadow: none;
}

.evt-search:focus {
    outline: none;
    background: #f0f7f2;
    box-shadow: none;
}

.evt-clear-search {
    position: absolute;
    right: 12px;
    bottom: 8px;
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    color: #666666;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-weight: 700;
}

.evt-clear-search:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #333333;
    transform: scale(1.05);
}

.evt-search-wrap.has-text .evt-clear-search {
    display: flex;
}

/* === ITEMS GRID - FIXED CARD SIZE APPROACH === */
#evt-table-root .evt-items-grid,
#evt-table-root-preview .evt-items-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, 280px);
    gap: 12px;
    padding: 24px;
    overflow-y: auto;
    align-content: start;
    justify-content: center;
    -webkit-overflow-scrolling: touch;
}

/* === CARD CONTAINER - FIXED SIZE === */
#evt-table-root .evt-item-card,
#evt-table-root-preview .evt-item-card {
    width: 280px;
    background: #ffffff;
    border: 1px solid #2d6a4f;
    border-radius: var(--evt-radius-sm);
    padding: 1px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.2s;
    position: relative;
}

#evt-table-root .evt-item-card:hover,
#evt-table-root-preview .evt-item-card:hover {
    background: #f0f7f2;
    box-shadow: var(--evt-shadow-lg);
}

/* === RARITY + CHART ICON BELOW (TOP-RIGHT) === */
#evt-table-root .evt-item-card .evt-item-rarity-wrap,
#evt-table-root-preview .evt-item-card .evt-item-rarity-wrap {
    position: absolute;
    top: 4px;
    right: 6px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

#evt-table-root .evt-item-card .evt-item-rarity,
#evt-table-root-preview .evt-item-card .evt-item-rarity {
    font-size: 0.6rem;
    font-weight: 800;
    color: #000000;
    text-transform: capitalize;
    line-height: 1.2;
    pointer-events: none;
}

#evt-table-root .evt-item-card .evt-item-rarity:empty,
#evt-table-root-preview .evt-item-card .evt-item-rarity:empty {
    display: none;
}

/* === TOP ROW (IMAGE + INFO) === */
#evt-table-root .evt-item-card .evt-item-top-row,
#evt-table-root-preview .evt-item-card .evt-item-top-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding-right: 65px;
}

/* === IMAGE WRAPPER === */
#evt-table-root .evt-item-card .evt-item-img-wrap,
#evt-table-root-preview .evt-item-card .evt-item-img-wrap {
    width: 75px;
    height: 75px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.15);
    position: relative;
}

#evt-table-root .evt-item-card .evt-item-img-wrap img,
#evt-table-root-preview .evt-item-card .evt-item-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* === IMAGE OVERLAY === */
#evt-table-root .evt-item-card .evt-img-overlay,
#evt-table-root-preview .evt-item-card .evt-img-overlay {
    position: absolute;
    bottom: 2px;
    right: 2px;
    left: 2px;
    text-align: center;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.5px;
    line-height: 1.2;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2px;
}

#evt-table-root .evt-item-card .evt-img-overlay .evt-overlay-d,
#evt-table-root-preview .evt-item-card .evt-img-overlay .evt-overlay-d { 
    color: #ff9800; 
    text-shadow: 0 1px 2px rgba(0,0,0,0.9); 
}

#evt-table-root .evt-item-card .evt-img-overlay .evt-overlay-f,
#evt-table-root-preview .evt-item-card .evt-img-overlay .evt-overlay-f { 
    color: #00bcd4; 
    text-shadow: 0 1px 2px rgba(0,0,0,0.9); 
}

#evt-table-root .evt-item-card .evt-img-overlay .evt-overlay-r,
#evt-table-root-preview .evt-item-card .evt-img-overlay .evt-overlay-r { 
    color: #e91e63; 
    text-shadow: 0 1px 2px rgba(0,0,0,0.9); 
}

#evt-table-root .evt-item-card .evt-img-overlay .evt-overlay-n,
#evt-table-root-preview .evt-item-card .evt-img-overlay .evt-overlay-n { 
    color: #40916c; 
    text-shadow: 0 1px 2px rgba(0,0,0,0.9); 
}

#evt-table-root .evt-item-card .evt-img-overlay .evt-overlay-m,
#evt-table-root-preview .evt-item-card .evt-img-overlay .evt-overlay-m { 
    color: #673ab7; 
    text-shadow: 0 1px 2px rgba(0,0,0,0.9); 
}

/* === ITEM INFO (NAME + VALUE) === */
#evt-table-root .evt-item-card .evt-item-info,
#evt-table-root-preview .evt-item-card .evt-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

#evt-table-root .evt-item-card .evt-item-name,
#evt-table-root-preview .evt-item-card .evt-item-name {
    font-size: 0.85rem;
    font-weight: 800;
    color: #1a1a1e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.25;
}

#evt-table-root .evt-item-card .evt-item-value-row,
#evt-table-root-preview .evt-item-card .evt-item-value-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

#evt-table-root .evt-item-card .evt-value-label,
#evt-table-root-preview .evt-item-card .evt-value-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#evt-table-root .evt-item-card .evt-item-value,
#evt-table-root-preview .evt-item-card .evt-item-value {
    font-size: 0.95rem;
    font-weight: 900;
    color: #1a1a1e;
}

/* === BUTTONS CONTAINER === */
#evt-table-root .evt-item-card .evt-card-btns,
#evt-table-root-preview .evt-item-card .evt-card-btns {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    padding-bottom: 2px;
}

#evt-table-root .evt-item-card .evt-card-btns .evt-default-btn,
#evt-table-root-preview .evt-item-card .evt-card-btns .evt-default-btn {
    width: 100%;
}

#evt-table-root .evt-item-card .evt-card-btns-row2,
#evt-table-root-preview .evt-item-card .evt-card-btns-row2 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    width: 100%;
}

/* === BUTTON BASE STYLES === */
#evt-table-root .evt-item-card .evt-card-btns button,
#evt-table-root-preview .evt-item-card .evt-card-btns button {
    min-height: 26px;
    padding: 3px 5px;
    border: 2px solid transparent;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 800;
    cursor: pointer;
    color: #fff;
    transition: all 0.2s;
}

/* === D BUTTON === */
#evt-table-root .evt-item-card .evt-default-btn,
#evt-table-root-preview .evt-item-card .evt-default-btn {
    background: #888888;
    color: #fff;
}

#evt-table-root .evt-item-card .evt-default-btn:hover,
#evt-table-root-preview .evt-item-card .evt-default-btn:hover {
    background: #999999;
}

#evt-table-root .evt-item-card .evt-default-btn.active,
#evt-table-root .evt-item-card .evt-default-btn[data-evt-active="true"],
#evt-table-root-preview .evt-item-card .evt-default-btn.active,
#evt-table-root-preview .evt-item-card .evt-default-btn[data-evt-active="true"] {
    background: #ff9800;
    border-color: #e65100;
    box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.6);
}

/* === F BUTTON === */
#evt-table-root .evt-item-card .evt-fbtn,
#evt-table-root-preview .evt-item-card .evt-fbtn {
    background: #888888;
    color: #fff;
}

#evt-table-root .evt-item-card .evt-fbtn:hover,
#evt-table-root-preview .evt-item-card .evt-fbtn:hover {
    background: #999999;
}

#evt-table-root .evt-item-card .evt-fbtn.active,
#evt-table-root .evt-item-card .evt-fbtn[data-evt-active="true"],
#evt-table-root-preview .evt-item-card .evt-fbtn.active,
#evt-table-root-preview .evt-item-card .evt-fbtn[data-evt-active="true"] {
    background: #00bcd4;
    border-color: #0097a7;
    box-shadow: 0 0 0 2px rgba(0, 188, 212, 0.6);
}

/* === R BUTTON === */
#evt-table-root .evt-item-card .evt-rbtn,
#evt-table-root-preview .evt-item-card .evt-rbtn {
    background: #888888;
    color: #fff;
}

#evt-table-root .evt-item-card .evt-rbtn:hover,
#evt-table-root-preview .evt-item-card .evt-rbtn:hover {
    background: #999999;
}

#evt-table-root .evt-item-card .evt-rbtn.active,
#evt-table-root .evt-item-card .evt-rbtn[data-evt-active="true"],
#evt-table-root-preview .evt-item-card .evt-rbtn.active,
#evt-table-root-preview .evt-item-card .evt-rbtn[data-evt-active="true"] {
    background: #e91e63;
    border-color: #c2185b;
    box-shadow: 0 0 0 2px rgba(233, 30, 99, 0.6);
}

/* === N BUTTON === */
#evt-table-root .evt-item-card .evt-nbtn,
#evt-table-root-preview .evt-item-card .evt-nbtn {
    background: #888888;
    color: #fff;
}

#evt-table-root .evt-item-card .evt-nbtn:hover,
#evt-table-root-preview .evt-item-card .evt-nbtn:hover {
    background: #999999;
}

#evt-table-root .evt-item-card .evt-nbtn.active,
#evt-table-root .evt-item-card .evt-nbtn[data-evt-active="true"],
#evt-table-root-preview .evt-item-card .evt-nbtn.active,
#evt-table-root-preview .evt-item-card .evt-nbtn[data-evt-active="true"] {
    background: #40916c;
    border-color: #2d6a4f;
    box-shadow: 0 0 0 2px rgba(64, 145, 108, 0.6);
}

/* === M BUTTON === */
#evt-table-root .evt-item-card .evt-mbtn,
#evt-table-root-preview .evt-item-card .evt-mbtn {
    background: #888888;
    color: #fff;
}

#evt-table-root .evt-item-card .evt-mbtn:hover,
#evt-table-root-preview .evt-item-card .evt-mbtn:hover {
    background: #999999;
}

#evt-table-root .evt-item-card .evt-mbtn.active,
#evt-table-root .evt-item-card .evt-mbtn[data-evt-active="true"],
#evt-table-root-preview .evt-item-card .evt-mbtn.active,
#evt-table-root-preview .evt-item-card .evt-mbtn[data-evt-active="true"] {
    background: #673ab7;
    border-color: #512da8;
    box-shadow: 0 0 0 2px rgba(103, 58, 183, 0.6);
}

/* === LOADER === */
.evt-loader {
    position: absolute;
    inset: 0;
    background: rgba(15, 20, 25, 0.95);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border-radius: var(--evt-radius);
    z-index: 10;
}

.evt-values-table.evt-loaded .evt-loader {
    display: none;
}

.evt-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--evt-border);
    border-top-color: #40916c;
    border-radius: 50%;
    animation: evt-spin 0.8s linear infinite;
}

@keyframes evt-spin {
    to { transform: rotate(360deg); }
}

.evt-loader p {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--evt-text-muted);
}

/* ========================================
   MOBILE OPTIMIZATIONS
======================================== */

@media (max-width: 768px) {
    .evt-values-table {
        padding: 12px;
        min-height: 400px;
    }

    .evt-panel {
        flex-direction: column;
    }

    .evt-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--evt-border);
        padding: 12px 16px;
    }

    .evt-sidebar-header {
        margin-bottom: 12px;
    }

    .evt-nav-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .evt-nav-btn {
        padding: 10px 12px;
        width: 100%;
        text-align: center;
        font-size: 0.8rem;
    }

    .evt-header {
        padding: 16px;
        gap: 8px;
    }

    .evt-search-wrap {
        width: 100%;
    }

    .evt-search-wrap::before {
        font-size: 1rem;
    }

    .evt-search {
        padding: 12px 18px;
        font-size: 0.9rem;
        border-radius: 20px;
    }

    /* MOBILE: FLUID 2 cards per row - adapts to screen size */
    #evt-table-root .evt-items-grid,
    #evt-table-root-preview .evt-items-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        padding: 8px 3px;
    }

    #evt-table-root .evt-item-card,
    #evt-table-root-preview .evt-item-card {
        width: 100%;
        padding: 8px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    /* MOBILE: Top row - content (image, name, value) shifted LEFT; right space for chart icon */
    #evt-table-root .evt-item-card .evt-item-top-row,
    #evt-table-root-preview .evt-item-card .evt-item-top-row {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        padding-right: 72px;
        gap: 6px;
        text-align: left;
    }

    /* MOBILE: Image and info left-aligned to leave right space for chart */
    #evt-table-root .evt-item-card .evt-item-img-wrap,
    #evt-table-root-preview .evt-item-card .evt-item-img-wrap {
        width: 70px;
        height: 70px;
        margin: 0;
        margin-right: auto;
        position: relative;
    }

    /* Rarity wrap stays top-right on mobile so chart icon has space */
    #evt-table-root .evt-item-card .evt-item-rarity-wrap,
    #evt-table-root-preview .evt-item-card .evt-item-rarity-wrap {
        position: absolute;
        top: 6px;
        right: 6px;
    }

    #evt-table-root .evt-item-card .evt-item-rarity,
    #evt-table-root-preview .evt-item-card .evt-item-rarity {
        font-size: 0.75rem;
        color: #000000;
        font-weight: 800;
    }

    #evt-table-root .evt-item-card .evt-item-info,
    #evt-table-root-preview .evt-item-card .evt-item-info {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    #evt-table-root .evt-item-card .evt-item-name,
    #evt-table-root-preview .evt-item-card .evt-item-name {
        font-size: 1rem;
        white-space: normal;
        text-align: left;
        word-break: break-word;
    }

    #evt-table-root .evt-item-card .evt-item-value-row,
    #evt-table-root-preview .evt-item-card .evt-item-value-row {
        flex-direction: row;
        justify-content: flex-start;
        align-items: baseline;
        gap: 4px;
    }

    #evt-table-root .evt-item-card .evt-item-value-row .evt-value-label,
    #evt-table-root-preview .evt-item-card .evt-item-value-row .evt-value-label {
        font-size: 0.85rem;
    }

    #evt-table-root .evt-item-card .evt-item-value-row .evt-item-value,
    #evt-table-root-preview .evt-item-card .evt-item-value-row .evt-item-value {
        font-size: 1.2rem;
    }

    /* MOBILE: D, F/R/N/M and chart icons stick to bottom; short names get space above buttons */
    #evt-table-root .evt-item-card .evt-card-btns,
    #evt-table-root-preview .evt-item-card .evt-card-btns {
        width: 100%;
        margin-top: auto;
        gap: 1px;
        padding-bottom: 2px;
    }

    #evt-table-root .evt-item-card .evt-card-btns .evt-default-btn,
    #evt-table-root-preview .evt-item-card .evt-card-btns .evt-default-btn {
        height: 32px;
        font-size: 0.9rem;
    }

    #evt-table-root .evt-item-card .evt-card-btns-row2,
    #evt-table-root-preview .evt-item-card .evt-card-btns-row2 {
        gap: 4px;
    }

    #evt-table-root .evt-item-card .evt-card-btns-row2 button,
    #evt-table-root-preview .evt-item-card .evt-card-btns-row2 button {
        min-height: 28px;
        padding: 4px 2px;
        font-size: 0.75rem;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .evt-values-table {
        padding: 6px 0;
    }

    #evt-table-root .evt-items-grid,
    #evt-table-root-preview .evt-items-grid {
        grid-template-columns: 1fr 1fr;
        gap: 5px;
        padding: 6px 3px;
    }

    #evt-table-root .evt-item-card,
    #evt-table-root-preview .evt-item-card {
        width: 100%;
        padding: 6px;
    }

    /* Keep left-aligned content and right space for chart on small mobile */
    #evt-table-root .evt-item-card .evt-item-top-row,
    #evt-table-root-preview .evt-item-card .evt-item-top-row {
        padding-right: 64px;
        align-items: flex-start;
        gap: 4px;
    }

    #evt-table-root .evt-item-card .evt-item-img-wrap,
    #evt-table-root-preview .evt-item-card .evt-item-img-wrap {
        width: 62px;
        height: 62px;
        margin: 0;
        margin-right: auto;
    }

    #evt-table-root .evt-item-card .evt-item-rarity,
    #evt-table-root-preview .evt-item-card .evt-item-rarity {
        font-size: 0.7rem;
    }

    #evt-table-root .evt-item-card .evt-item-name,
    #evt-table-root-preview .evt-item-card .evt-item-name {
        font-size: 0.95rem;
    }

    #evt-table-root .evt-item-card .evt-item-value-row,
    #evt-table-root-preview .evt-item-card .evt-item-value-row {
        flex-direction: row;
        gap: 4px;
        justify-content: flex-start;
    }

    #evt-table-root .evt-item-card .evt-item-value-row .evt-value-label,
    #evt-table-root-preview .evt-item-card .evt-item-value-row .evt-value-label {
        font-size: 0.8rem;
    }

    #evt-table-root .evt-item-card .evt-item-value-row .evt-item-value,
    #evt-table-root-preview .evt-item-card .evt-item-value-row .evt-item-value {
        font-size: 1.1rem;
    }

    /* MOBILE SMALL: Smaller buttons */
    #evt-table-root .evt-item-card .evt-card-btns .evt-default-btn,
    #evt-table-root-preview .evt-item-card .evt-card-btns .evt-default-btn {
        height: 28px;
        font-size: 0.85rem;
    }

    #evt-table-root .evt-item-card .evt-card-btns-row2 button,
    #evt-table-root-preview .evt-item-card .evt-card-btns-row2 button {
        min-height: 24px;
        padding: 3px 2px;
        font-size: 0.7rem;
        border-radius: 7px;
    }

    #evt-table-root .evt-item-card .evt-card-btns,
    #evt-table-root .evt-item-card .evt-card-btns-row2,
    #evt-table-root-preview .evt-item-card .evt-card-btns,
    #evt-table-root-preview .evt-item-card .evt-card-btns-row2 {
        gap: 2px;
    }
}

/* ================================================== */
/* PREVIEW MODE: View All Button                     */
/* ================================================== */
.evt-preview-mode .evt-view-all-section {
    display: block !important;
    margin-top: 32px;
    padding: 40px 24px;
    text-align: center;
    background: linear-gradient(180deg, transparent 0%, rgba(45, 106, 79, 0.15) 100%);
    border-radius: var(--evt-radius);
    visibility: visible !important;
}

.evt-view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 20px 48px;
    background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 100%);
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 900;
    text-decoration: none;
    text-transform: uppercase;
    border: none;
    border-radius: 50px;
    box-shadow: 0 8px 24px rgba(45, 106, 79, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    letter-spacing: 0.5px;
}

.evt-view-all-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 32px rgba(45, 106, 79, 0.6);
    background: linear-gradient(135deg, #2d6a4f 0%, #40916c 100%);
}

.evt-view-all-btn:active {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(45, 106, 79, 0.5);
}

.evt-view-all-btn .evt-btn-icon {
    font-size: 2rem;
    animation: evt-point-pulse 1.5s infinite;
}

.evt-view-all-btn .evt-btn-text {
    line-height: 1.2;
}

@keyframes evt-point-pulse {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Mobile responsive button */
@media (max-width: 768px) {
    .evt-view-all-section {
        padding: 32px 16px;
    }

    .evt-view-all-btn {
        padding: 16px 32px;
        font-size: 1rem;
        gap: 12px;
        flex-direction: column;
    }

    .evt-view-all-btn .evt-btn-icon {
        font-size: 2.5rem;
    }
}

/* Preview mode: Disable infinite scroll indicator */
.evt-preview-mode .evt-scroll-sentinel {
    display: none;
}

/* ================================================== */
/* HISTORY CHART ICONS (only show when history exists) */
/* ================================================== */
/* Row 1: one icon below rarity */
.evt-history-row-1 {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 4px;
    min-height: 24px;
}

/* Row 2: FR (F), Ride (R), NFR (N), MFR (M) — four slots under F/R/N/M; D is row 1 only */
.evt-history-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 2px;
    margin-top: 4px;
    align-items: center;
    min-height: 32px;
}

.evt-history-row-2 .evt-history-spacer {
    display: block;
}

.evt-history-row-2 .evt-chart-btn {
    justify-self: center;
}

/* Bottom row chart icons: square corners like top icon (override generic .evt-card-btns button radius) */
#evt-table-root .evt-item-card .evt-card-btns .evt-chart-btn,
#evt-table-root-preview .evt-item-card .evt-card-btns .evt-chart-btn {
    border-radius: 0;
}

/* Chart button: forest green accent, 25% smaller overall, square (same as top icon) */
.evt-chart-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 24px;
    min-height: 0;
    padding: 2px 1px 1px;
    border: 1.5px solid #40916c;
    border-radius: 0;
    background: #40916c;
    color: #ffffff;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
    gap: 0;
}

.evt-chart-btn:hover {
    background: #2d6a4f;
    border-color: #2d6a4f;
    color: #ffffff;
    transform: scale(1.05);
}

.evt-chart-btn .evt-chart-icon-svg {
    color: #ffffff;
    flex-shrink: 0;
}

.evt-chart-label {
    font-size: 5px;
    line-height: 1;
    color: #ffffff;
    margin-top: 1px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}

.evt-chart-icon-svg {
    display: block;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

/* History modal - light background like Value List plugin */
.evt-history-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.2s, opacity 0.2s;
}

.evt-history-modal.evt-history-modal-open {
    visibility: visible;
    opacity: 1;
}

.evt-history-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.evt-history-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    width: 90vw;
    max-width: 640px;
    min-width: 420px;
    max-height: 90vh;
    overflow: auto;
    padding: 28px 24px 24px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
    border: 1px solid #ddd;
}

.evt-history-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    background: #f0f0f0;
    color: #333;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.evt-history-modal-close:hover {
    background: #333;
    color: #fff;
}

.evt-history-modal-title {
    margin: 0 0 16px 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a1a;
    padding-right: 44px;
    text-align: center;
}

.evt-history-modal-body {
    min-height: 40px;
}

.evt-history-loading,
.evt-history-no-data,
.evt-history-error {
    text-align: center;
    color: #555;
    padding: 16px 0;
}

.evt-history-error {
    color: #c00;
}

.evt-history-note {
    margin: 0 0 12px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #475569;
    text-align: left;
}

.evt-history-from-export strong {
    color: #1e293b;
}

.evt-history-chart-wrap {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-top: 16px;
    width: 100%;
    min-height: 380px;
    height: 380px;
    display: none;
    box-sizing: border-box;
}

.evt-history-modal .evt-history-chart-wrap.evt-history-chart-visible {
    display: block;
}

#evt-history-chart {
    width: 100% !important;
    height: 340px !important;
    display: block;
    max-width: 100%;
}

.evt-history-updated-label {
    display: block;
    margin-top: 12px;
    padding: 8px 12px;
    background: #ecfdf5;
    border-left: 4px solid #2d6a4f;
    color: #1a1a1a;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 0 6px 6px 0;
}

@media (max-width: 768px) {
    .evt-history-row-2 {
        min-height: 28px;
    }
    .evt-history-row-1 .evt-chart-btn,
    .evt-history-row-2 .evt-chart-btn {
        width: 20px;
        min-height: 0;
        padding: 2px 1px 1px;
        border-width: 1.5px;
    }
    .evt-chart-icon-svg {
        width: 12px;
        height: 12px;
    }
    .evt-chart-label {
        font-size: 5px;
        line-height: 1;
        margin-top: 1px;
    }
}
