/* ═══════════════════════════════════════════════════════════════════════════
   SBF Phone Max — Control Center
   iOS-Style Panel · Liquid-Glass Buttons · Slider Cards
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Overlay ─────────────────────────────────────────────────────────────── */
.cc-overlay {
    position: absolute;
    inset: 0;
    z-index: 1800;
    pointer-events: none;
    visibility: hidden;
    /* Delay hiding until after the close-animation finishes (0.28s) */
    transition: visibility 0s 0.28s;
}

.cc-overlay.cc-open {
    pointer-events: all;
    visibility: visible;
    transition: visibility 0s 0s;
}

/* ── Panel ───────────────────────────────────────────────────────────────── */
.cc-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 82px 14px 60px;
    background: rgba(36, 36, 38, 0.82);
    backdrop-filter: blur(8px);
    /* Match the .phone-frame border-radius (45px) so the panel edges look
       rounded both during the open-animation (scale 0.9) AND at rest (scale 1).
       Without this, the panel sits behind a rounded clip but its own corners
       remain square → visibly "pop" into square corners as the scale animates
       up to 1. */
    border-radius: 45px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transform-origin: 50% 50%;
    transform: scale(0.90);
    opacity: 0;
    transition:
        transform 0.28s cubic-bezier(0.32, 0, 0.12, 1),
        opacity   0.22s ease;
}

.cc-overlay.cc-open .cc-panel {
    transform: scale(1);
    opacity: 1;
}

/* Backdrop — tap area below panel to close */
.cc-backdrop {
    position: absolute;
    inset: 0;
    z-index: -1;
}

/* ── Card ────────────────────────────────────────────────────────────────── */
.cc-card {
    background: rgba(255, 255, 255, 0.065);
    border-radius: 20px;
    box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.10);
}

/* ── Media Player Card ───────────────────────────────────────────────────── */
.cc-media-card {
    padding: 14px 16px 14px;
}

.cc-media-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cc-media-art {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.09);
    box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.35);
}

.cc-media-art svg {
    width: 26px;
    height: 26px;
}

.cc-media-info {
    flex: 1;
    min-width: 0;
}

.cc-media-title {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.90);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
}

.cc-media-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.42);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
    margin-top: 2px;
}

.cc-media-controls {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.cc-media-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.80);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.12s ease, transform 0.10s ease;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

.cc-media-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.cc-media-btn:active {
    transform: scale(0.86);
    background: rgba(255, 255, 255, 0.13);
}

.cc-media-btn svg {
    width: 18px;
    height: 18px;
}

.cc-media-play-btn svg {
    width: 22px;
    height: 22px;
}

/* Progress row */
.cc-media-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.cc-media-progress span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.78);
    font-variant-numeric: tabular-nums;
    min-width: 30px;
    line-height: 1;
    font-weight: 500;
}

.cc-media-progress span:last-child {
    text-align: right;
}

.cc-progress-track {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.22);  /* grauer Hintergrund immer sichtbar */
    border-radius: 3px;
    position: relative;
    overflow: hidden;
    /* NICHT anklickbar/seekable — Spulen nur in der Music-App selbst */
    pointer-events: none;
    cursor: default;
}

.cc-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    background: #ffffff;  /* voller weißer Kontrast */
    border-radius: 3px;
    pointer-events: none;
}
    border-radius: 2px;
}

/* ── Slider Cards ────────────────────────────────────────────────────────── */
.cc-slider-card {
    display: flex;
    align-items: center;
    padding: 0 4px;
}

/* Erster Slider (Volume): 20 px Abstand zur Media-Card (gap 10 + margin 10) */
.cc-media-card + .cc-slider-card {
    margin-top: 10px;
}

/* Zwischen den Slidern: 14 px (gap 10 + margin 4) */
.cc-slider-card + .cc-slider-card {
    margin-top: 4px;
}

/* Buttons-Grid: 20 px Abstand zum Brightness-Slider (gap 10 + margin 10) */
.cc-slider-card + .cc-buttons-grid {
    margin-top: 10px;
}

