/* --- Control Center Panel --- */
.control-center-panel {
  position: absolute;
  top: 48px;
  right: 18px;
  left: unset;
  background: var(--window-bg-50);
  border-radius: 8px;
  box-shadow: var(--window-shadow-active);
  /* border: 0.5px solid rgba(255, 255, 255, 0.13); */
  padding: 8px;
  width: 312px;
  /* min-width: 320px; */
  /* min-height: 220px; */
  /* max-width: 360px; */
  font-family: inherit;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  backdrop-filter: var(--blur-filter-lo);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  transition: box-shadow 0.18s, border-color 0.18s, background 0.18s;
  overflow: hidden;
}

.cc-row {
  display: flex;
  width: 100%;
  flex-direction: row;
  gap: 8px;
  justify-content: space-between;
}

.cc-row.cc-r2 {
  margin-bottom: 0;
}

.cc-row-label {
  display: flex;
  align-items: center;
}

.cc-row-label>span {
  font-weight: bold !important;
  letter-spacing: 0.25px;
}

.cc-sect {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  justify-content: space-between;
}

.cc-tile {
  background: var(--window-bg-25);
  box-shadow: var(--cc-tile-shadow);
  border-radius: 6px;
  padding: 12px;
  flex: 1 1 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  transition: background 0.15s;
  user-select: none;
}

.cc-tile .material-symbols-rounded {
  font-size: 16px;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}

.cc-tile.cc-wireless {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0;
  gap: 0;
  justify-content: space-between;
  width: 144px;
  height: 140px;
}

.cc-tile.cc-focus {
  padding: 0;
  width: 144px;
  height: 68px;
}

.cc-tile.cc-devices, .cc-tile.cc-mirroring {
  display: flex;
  flex-direction: column;
  width: 20px;
  gap: 0;
  margin-top: 8px;
  padding: 10px 8px !important;
  line-height: 1.2;
  height: 68px;
  justify-content: center;
  text-align: center;
}

.cc-tile.cc-devices>.material-symbols-rounded, .cc-tile.cc-mirroring>.material-symbols-rounded {
  font-size: 24px;
}

.cc-tile.cc-mirroring>.material-symbols-rounded {
  transform: rotate(90deg);
}

.cc-tile.cc-display, .cc-tile.cc-sound {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 12px 12px 12px;
}

.cc-tile.cc-sound {
  padding: 6px 12px 10px 12px;
  gap: 4px;
}

.cc-seg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0px 12px;
}

.cc-seg-stack {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.cc-seg-label {
  width: 100%;
  padding-left: 8px;
}

.cc-seg-button {
  border: none;
  background: #ffffff40;
  box-shadow: none;
  height: 28px;
  width: 28px;
  padding: 6px;
  border-radius: 32px;
}

.cc-seg-button.quickdrop-toggle>span.material-symbols-rounded {
  margin-top: -2px;
}

.cc-wireless>.cc-seg:first-child {
  padding-top: 4px;
}
.cc-wireless>.cc-seg:last-child {
  padding-bottom: 4px;
}

/* Subpanel Styles */
.cc-subpanel {
  padding: 4px;
  gap: 0;
}

.cc-subpanel-header {
  display: flex;
  padding: 6px 8px;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  justify-content: space-between;
  align-items: center;
}

.cc-subpanel-content {
  padding: 0;
  font-size: 12px;
}

.cc-subpanel-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.cc-subpanel-item:last-child {
  border-bottom: none;
}

.cc-item-label {
  font-size: 13px;
  color: #ccc;
}

.cc-item-value {
  font-size: 13px;
  color: #fff;
  font-weight: 500;
}

/* Slider Styles */
.cc-slider {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  width: 100%;
}

.cc-range {
  flex: 1;
  height: 24px;
  border-radius: 32px;
  background: linear-gradient(to right, #fff 0%, #fff var(--cc-slider-fill-corrected, 50%), rgba(255,255,255,0.2) var(--cc-slider-fill-corrected, 50%), rgba(255,255,255,0.2) 100%);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: background 0.2s;
}

.cc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 4px rgba(0,0,0,0.1);
}

.cc-range::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent-color, #007AFF);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: border 0.2s;
}

