/* ── DESIGN-R Template Configurator ── */

.cfg-bar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
    background: #111; border-bottom: 1px solid #333;
    height: 48px; display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px; font-family: 'Inter', sans-serif;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.cfg-bar__left { display: flex; align-items: center; gap: 16px; }
.cfg-bar__right { display: flex; align-items: center; gap: 12px; }

.cfg-bar__logo {
    font-size: 0.75rem; font-weight: 600; color: #888;
    letter-spacing: 0.08em; text-transform: uppercase;
    text-decoration: none; transition: color 0.2s;
}
.cfg-bar__logo span { color: #fff; transition: color 0.2s; }
.cfg-bar__logo:hover { color: var(--accent, #00A3FF); }
.cfg-bar__logo:hover span { color: var(--accent, #00A3FF); }

.cfg-bar select {
    background: #1a1a1a; color: #fff; border: 1px solid #333;
    padding: 6px 28px 6px 12px; border-radius: 6px;
    font-family: 'Inter', sans-serif; font-size: 0.8rem;
    cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 8px center;
}
.cfg-bar select:focus { outline: none; border-color: #00A3FF; }

.cfg-bar__brand-btn {
    background: transparent; border: 1px solid #333; color: #ccc;
    padding: 6px 16px; border-radius: 6px; font-size: 0.8rem;
    cursor: pointer; font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}
.cfg-bar__brand-btn:hover { border-color: #00A3FF; color: #fff; }

.cfg-bar__buy {
    background: var(--accent, #00A3FF); color: #fff; border: none;
    padding: 8px 20px; border-radius: 6px; font-size: 0.8rem;
    font-weight: 600; cursor: pointer; font-family: 'Inter', sans-serif;
    transition: all 0.2s; letter-spacing: 0.02em;
}
.cfg-bar__buy:hover { filter: brightness(0.85); transform: translateY(-1px); box-shadow: 0 4px 12px var(--accent-dim, rgba(0,163,255,0.3)); }

/* Admin links in config bar (logged-in mode) */
.cfg-bar__admin-link {
    color: rgba(255,255,255,0.8); text-decoration: none;
    padding: 6px 14px; border-radius: 4px; font-size: 0.8rem;
    transition: all 0.15s; font-family: 'Inter', sans-serif;
}
.cfg-bar__admin-link:hover { color: #fff; background: rgba(255,255,255,0.1); }

/* ── Brand Sidebar ── */
.cfg-sidebar {
    position: fixed; top: 48px; right: -360px; bottom: 0; z-index: 9998;
    width: 340px; background: #111; border-left: 1px solid #333;
    padding: 24px; overflow-y: auto; transition: right 0.3s ease;
    font-family: 'Inter', sans-serif;
}
.cfg-sidebar.open { right: 0; }

.cfg-sidebar__title {
    font-size: 0.7rem; font-weight: 600; color: #888;
    letter-spacing: 0.12em; text-transform: uppercase;
    margin-bottom: 20px;
}

.cfg-sidebar label {
    display: block; font-size: 0.75rem; color: #aaa;
    margin-bottom: 6px; letter-spacing: 0.04em;
}

.cfg-sidebar input[type="text"] {
    width: 100%; background: #1a1a1a; border: 1px solid #333;
    color: #fff; padding: 10px 12px; border-radius: 6px;
    font-size: 0.85rem; margin-bottom: 16px;
    font-family: 'Inter', sans-serif;
}
.cfg-sidebar input[type="text"]:focus { outline: none; border-color: #00A3FF; }

.cfg-sidebar__color-row {
    display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.cfg-sidebar__color-row input[type="color"] {
    width: 36px; height: 36px; border: 1px solid #333;
    border-radius: 6px; cursor: pointer; background: none;
    padding: 2px;
}
.cfg-sidebar__color-row input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.cfg-sidebar__color-row input[type="color"]::-webkit-color-swatch { border: none; border-radius: 4px; }
.cfg-sidebar__color-row span {
    font-size: 0.8rem; color: #ccc;
}

/* ── Accordion Sections ── */
.cfg-section { border-bottom: 1px solid #222; }

.cfg-section__header {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; background: none; border: none; color: #aaa;
    padding: 14px 0; font-size: 0.7rem; font-weight: 600;
    letter-spacing: 0.12em; text-transform: uppercase;
    cursor: pointer; font-family: 'Inter', sans-serif;
    transition: color 0.2s;
}
.cfg-section__header:hover { color: #fff; }

.cfg-section__arrow {
    font-size: 0.65rem; transition: transform 0.2s;
}
.cfg-section--open .cfg-section__arrow { transform: rotate(180deg); }

.cfg-section__body {
    display: none; padding-bottom: 16px;
}
.cfg-section--open .cfg-section__body { display: block; }

.cfg-sidebar__divider {
    border: none; border-top: 1px solid #222;
    margin: 20px 0;
}

.cfg-sidebar__reset {
    background: transparent; border: 1px solid #333; color: #888;
    padding: 8px 16px; border-radius: 6px; font-size: 0.75rem;
    cursor: pointer; font-family: 'Inter', sans-serif;
    width: 100%; margin-top: 8px; transition: all 0.2s;
}
.cfg-sidebar__reset:hover { border-color: #666; color: #ccc; }

/* Name overflow protection */
.nav__logo { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Offset template content for the config bar */
body.cfg-active { padding-top: 48px !important; }
body.cfg-active .nav { top: 48px !important; z-index: 100 !important; }

/* Admin bar removed — config bar handles admin functions directly */

/* Sidebar overlay */
.cfg-overlay {
    display: none; position: fixed; inset: 0; z-index: 9997;
    background: rgba(0,0,0,0.4);
}
.cfg-overlay.open { display: block; }

/* ── Mini Player ── */
.mini-player {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 9990;
    background: #0a0a0a; border-top: 1px solid #333;
    height: 80px; display: flex; align-items: center;
    padding: 0 20px; gap: 16px;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.4);
    transition: transform 0.3s ease;
}
.mini-player.hidden { transform: translateY(100%); }

.mini-player__art {
    width: 52px; height: 52px; border-radius: 6px;
    background: #1a1a1a; flex-shrink: 0; overflow: hidden;
}
.mini-player__art img {
    width: 100%; height: 100%; object-fit: cover;
}

.mini-player__info { flex: 1; min-width: 0; }
.mini-player__track {
    font-size: 0.85rem; font-weight: 500; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mini-player__artist {
    font-size: 0.75rem; color: #888;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.mini-player__controls { display: flex; align-items: center; gap: 12px; }

.mini-player__btn {
    background: none; border: none; color: #fff; cursor: pointer;
    padding: 8px; display: flex; align-items: center; justify-content: center;
    transition: color 0.2s;
}
.mini-player__btn:hover { color: var(--accent, #00A3FF); }
.mini-player__btn svg { width: 20px; height: 20px; }
.mini-player__btn--play svg { width: 28px; height: 28px; }

.mini-player__progress {
    flex: 1; max-width: 300px; height: 4px; background: #333;
    border-radius: 2px; overflow: hidden; cursor: pointer;
}
.mini-player__progress-fill {
    height: 100%; background: var(--accent, #00A3FF);
    border-radius: 2px; width: 35%; transition: width 0.3s;
}

.mini-player__time {
    font-size: 0.7rem; color: #666; min-width: 70px; text-align: center;
}

.mini-player__toggle {
    position: fixed; bottom: 88px; right: 20px; z-index: 9991;
    background: var(--accent, #00A3FF); color: #fff; border: none;
    width: 36px; height: 36px; border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3); transition: all 0.2s;
    font-size: 0.9rem;
}
.mini-player__toggle:hover { transform: scale(1.1); }

/* Pad footer for mini player */
body.cfg-active { padding-bottom: 80px !important; }

/* Mobile */
@media (max-width: 1024px) {
    .cfg-bar__admin-link { padding: 6px 10px; font-size: 0.75rem; }
    .cfg-bar__buy { padding: 6px 14px; font-size: 0.75rem; }
}

@media (max-width: 768px) {
    .cfg-bar { padding: 0 12px; gap: 8px; }
    .cfg-bar__logo { display: none; }
    .cfg-bar__admin-link { padding: 4px 8px; font-size: 0.7rem; }
    .cfg-sidebar {
        width: 100%; right: 0; top: auto; bottom: -60vh;
        height: 60vh; border-left: none; border-top: 1px solid #333;
        border-radius: 16px 16px 0 0; transition: bottom 0.3s ease;
    }
    .cfg-sidebar.open { bottom: 0; }
    .cfg-bar select { max-width: 120px; }
    .mini-player { height: 64px; padding: 0 12px; gap: 10px; }
    .mini-player__progress { display: none; }
    .mini-player__time { display: none; }
    body.cfg-active { padding-bottom: 64px !important; }
}
