/* -----------------------------------
   GENERAL TABLE STYLING
----------------------------------- */
.ci-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.ci-table th,
.ci-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.ci-table th {
    background: #f3f4f6;
    font-weight: 600;
}

/* -----------------------------------
   TABS
----------------------------------- */
.ci-rankings-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.ci-tab-btn {
    padding: 8px 16px;
    border: none;
    background: #e5e7eb;
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
}

.ci-tab-btn.active {
    background: #2563eb;
    color: #fff;
}

/* -----------------------------------
   EVENT ICONS
----------------------------------- */
.ci-event-icons-row {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.ci-event-btn {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
}

.ci-event-btn.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* -----------------------------------
   SINGLE / AVERAGE TOGGLE
----------------------------------- */
.ci-type-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.ci-type-btn {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: #fff;
    cursor: pointer;
}

.ci-type-btn.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* -----------------------------------
   STATE DROPDOWN
----------------------------------- */
.ci-state-filter {
    margin-bottom: 20px;
}

#ci-state-select {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
}

/* -----------------------------------
   CLAIM BUTTON
----------------------------------- */
.ci-claim-btn {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    background: #2563eb;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
}

.ci-claim-btn:hover {
    background: #1d4ed8;
}

/* -----------------------------------
   TOAST OVERLAY (CENTERED)
----------------------------------- */
#ci-toast-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.12); /* 10–15% dim */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

/* -----------------------------------
   TOAST CARD
----------------------------------- */
#ci-toast-card {
    background: #fff;
    padding: 22px 26px;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.18); /* soft shadow */
    max-width: 340px;
    text-align: center;
    transform: scale(0.9);
    opacity: 0;
    animation: ci-toast-pop 0.22s ease-out forwards;
}

#ci-toast-card p {
    margin-bottom: 16px;
    font-size: 15px;
    font-weight: 500;
}

/* -----------------------------------
   TOAST BUTTON
----------------------------------- */
#ci-toast-btn {
    padding: 8px 16px;
    border-radius: 999px;
    border: none;
    background: #2563eb;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
}

#ci-toast-btn:hover {
    background: #1d4ed8;
}

/* -----------------------------------
   SCALE-UP POP ANIMATION
----------------------------------- */
@keyframes ci-toast-pop {
    from { transform: scale(0.9); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}


/* Event icon row */
.ci-event-icons-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 12px 4px;
    margin-bottom: 20px;
}

/* Icon container */
.ci-event-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.75;
    transition: 0.18s ease;
    flex-shrink: 0;
}

/* Icon image */
.ci-event-icon img {
    width: 22px;
    height: 22px;
    pointer-events: none;
}

/* Hover effect */
.ci-event-icon:hover {
    opacity: 1;
    transform: scale(1.12);
}

/* Active (WCA style) */
.ci-event-icon.active {
    background: #2563eb;
    opacity: 1;
    transform: scale(1.18);
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.6);
}

.ci-event-icon.active img {
    filter: brightness(0) invert(1); /* make icon white */
}

/* Mobile scaling */
@media (max-width: 600px) {
    .ci-event-icon {
        width: 28px;
        height: 28px;
    }
    .ci-event-icon img {
        width: 18px;
        height: 18px;
    }
}
/* Tooltip container */
.ci-event-icon {
    position: relative;
}

/* Tooltip bubble */
.ci-event-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 42px;
    left: 50%;
    transform: translateX(-50%);
    background: #111827;
    color: #fff;
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: 0.15s ease;
    z-index: 20;
}

/* Tooltip arrow */
.ci-event-icon::before {
    content: "";
    position: absolute;
    bottom: 34px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #111827 transparent transparent transparent;
    opacity: 0;
    transition: 0.15s ease;
    z-index: 20;
}

/* Show tooltip on hover */
.ci-event-icon:hover::after,
.ci-event-icon:hover::before {
    opacity: 1;
}

/* Mobile: reduce tooltip size */
@media (max-width: 600px) {
    .ci-event-icon::after {
        font-size: 10px;
        padding: 3px 6px;
        bottom: 38px;
    }
    .ci-event-icon::before {
        bottom: 30px;
    }
}