/* quick-settings.css — クイック設定パネルとダークテーマの上書きスタイル */

/* パネル本体（シェルフ右上の上に浮かぶ） */
.quick-settings-panel {
    position: fixed;
    right: 12px;
    bottom: 56px;
    width: 360px;
    max-width: calc(100vw - 24px);
    background: var(--md-sys-color-surface, #fff);
    color: var(--md-sys-color-on-surface, #202124);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
    padding: 18px;
    z-index: 9998;
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    transform-origin: bottom right;
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.quick-settings-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* ヘッダの大きな時計 */
.qs-clock {
    padding: 2px 6px 12px;
}

.qs-time {
    font-size: 34px;
    font-weight: 500;
    letter-spacing: 0.5px;
    line-height: 1.1;
}

.qs-date {
    font-size: 13px;
    color: var(--md-sys-color-on-surface-variant, #5f6368);
    margin-top: 2px;
}

/* トグル行 */
.qs-rows {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.qs-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 8px;
    border-radius: 12px;
}

.qs-row:hover {
    background: rgba(0, 0, 0, 0.05);
}

.qs-row-label {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.qs-row md-switch {
    --md-switch-track-width: 46px;
    --md-switch-track-height: 28px;
    --md-switch-handle-width: 14px;
    --md-switch-handle-height: 14px;
    --md-switch-selected-handle-width: 20px;
    --md-switch-selected-handle-height: 20px;
    --md-switch-pressed-handle-width: 24px;
    --md-switch-pressed-handle-height: 24px;
}

/* Wi-Fi OFF 時はシェルフの電波アイコンを減光する */
.status-pill.wifi-off .status-icons md-icon:first-child {
    opacity: 0.28;
}

/* ------------------------------------------------------------------ */
/* ダークテーマ（body.dark-theme）                                       */
/* 変数の差し替え + 固定色で書かれた要素の上書き                          */
/* ------------------------------------------------------------------ */
body.dark-theme {
    --md-sys-color-on-surface: #e8eaed;
    --md-sys-color-on-surface-variant: #bdc1c6;
    --md-sys-color-surface: #1f2125;
    --md-sys-color-surface-dim: #2a2d31;
    background: linear-gradient(135deg, #453c7d 0%, #2c2453 100%);
}

body.dark-theme .shelf-container {
    background: rgba(32, 33, 36, 0.92);
}

body.dark-theme .status-pill {
    background: rgba(255, 255, 255, 0.08);
}

body.dark-theme .status-pill:hover {
    background: rgba(255, 255, 255, 0.14);
}

body.dark-theme .shelf-icon,
body.dark-theme .status-text {
    color: #e8eaed;
}

body.dark-theme .qs-row:hover {
    background: rgba(255, 255, 255, 0.08);
}

body.dark-theme .quick-settings-panel {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}
