/* --- css/components.css --- */
/* =============================================================================
   components.css — MX Bikes Toolbox: Shared UI Components
   Loaded by: index.php (main app) and user.php (dashboard)
   Depends on theme tokens defined in style.css / landing.css
   ============================================================================= */

/* ── Kit image lightbox ──────────────────────────────────────────────────────── */
.kit-img-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.kit-img-lightbox.active {
    display: flex;
}

.kit-img-lightbox-inner {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    max-width: min(1920px, 95vw);
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
}

.kit-img-lightbox-img {
    display: block;
    max-width: 100%;
    max-height: calc(95vh - 48px);
    object-fit: contain;
    width: auto;
    height: auto;
}

.kit-img-lightbox-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-top: 1px solid var(--border-color);
    gap: 12px;
    flex-shrink: 0;
}

.kit-img-lightbox-label {
    font-size: var(--fs-13);
    color: var(--text-muted);
    font-family: var(--font-display);
    letter-spacing: var(--track-med);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.kit-img-lightbox-close {
    flex-shrink: 0;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 16px;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s, color 0.15s;
    line-height: 1;
    padding: 0;
}

.kit-img-lightbox-close:hover {
    border-color: var(--text-error);
    color: var(--text-error);
}


/* --- css/steam-auth.css --- */
/* ===========================
   Steam Auth — Dashboard User Bar
   Uses existing theme tokens from style.css
   =========================== */

.steam-user-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5.5px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.steam-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.steam-user-name {
    color: var(--accent-cyan);
    font-family: var(--font-ui);
    font-size: var(--fs-13);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}


.steam-logout-btn {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: var(--track-wide);
    text-transform: uppercase;
    font-size: var(--fs-11);
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    background: transparent;
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 4px;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.steam-logout-btn:hover {
    background: rgba(255, 68, 68, 0.1);
    border-color: var(--text-error);
    color: var(--text-error);
    text-decoration: none;
}


/* --- css/modals.css --- */
/* ===========================
   Admin & General Modals
   =========================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    height: 80vh;
    max-height: 800px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    position: relative;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-dark);
}

.modal-title {
    margin: 0;
    color: var(--accent-cyan);
    font-size: var(--fs-18);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: var(--fs-22);
    cursor: pointer;
    line-height: 1;
    margin: 0;
    padding: 0;
}

.modal-close:hover {
    color: #fff;
}

.modal-iframe {
    flex: 1;
    border: none;
    width: 100%;
    background: var(--bg-dark);
}

/* Header Admin Button */
.btn-header-admin {
    color: var(--accent-cyan);
    text-decoration: none;
    border: 1px solid rgba(0, 229, 255, 0.4);
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    background: rgba(0, 229, 255, 0.05);
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-header-admin:hover {
    background: rgba(0, 229, 255, 0.15);
    text-decoration: none;
}

/* Header Purpose Button */
.btn-header-purpose {
    color: var(--text-main);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-header-purpose:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
}