/* Remove default outline for Firefox */
.cc-range:focus {
  outline: none;
}

/* Hide the outline for the range track in Firefox */
.cc-range::-moz-focus-outer {
  border: 0;
}

/* For Firefox: style the track with a fill */
.cc-range::-moz-range-progress {
  background-color: var(--accent-color, #007AFF);
  height: 24px;
  border-radius: 32px;
}
.cc-range::-moz-range-track {
  background: rgba(255,255,255,0.2);
  height: 24px;
  border-radius: 32px;
}

/* For IE/Edge */
.cc-range::-ms-fill-lower {
  background: var(--accent-color, #007AFF);
  border-radius: 32px;
}
.cc-range::-ms-fill-upper {
  background: rgba(255,255,255,0.2);
  border-radius: 32px;
}

/* Remove border for all browsers */
.cc-range {
  border: none;
}

.cc-slider-value {
  font-size: 12px;
  color: #fff;
  font-weight: 500;
  min-width: 40px;
  text-align: right;
}

.cc-placeholder {
  text-align: center;
  color: #999;
  font-style: italic;
  padding: 20px 0;
}

.cc-slider-icon {
  position: absolute;
  left: 0;
  height: 24px;
  width: 24px;
  top: 50%;
  display: flex;
  padding: 0;
  transform: translateY(-50%);
  font-size: 16px;
  font-variation-settings: 'FILL' 1, 'wght' 700, 'GRAD' 0, 'opsz' 20 !important;
  border-radius: 24px 0 0 24px;
  background: linear-gradient(90deg, #fff, #fff, #fff, transparent, transparent, transparent);
  color: #808080 !important;
  pointer-events: none;
  z-index: 2;
  align-items: center;
  justify-content: center;
}

.cc-tile.cc-nowplaying {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  min-height: 64px;
  padding: 8px 16px 8px 8px;
}

.cc-nowplaying-artwork {
  width: 40px;
  height: 40px;
  margin: 0 4px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cc-nowplaying-artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.cc-nowplaying-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0 6px;
}
.cc-nowplaying-title, .cc-nowplaying-artist {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  max-width: 152px;
}
.cc-nowplaying-title {
  font-size: 12px;
  font-weight: 600;
}
.cc-nowplaying-artist {
  font-size: 10px;
  opacity: 0.75;
}

.cc-nowplaying-controls {
  display: flex;
  align-items: center;
}

.cc-nowplaying-btn {
  background: none;
  border: none;
  color: unset;
  border-radius: 6px;
  box-shadow: none;
  padding: 2px;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cc-nowplaying-btn>.material-symbols-rounded {
  font-size: 24px !important;
}

.cc-animating-tile {
  pointer-events: none !important;
  box-shadow: var(--window-shadow-active), 0 8px 32px 0 #0004, 0 0 0 1px #0001 !important;
  border-radius: 12px;
  will-change: left, top, width, height;
  transition: all 0.32s cubic-bezier(.4,0,.2,1);
  background: var(--window-bg-25) !important;
  color: inherit;
  font: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  user-select: none;
  backdrop-filter: var(--blur-filter-lo) !important;
  -webkit-backdrop-filter: var(--blur-filter-lo) !important;
}
.cc-animating-tile .cc-seg {
  background: none !important;
  box-shadow: none !important;
}
.cc-animating-tile .cc-seg-button {
  background: #ffffff40;
  color: inherit;
}
.cc-animating-tile .material-symbols-rounded {
  font-size: 16px;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20;
  font-family: 'Material Symbols Rounded', 'Material Icons', sans-serif;
}

.cc-display-slider-row, .cc-sound-slider-row {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  width: 100%;
  border: none;
}
.cc-display-modes-row {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: flex-end;
  margin-bottom: 12px;
}
.cc-display-mode-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-width: 76px;
}
.cc-display-mode-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: none;
  box-shadow: none;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s, color 0.18s;
  font-size: 15px;
  color: #fff;
  position: relative;
  margin-bottom: 4px;
  padding: 0;
}
.cc-display-mode-btn .material-symbols-rounded {
  font-size: 24px;
  color: var(--text-color);
  opacity: 0.75;
  transition: color 0.18s;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}
.cc-display-mode-btn.active {
  background: var(--accent-color);
}
.cc-display-mode-btn.active .material-symbols-rounded, .cc-display-mode-btn.cc-nightshift-btn.active .material-symbols-rounded {
  color: #fff;
  opacity: 1;
}
.cc-mode-label {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 0;
  color: #fff;
  text-align: center;
  margin-top: 2px;
}
.cc-mode-status {
  font-size: 10px;
  color: #ccc;
  font-weight: bold;
  text-align: center;
  margin-top: 0;
}
.cc-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  margin: 4px 8px;
}

.cc-menu-item {
  width: 100%;
  padding: 4px 12px;
  border-radius: 4px;
  height: 24px;
  color: var(--text-color);
  font-size: 12px;
  /* font-weight: 500; */
  cursor: pointer;
  background: none;
  text-align: left;
  /* transition: background 0.15s, color 0.15s; */
  /* margin-bottom: 0px; */
  /* margin-top: 6px; */
  user-select: none;
  outline: none;
  border: none;
  display: flex;
  align-items: center;
}
.cc-menu-item:hover, .cc-menu-item:focus {
  background: #ffffff40;
  text-decoration: none;
}

.cc-focus-duration {
  gap: 6px;
  margin-left: 8px;
  margin-right: 8px;
  padding: 4px 4px;
  width: auto;
}
.cc-focus-duration>span.material-symbols-rounded {
  font-size: 16px;
  margin: 0 2px;
}

/* Output section label */
.cc-output-section-label {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.5;
  letter-spacing: 0.5px;
  padding: 4px 8px;
}

/* Output list */
.cc-output-list {
  display: flex;
  flex-direction: column;
}

/* Output item (radio menu item) */
.cc-output-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 8px;
  height: unset;
}

