/* Settings Tab Specific */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
}

/* Grammar Fix Checkbox */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  background: #333333;
  border: 1px solid #555555;
}

.checkbox-group label {
  cursor: pointer;
  user-select: none;
  color: #e0e0e0;
  font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  .header {
    text-align: center;
    margin-bottom: 30px;
  }

  .logo {
    max-height: 50px;
    max-width: 280px;
    margin: 0 auto 8px auto;
    display: block;
    transition: all 0.3s ease;
  }

  .header h1 {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 6px;
    line-height: 1.2;
  }

  .header .subtitle {
    color: #aaaaaa;
    font-size: 14px;
    line-height: 1.3;
    padding: 0 10px;
  }

  .main-content {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
  }

  .tab-content {
    padding: 20px 15px;
  }

  .qr-display {
    flex-direction: column;
  }

  .user-info {
    margin-top: 10px;
    padding: 6px 10px;
    font-size: 11px;
  }

  .top-upgrade-btn {
    top: 60px;
    right: 15px;
    padding: 8px 12px;
    font-size: 12px;
  }

  .admin-output-actions {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .admin-output-actions-left,
  .admin-output-actions-right {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .logo {
    max-height: 40px;
    max-width: 240px;
  }

  .header h1 {
    font-size: 20px;
  }

  .header .subtitle {
    font-size: 13px;
  }

  .tab-content {
    padding: 15px 10px;
  }

  .top-upgrade-btn {
    display: none;
  }
}

/* Animations */
.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

.nav-tab svg, .section-header svg, .btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  margin-right: 6px;
  vertical-align: middle;
}

.header h1 svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  margin-right: 8px;
  vertical-align: middle;
}

.hidden {
  display: none !important;
}

/* Summary Detail Slider */
.slider-container {
  margin-top: 10px;
}

.slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #555555;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #4CAF50;
  cursor: pointer;
}

.slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #4CAF50;
  cursor: pointer;
  border: none;
}

.slider-value {
  text-align: center;
  margin-top: 5px;
  font-size: 12px;
  color: #aaaaaa;
}

/* Session info */
.session-info {
  background: #333333;
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 13px;
  color: #b0b0b0;
}

.session-info code {
  background: #444444;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Consolas', monospace;
  color: #e74c3c;
}

/* --- Toggle Switch UI --- */

/* The main container for the toggle and its overlay */
.toggle-switch-container {
    position: relative;
    padding: 10px;
    background-color: rgba(0,0,0,0.1);
    border-radius: 8px;
}

/* The actual group of the switch and its label */
.toggle-switch-group {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: opacity 0.3s ease; /* Smooth fade when disabled */
}

/* The physical switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider part of the toggle */
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #555;
    transition: .4s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #4CAF50;
}

input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* --- The "Locked" State and Overlay --- */

/* This makes the toggle and text grayed out when the 'locked' class is present */
.toggle-switch-container.locked .toggle-switch-group {
    opacity: 0.3;
    pointer-events: none; /* IMPORTANT: Disables clicks on the toggle */
}

/* This is the overlay that appears on top */
.toggle-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    border-radius: 8px;
    z-index: 10;
    opacity: 0; /* Hidden by default */
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* The text pill inside the overlay */
.overlay-text {
    background-color: #4CAF50;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
}

/* This makes the overlay visible when the 'locked' class is present */
.toggle-switch-container.locked .toggle-overlay {
    opacity: 1;
}