/* Glass pill track — 1:1 vom volume-indicator Style (horizontal) */
.cc-slider-track {
    flex: 1;
    height: 30px;
    border-radius: 15px;
    background: rgba(187, 187, 188, 0.14);
    backdrop-filter: blur(3px) saturate(160%);
    -webkit-backdrop-filter: blur(3px) saturate(160%);
    box-shadow:
        inset 0 0 0 1px          rgba(255, 255, 255, 0.12),
        inset 1.8px 2px 0 -2px   rgba(255, 255, 255, 0.45),
        inset -2px -2px 0 -2px   rgba(255, 255, 255, 0.16),
        inset -3px -8px 1px -6px rgba(255, 255, 255, 0.12),
        inset -0.3px -1px 4px 0  rgba(0, 0, 0, 0.12),
        inset -1.5px 2.5px 0 -2px rgba(0, 0, 0, 0.20),
        inset 0 3px 4px -2px     rgba(0, 0, 0, 0.20),
        inset 2px -6.5px 1px -4px rgba(0, 0, 0, 0.10),
        0 1px 5px 0              rgba(0, 0, 0, 0.10),
        0 6px 24px 0             rgba(0, 0, 0, 0.18),
        0 2px 12px 2px           rgba(0, 0, 0, 0.22);
    overflow: hidden;
    position: relative;
}

/* Fill — wächst von links nach rechts, kein transition (folgt sofort) */
.cc-slider-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--cc-pct, 100%);
    background: rgba(230, 230, 232, 0.94);
    border-radius: 15px;
    pointer-events: none;
    z-index: 1;
}

/* Icon links innerhalb der Pill */
.cc-slider-icon {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    pointer-events: none;
    color: rgba(36, 36, 38, 0.85);
    display: flex;
    align-items: center;
}

.cc-slider-icon svg {
    width: 18px;
    height: 18px;
}

/* Transparentes Range-Input als Interaktionsfläche — überall drauf */
.cc-slider-input {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    margin: 0;
    padding: 0;
    z-index: 3;
    -webkit-appearance: none;
    appearance: none;
}

/* ── Buttons Grid ────────────────────────────────────────────────────────── */
.cc-buttons-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 8px 0 4px;
}

/* Liquid Glass Button — identisch mit .setup-back-btn */
.cc-btn {
    width: 54px;
    height: 54px;
    justify-self: center;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    transition:
        box-shadow       0.18s ease,
        background-color 0.18s ease,
        transform        0.10s ease;
    /* Liquid Glass — inactive */
    background-color: rgba(187, 187, 188, 0);
    box-shadow:
        inset 0 0 0 1px        rgba(255, 255, 255, 0.14),
        inset 1px 2px 0 -1px   rgba(255, 255, 255, 0.60),
        0 3px 8px 0            rgba(0, 0, 0, 0.15);
    color: rgba(255, 255, 255, 0.85);
}

.cc-btn:hover {
    background-color: rgba(187, 187, 188, 0.26);
    box-shadow:
        inset 0 0 0 1px        rgba(255, 255, 255, 0.11),
        inset 1px 2px 0 -1px   rgba(255, 255, 255, 0.56),
        0 3px 12px 0           rgba(0, 0, 0, 0.0);
}

.cc-btn:active {
    transform: scale(0.90);
    box-shadow:
        inset 0 0 0 1px        rgba(255, 255, 255, 0.10),
        0 1px 4px 0            rgba(0, 0, 0, 0.08);
}

/* Active / ON state */
.cc-btn.cc-btn-active {
    background-color: rgba(255, 255, 255, 0.88);
    color: #1c1c1e;
    box-shadow:
        0 3px 10px 0   rgba(0, 0, 0, 0.18),
        inset 0 1px 0  rgba(255, 255, 255, 0.80);
}

.cc-btn.cc-btn-active:hover {
    background-color: rgba(255, 255, 255, 0.95);
}

.cc-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cc-btn-icon svg {
    width: 22px;
    height: 22px;
}

/* ── Home Bar ────────────────────────────────────────────────────────────── */
.cc-home-bar {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.cc-home-indicator {
    width: 120px;
    height: 5px;
    background: rgba(255, 255, 255, 0.30);
    border-radius: 3px;
    transition: background 0.14s ease, transform 0.12s ease;
}

.cc-home-bar:hover .cc-home-indicator {
    background: rgba(255, 255, 255, 0.80);
}

.cc-home-bar:active .cc-home-indicator {
    transform: scaleX(0.90);
    background: rgba(255, 255, 255, 0.90);
}
