/* =========================================================
   791 Settings & Legal Screen Overlay
   ========================================================= */

.settings-screen-overlay,
.terms-modal-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-bg-app);
  z-index: 360;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  overflow-y: auto;
  box-sizing: border-box;
  border-radius: 0 0 50px 50px;
  
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.terms-modal-overlay {
  z-index: 380;
}

.settings-screen-overlay::-webkit-scrollbar,
.terms-modal-overlay::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.settings-screen-overlay.active,
.terms-modal-overlay.active {
  transform: translateX(0);
  pointer-events: auto;
}

/* Header */
.settings-header {
  width: 100%;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  background-color: #FFFFFF;
  border-bottom: 1px solid #E5E7EB;
  position: sticky;
  top: 0;
  z-index: 10;
}

.settings-back-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #F3F4F6;
  border: none;
  color: var(--color-primary-teal);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  outline: none;
  transition: background-color 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.settings-back-btn:active {
  transform: scale(0.94);
  background: #E5E7EB;
}

.settings-back-btn svg {
  width: 22px;
  height: 22px;
}

.settings-header-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-dark);
  margin: 0;
}

/* Settings Body */
.settings-body {
  padding: 20px 20px 36px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
}

.settings-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 8px 0;
}

.settings-group-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Base Item Row */
.settings-item-row {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #F1F5F9;
  box-sizing: border-box;
}

.settings-item-row:last-child {
  border-bottom: none;
}

/* Clickable Item Row (Only for actual buttons / links like Terms) */
.settings-item-row.clickable {
  cursor: pointer;
  transition: background-color 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.settings-item-row.clickable:hover {
  background-color: #F8FAFC;
}

.settings-item-row.clickable:active {
  background-color: #F1F5F9;
}

/* Static Informational Row (No pointer, no hover, read-only) */
.settings-item-row.static {
  cursor: default;
  background-color: #FFFFFF;
  user-select: text;
}

.settings-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-item-label {
  font-size: 15px;
  font-weight: 600;
  color: #1E293B;
}

.settings-item-sub {
  font-size: 12px;
  font-weight: 500;
  color: #64748B;
}

.settings-item-value {
  font-size: 14px;
  font-weight: 600;
  color: #475569;
}

.settings-chevron {
  width: 18px;
  height: 18px;
  color: #94A3B8;
  flex-shrink: 0;
}

/* Delete Account Danger Zone */
.danger-zone-card {
  border: 1.5px solid #FCA5A5;
  background: #FEF2F2;
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.danger-zone-title {
  font-size: 15px;
  font-weight: 700;
  color: #991B1B;
  margin: 0;
}

.danger-zone-desc {
  font-size: 13px;
  color: #B91C1C;
  line-height: 1.4;
  margin: 0;
}

.delete-account-btn {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  background-color: var(--color-sos-red);
  color: #FFFFFF;
  border: none;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(229, 46, 46, 0.3);
  transition: background-color 0.15s ease, transform 0.1s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.delete-account-btn:hover {
  background-color: #DC2626;
}

.delete-account-btn:active {
  transform: scale(0.98);
}

/* Delete Confirmation Modal */
.delete-confirm-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 24px;
  border-radius: 0 0 50px 50px;
}

.delete-confirm-overlay.active {
  display: flex;
}

.delete-confirm-modal {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 24px 20px;
  width: 100%;
  max-width: 320px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.delete-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #1E293B;
  margin: 0;
}

.delete-modal-text {
  font-size: 13px;
  color: #64748B;
  line-height: 1.4;
  margin: 0;
}

.delete-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.modal-cancel-btn {
  flex: 1;
  height: 44px;
  border-radius: 10px;
  background: #F1F5F9;
  border: none;
  color: #475569;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.modal-confirm-delete-btn {
  flex: 1;
  height: 44px;
  border-radius: 10px;
  background: var(--color-sos-red);
  border: none;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* Terms and Conditions Document */
.terms-document-content {
  padding: 20px;
  background: #FFFFFF;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 14px;
  line-height: 1.55;
  color: #334155;
}

.terms-document-content h3 {
  font-size: 16px;
  font-weight: 700;
  color: #0F172A;
  margin: 10px 0 2px 0;
}
