/* =============================================
   DOORSIGN – PROJECT THEME
   ============================================= */

@import '/shared/base.css';

:root {
  /* Doorsign brand colors */
  --accent:       #FFED00;
  --accent-hover: #e6d500;
  --accent-dim:   rgba(255,237,0,0.15);
  --accent-glow:  rgba(255,237,0,0.25);
}

/* Override button text color for yellow accent */
.btn-primary {
  color: #0d0f12; /* Dark text on yellow background */
  font-weight: 800;
}

/* =============================================
   STATUS HERO CARD
   ============================================= */

.status-hero {
  background: linear-gradient(135deg, var(--bg-2) 0%, var(--bg-3) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.status-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.status-main {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.status-sub {
  font-size: 1.1rem;
  color: var(--text-2);
  font-weight: 500;
}

.status-updated {
  font-size: 0.75rem;
  color: var(--text-3);
  margin-top: 1rem;
  font-family: var(--font-mono);
}

/* =============================================
   SETTING CARDS
   ============================================= */

.setting-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.setting-header {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-2);
  text-transform: uppercase;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.setting-header.collapsible {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  user-select: none;
  margin-bottom: 0;
}

.setting-header.collapsible:hover {
  color: var(--text-1);
}

.setting-chevron {
  color: var(--text-3);
  font-size: 0.75rem;
  transition: transform 0.2s;
}

.setting-chevron.open {
  transform: rotate(90deg);
}

.setting-body {
  display: none;
  margin-top: 1.25rem;
}

.setting-body.open {
  display: block;
}

.setting-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.setting-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* =============================================
   TOGGLE SWITCH
   ============================================= */

.toggle-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}

.toggle-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  background: var(--bg-4);
  border: 1px solid var(--border);
  border-radius: 13px;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-switch input {
  display: none;
}

.toggle-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: var(--text-3);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
  transform: translateX(22px);
  background: var(--accent);
}

.toggle-switch:has(input:checked) {
  background: var(--accent-dim);
  border-color: var(--accent);
}

/* =============================================
   RANGE SLIDER
   ============================================= */

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slider-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.slider-value {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 700;
}

.slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: var(--bg-4);
  border-radius: 3px;
  outline: none;
  border: 1px solid var(--border);
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 8px var(--accent-glow);
  transition: transform 0.1s;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 8px var(--accent-glow);
}

/* =============================================
   TIME INPUT
   ============================================= */

.time-range-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.time-input {
  flex: 1;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.15s;
}

.time-input:focus {
  border-color: var(--accent);
}

.time-separator {
  color: var(--text-3);
  font-weight: 700;
}

/* =============================================
   CUSTOM STATUS INPUT
   ============================================= */

.custom-status-inputs {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  animation: fadeUp 0.3s ease;
}

.custom-status-inputs.visible {
  display: flex;
}

/* =============================================
   DEVICE ITEMS
   ============================================= */

.device-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  transition: border-color 0.15s;
}

.device-item:hover {
  border-color: var(--border-light);
}

.device-item:last-child {
  margin-bottom: 0;
}

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

.device-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.device-name {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}

.device-meta {
  font-size: 0.75rem;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.device-ip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-3);
  margin-top: 0.25rem;
}

.device-actions {
  display: flex;
  gap: 0.5rem;
}

/* =============================================
   MODAL OVERLAY
   ============================================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  animation: fadeUp 0.2s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.15s;
}

.modal-close:hover {
  color: var(--text);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* =============================================
   MOBILE RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
  .status-main {
    font-size: 1.5rem;
  }
  
  .status-sub {
    font-size: 1rem;
  }
  
  .status-hero {
    padding: 2rem 1.5rem;
  }
  
  .setting-card {
    padding: 1.25rem;
  }
  
  .device-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .device-actions {
    width: 100%;
    justify-content: flex-end;
  }
}