/**
 * Game Tracker - Shared CSS
 *
 * Reusable visual components for game-specific progress trackers.
 * Checkbox animations and relic/item display containers.
 */

/* ========== Tracker Heading ========== */
.tracker-heading {
    margin-top: 40px;
}

/* ========== Animated Checkbox Component ========== */

.checkbox-wrapper-19 {
    box-sizing: border-box;
    --background-color: #fff;
    --checkbox-height: 25px;
    margin-right: 6px;
}

.checkbox-wrapper-19 input[type=checkbox] {
    display: none;
}

.checkbox-wrapper-19 .check-box {
    height: var(--checkbox-height);
    width: var(--checkbox-height);
    background-color: transparent;
    border: calc(var(--checkbox-height) * 0.1) solid #aaaaaa;
    border-radius: 5px;
    position: relative;
    display: inline-block;
    box-sizing: border-box;
    transition: border-color ease 0.2s;
    cursor: default;
    pointer-events: none;
}

.checkbox-wrapper-19 .check-box::before,
.checkbox-wrapper-19 .check-box::after {
    box-sizing: border-box;
    position: absolute;
    height: 0;
    width: calc(var(--checkbox-height) * 0.2);
    background-color: #FF0000;
    display: inline-block;
    transform-origin: left top;
    border-radius: 5px;
    content: " ";
    transition: opacity ease 0.5s;
}

.checkbox-wrapper-19 .check-box::before {
    top: calc(var(--checkbox-height) * 0.72);
    left: calc(var(--checkbox-height) * 0.41);
    transform: rotate(-135deg);
}

.checkbox-wrapper-19 .check-box::after {
    top: calc(var(--checkbox-height) * 0.37);
    left: calc(var(--checkbox-height) * 0.05);
    transform: rotate(-45deg);
}

/* Checked state */
.checkbox-wrapper-19 input[type=checkbox]:checked + .check-box,
.checkbox-wrapper-19 .check-box.checked {
    border-color: #FF0000;
}

.checkbox-wrapper-19 input[type=checkbox]:checked + .check-box::after,
.checkbox-wrapper-19 .check-box.checked::after {
    height: calc(var(--checkbox-height) / 2);
    animation: dothabottomcheck-19 0.2s ease 0s forwards;
}

.checkbox-wrapper-19 input[type=checkbox]:checked + .check-box::before,
.checkbox-wrapper-19 .check-box.checked::before {
    height: calc(var(--checkbox-height) * 1.2);
    animation: dothatopcheck-19 0.4s ease 0s forwards;
}

/* Checkbox animations */
@keyframes dothabottomcheck-19 {
    0% { height: 0; }
    100% { height: calc(var(--checkbox-height) / 2); }
}

@keyframes dothatopcheck-19 {
    0% { height: 0; }
    50% { height: 0; }
    100% { height: calc(var(--checkbox-height) * 1.2); }
}

/* Checkbox row layout */
.checkbox-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.checkbox-row img {
    margin-left: 10px;
    width: 20px;
    height: 20px;
}

/* ========== Relic / Item Display ========== */

.relics-flex-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.relic-container {
    width: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.relic-container small {
    margin-top: 4px;
    font-size: 0.8em;
    color: #bbb;
}

/* ========== Tracker Teaser Card ========== */

.tracker-teaser {
    background: linear-gradient(135deg, #1a1a1a 0%, #222 100%);
    border: 2px solid #333;
    border-left: 4px solid #4da44b;
    border-radius: 8px;
    padding: 24px 28px;
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.tracker-teaser .tracker-heading {
    margin: 0 !important;
    font-size: 1.3rem;
}

.tracker-teaser-desc {
    color: #888;
    font-size: 0.9rem;
    margin: 0;
    flex: 1;
}

/* Scaled mini view of tracker on page */
.tracker-mini-wrap {
    position: relative;
    margin-top: 16px;
    overflow: hidden;
    max-height: 350px;
    border: 1px solid #333;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.tracker-mini-wrap:hover {
    border-color: #4da44b;
}

.tracker-mini-wrap .tracker-content {
    transform: scale(0.5);
    transform-origin: top left;
    width: 200%;
    pointer-events: none;
}

/* Click overlay covers the mini preview */
.tracker-mini-click-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    cursor: pointer;
}

/* Fade-out at bottom */
.tracker-mini-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(transparent, #1a1a1a);
    pointer-events: none;
    z-index: 5;
}

/* Header row */
.tracker-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 30px;
}

.tracker-header-row .tracker-heading {
    margin: 0 !important;
}

.tracker-open-btn {
    background: #4da44b;
    border: none;
    color: #fff;
    padding: 10px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    white-space: nowrap;
    transition: background 0.2s;
    flex-shrink: 0;
}

.tracker-open-btn:hover {
    background: #3d8c3b;
}

@media (max-width: 600px) {
    .tracker-teaser {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
}

/* Fullscreen overlay */
.tracker-fullscreen-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #0a0a0a;
    overflow: auto;
    display: flex;
    flex-direction: column;
}

.tracker-fullscreen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: #111;
    border-bottom: 2px solid #4da44b;
    flex-shrink: 0;
}

.tracker-fullscreen-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #4da44b;
}

.tracker-fullscreen-close {
    background: none;
    border: 1px solid #555;
    color: #ccc;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 4px;
    line-height: 1;
    transition: border-color 0.2s, color 0.2s;
}

.tracker-fullscreen-close:hover {
    border-color: #e53935;
    color: #e53935;
}

.tracker-fullscreen-body {
    flex: 1;
    padding: 24px;
    overflow: auto;
}

/* Remove clip-path constraints in fullscreen */
.tracker-fullscreen-body .tracker-content {
    max-width: 100%;
    overflow: visible;
}