/* Output button (circular radio) */
.cc-output-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff40;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  font-size: 20px;
  color: #ffffff80;
  flex-shrink: 0;
}

.cc-output-btn.active {
  background: var(--accent-color);
  color: #fff;
}

.cc-output-btn>.material-symbols-rounded {
  font-size: 16px;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}

.cc-output-label {
  font-weight: 500;
  letter-spacing: 0.2px;
  flex: 1;
  user-select: none;
}

.cc-slider .quickplay-toggle {
  border: none;
  background: #ffffff40;
  box-shadow: none;
  padding: 6px;
  border-radius: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.cc-slider .quickplay-toggle[style*='var(--accent-color)'] {
  /* When active, match accent color */
  color: white;
}

/* Header Toggle Switch for Control Center Subpanels */
.cc-header-toggle {
  display: flex;
  align-items: center;
  margin-left: auto;
}
.toggle-switch.cc-header-toggle {
  position: relative;
  display: inline-block;
  margin: -4px 0;
}
.toggle-switch.cc-header-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-switch.cc-header-toggle .toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #8884;
  border-radius: 22px;
  transition: background 0.2s;
}
.toggle-switch.cc-header-toggle input:checked + .toggle-slider {
  background: var(--accent-color, #a259ff);
}
.toggle-switch.cc-header-toggle .toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px #0002;
}
.toggle-switch.cc-header-toggle input:checked + .toggle-slider:before {
  transform: translateX(16px);
}

/* Hide chevrons by default in main panel segments/tiles */
.cc-tile .material-symbols-rounded.chevron-right {
  opacity: 0;
  margin-right: -6px;
}
/* Show chevron on .cc-seg hover for Wi-Fi, Bluetooth, QuickDrop */
.cc-tile.cc-wireless .cc-seg:hover .material-symbols-rounded.chevron-right {
  opacity: 0.5;
}
/* Show chevron on .cc-tile hover for Focus, Display, Sound */
.cc-tile.cc-focus:hover .material-symbols-rounded.chevron-right,
.cc-tile.cc-display:hover .material-symbols-rounded.chevron-right,
.cc-tile.cc-sound:hover .material-symbols-rounded.chevron-right {
  opacity: 0.5;
}
