/* ============================================
   Prep Console Panel (空间整备控制面板)
   ============================================ */

/* --- Prep Console Panel --- */
.prep-panel-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, var(--alpha-overlay));
  z-index: var(--z-sticky);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-slow), visibility var(--duration-slow);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.prep-panel-overlay.active {
  opacity: 1;
  visibility: visible;
}
.prep-panel-container {
  background-color: var(--color-bg-surface);
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  height: 70%;
  width: 100%;
  transform: translateY(100%);
  transition: transform var(--duration-slow) var(--ease-out-quint);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.prep-panel-overlay.active .prep-panel-container {
  transform: translateY(0);
}
.prep-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4);
  border-bottom: 0.5px solid var(--color-border-light);
  background-color: var(--color-bg-surface);
  flex-shrink: 0;
}
.prep-panel-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--color-text-primary);
}
.prep-panel-back {
  font-size: var(--text-md);
  color: var(--color-primary);
  cursor: pointer;
  font-weight: var(--font-medium);
}
.prep-panel-close {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  cursor: pointer;
}
.prep-panel-body {
  flex-grow: 1;
  overflow-y: auto;
  padding: 0 var(--space-4);
}
.prep-panel-body.prep-mode-detail {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--space-4) var(--space-8);
}

/* --- Sticky Footer --- */
.prep-panel-footer {
  flex-shrink: 0;
  border-top: 0.5px solid var(--color-border-light);
  background-color: var(--color-bg-surface);
}

/* --- List Style --- */
.prep-list-header {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  padding: var(--space-4) 0 var(--space-2);
  letter-spacing: 0.5px;
}
.prep-refresh-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  transition: background-color var(--duration-fast);
}
.prep-refresh-bar:active {
  background-color: var(--color-bg-muted);
}
.prep-refresh-icon {
  font-size: var(--text-sm);
}
.prep-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3_5) 0;
  border-bottom: 0.5px solid var(--color-bg-muted);
  min-height: 48px;
}
.prep-row:last-child {
  border-bottom: none;
}
.prep-row-clickable {
  cursor: pointer;
}
.prep-row-clickable:active {
  background-color: var(--color-bg-muted);
  margin: 0 calc(-1 * var(--space-4));
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}
.prep-row-name {
  font-size: var(--text-base);
  color: var(--color-text-primary);
  font-weight: var(--font-medium);
}
.prep-row-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.prep-row-val {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
}
.prep-row-arrow {
  color: var(--slate-400);
  font-size: var(--text-lg);
}

/* --- Switch Style --- */
.prep-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.p-switch-input {
  opacity: 0;
  width: 0;
  height: 0;
}
.p-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--color-border-light);
  border-radius: var(--radius-2xl);
  transition: var(--duration-fast) var(--ease-out);
}
.p-switch-slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background-color: var(--color-text-inverse);
  border-radius: var(--radius-full);
  transition: var(--duration-fast) var(--ease-out);
  box-shadow: var(--shadow-xs);
}
.p-switch-input:checked + .p-switch-slider {
  background-color: var(--color-primary);
}
.p-switch-input:checked + .p-switch-slider::before {
  transform: translateX(20px);
}

/* --- Detail Number --- */
.prep-detail-content {
  text-align: center;
  padding: var(--space-5) 0;
}
.prep-detail-title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}
.prep-detail-subtitle {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-8);
}
.prep-slider-container {
  padding: 0 var(--space-2);
  margin-bottom: var(--space-3);
}
.prep-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: var(--radius-xs);
  background: var(--color-border-light);
  outline: none;
}
.prep-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--color-text-inverse);
  border: 2px solid var(--color-primary);
  cursor: pointer;
  box-shadow: var(--shadow-xs);
}
.prep-slider-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  padding: 0 var(--space-2);
}
.prep-slider-val {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--color-primary);
}

/* --- Detail Enum --- */
.prep-enum-list {
  margin-top: var(--space-6);
}
.prep-enum-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border-bottom: 0.5px solid var(--color-bg-muted);
  cursor: pointer;
  font-size: var(--text-md);
  color: var(--color-text-primary);
  min-height: var(--touch-target);
}
.prep-enum-item:active {
  background-color: var(--color-bg-muted);
}
.prep-enum-item.active {
  color: var(--color-primary);
  font-weight: var(--font-semibold);
}
.prep-enum-circle {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  border: 2px solid var(--slate-400);
  display: inline-block;
  flex-shrink: 0;
  transition: var(--duration-fast) var(--ease-out);
}
.prep-enum-circle.active {
  border-color: var(--color-primary);
  background-color: var(--color-primary);
  box-shadow: inset 0 0 0 4px var(--color-text-inverse);
}

/* --- Save Button --- */
.prep-save-btn {
  display: block;
  width: 100%;
  padding: var(--space-3_5);
  margin-top: var(--space-6);
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--text-md);
  font-weight: var(--font-semibold);
  cursor: pointer;
  min-height: var(--touch-target);
  flex-shrink: 0;
  transition: all var(--duration-fast) var(--ease-out);
}
.prep-save-btn:active {
  background-color: var(--color-primary-hover);
}
