/* Alert Settings Panel — scoped under .alert-settings-panel */

/* Overlay */
.alert-settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
  z-index: 10000;
  display: none;
  justify-content: flex-end;
  align-items: stretch;
}
.alert-settings-overlay.open { display: flex; }

/* Slide-out panel */
.alert-settings-panel {
  width: 420px;
  max-width: 100vw;
  height: 100%;
  background: #fafaf8;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 40px rgba(0,0,0,0.15);
  animation: slideInRight 0.22s ease-out;
  overflow: hidden;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);   opacity: 1; }
}

/* Header */
.alert-settings-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid #e0e0dc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: #fff;
}
.alert-settings-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #0a0a0a;
  letter-spacing: -0.3px;
}
.alert-settings-close {
  width: 32px;
  height: 32px;
  border: none;
  background: #f0f0ec;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: #6b6b6b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.alert-settings-close:hover { background: #e0e0dc; color: #0a0a0a; }

/* Scrollable body */
.alert-settings-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px;
}

/* Section */
.as-section {
  margin-bottom: 28px;
}
.as-section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #9e9e9e;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* Row */
.as-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}
.as-row:last-child { margin-bottom: 0; }
.as-label {
  font-size: 14px;
  font-weight: 500;
  color: #0a0a0a;
  line-height: 1.4;
}
.as-sublabel {
  font-size: 12px;
  color: #6b6b6b;
  margin-top: 2px;
}

/* Toggle switch */
.as-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.as-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.as-toggle-track {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}
.as-toggle input:checked + .as-toggle-track { background: #1a5c2a; }
.as-toggle-track::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.as-toggle input:checked + .as-toggle-track::after { transform: translateX(20px); }

/* Slider */
.as-slider-wrap {
  width: 100%;
}
.as-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: #e0e0dc;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  margin-top: 8px;
}
.as-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1a5c2a;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.as-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1a5c2a;
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.as-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #9e9e9e;
  margin-top: 4px;
}
.as-slider-value {
  font-size: 14px;
  font-weight: 700;
  color: #1a5c2a;
  min-width: 32px;
  text-align: right;
}

/* Select */
.as-select {
  border: 1px solid #e0e0dc;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  color: #0a0a0a;
  background: #fff;
  cursor: pointer;
  outline: none;
  min-width: 120px;
}
.as-select:focus { border-color: #1a5c2a; box-shadow: 0 0 0 2px rgba(26,92,42,0.15); }

/* Divider */
.as-divider {
  height: 1px;
  background: #e0e0dc;
  margin: 20px 0;
}

/* Footer */
.alert-settings-footer {
  padding: 16px 28px 20px;
  border-top: 1px solid #e0e0dc;
  background: #fff;
  flex-shrink: 0;
  display: flex;
  gap: 10px;
}
.as-btn-preview {
  flex: 1;
  padding: 10px 16px;
  border: 1.5px solid #1a5c2a;
  background: transparent;
  color: #1a5c2a;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'DM Sans', sans-serif;
}
.as-btn-preview:hover { background: #e8f5e9; }
.as-btn-preview:disabled { opacity: 0.5; cursor: not-allowed; }
.as-btn-test {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: #1a5c2a;
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'DM Sans', sans-serif;
}
.as-btn-test:hover { background: #13471f; }
.as-btn-test:disabled { opacity: 0.5; cursor: not-allowed; }

/* Save status toast */
.as-toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: #0a0a0a;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 8px;
  z-index: 20000;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.as-toast.show { opacity: 1; transform: translateY(0); }

/* Mobile */
@media (max-width: 480px) {
  .alert-settings-panel {
    width: 100vw;
  }
}
