/* ============================================
   SETTINGS TABS
   ============================================ */

.settings-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #EBEBEB;
  margin-bottom: 28px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.settings-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #888;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  border-radius: 4px 4px 0 0;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
  font-family: "Poppins", sans-serif;
  white-space: nowrap;
  flex-shrink: 0;
}

.settings-tab-btn .material-symbols-rounded {
  font-size: 18px;
}

.settings-tab-btn:hover {
  color: #2869D4;
  background: #f0f5ff;
}

.settings-tab-btn.active {
  color: #2869D4;
  border-bottom: 2px solid #2869D4;
  background: none;
}

/* ============================================
   TAB PANEL — fills available space on desktop
   ============================================ */

.settings-tab-panel {
  width: 100%;
}

.settings-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 12px;
}

/* ============================================
   SETTINGS CARD
   ============================================ */

.settings-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  background: #ffffff;
  border: 1px solid #EBEBEB;
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.settings-card:hover {
  box-shadow: 0 4px 18px rgba(40, 105, 212, 0.08);
}

.settings-card-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.settings-card-icon-wrap .material-symbols-rounded {
  font-size: 22px;
}

.settings-icon-blue {
  background: #EBF1FD;
  color: #2869D4;
}

.settings-icon-purple {
  background: #F0EBFD;
  color: #7C3AED;
}

.settings-icon-green {
  background: #E6F9ED;
  color: #0ABF30;
}

/* body is a flex row on desktop, column on mobile */
.settings-card-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

/* redirect card body always stacks vertically */
.settings-card-redirect .settings-card-body {
  flex-direction: column;
  align-items: stretch;
}

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

.settings-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.settings-card-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.settings-card-desc {
  font-size: 13px;
  color: #888;
  line-height: 1.5;
}

.settings-ussd-chip {
  display: inline-block;
  background: #F0EBFD;
  color: #7C3AED;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  font-family: "Courier New", monospace;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.settings-ussd-chip-green {
  background: #E6F9ED;
  color: #0ABF30;
}

/* ============================================
   PAYMENT PROVIDER
   ============================================ */

.settings-provider-active {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  font-size: 12.5px;
  color: #0ABF30;
  font-weight: 500;
}

.settings-provider-active .material-symbols-rounded {
  font-size: 15px;
}

.settings-provider-controls {
  flex-wrap: wrap;
  gap: 10px;
}

.settings-provider-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.settings-provider-select-icon {
  position: absolute;
  left: 10px;
  font-size: 16px;
  color: #888;
  pointer-events: none;
}

.settings-provider-select {
  height: 38px;
  padding: 0 36px 0 32px;
  border: 1.5px solid #E0E0E0;
  border-radius: 8px;
  font-size: 13px;
  font-family: "Poppins", sans-serif;
  color: #1a1a1a;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none;
  outline: none;
  cursor: pointer;
  min-width: 180px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.settings-provider-select:focus {
  border-color: #2869D4;
  box-shadow: 0 0 0 3px rgba(40, 105, 212, 0.1);
}

.settings-provider-select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.settings-action-btn-green {
  background: #0ABF30;
}

.settings-action-btn-green:hover {
  background: #089926;
}

.settings-action-btn-green:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* ============================================
   STATUS PILL
   ============================================ */

.settings-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
  flex-shrink: 0;
}

.pill-on {
  background: rgba(10, 191, 48, 0.12);
  color: #0ABF30;
}

.pill-off {
  background: rgba(200, 200, 200, 0.2);
  color: #999;
}

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

.settings-toggle {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}

.settings-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.settings-toggle-track {
  position: absolute;
  inset: 0;
  background: #D5D5D5;
  border-radius: 26px;
  cursor: pointer;
  transition: background 0.25s;
}

.settings-toggle input:checked ~ .settings-toggle-track {
  background: #2869D4;
}

.settings-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s;
}

.settings-toggle input:checked ~ .settings-toggle-track .settings-toggle-thumb {
  transform: translateX(20px);
}

/* ============================================
   CARD RIGHT (Allow Everyone controls)
   ============================================ */

.settings-card-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* ============================================
   ACTION BUTTON (Allow Everyone)
   ============================================ */

.settings-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  background: #2869D4;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s, transform 0.1s;
  font-family: "Poppins", sans-serif;
  white-space: nowrap;
}

.settings-action-btn .material-symbols-rounded {
  font-size: 17px;
}

.settings-action-btn:hover {
  background: #1e5bb3;
}

.settings-action-btn:active {
  transform: scale(0.97);
}

/* ============================================
   REDIRECT CARD INNER LAYOUT
   ============================================ */

.settings-redirect-body {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.settings-redirect-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #FAFAFA;
  border: 1px solid #EBEBEB;
  border-radius: 10px;
}

.settings-redirect-toggle-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.settings-redirect-toggle-title {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
}

.settings-redirect-toggle-sub {
  font-size: 12px;
  color: #aaa;
}

.settings-redirect-toggle-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.settings-divider {
  height: 1px;
  background: #EBEBEB;
  margin: 18px 0;
}

/* ============================================
   FIELD GROUP
   ============================================ */

.settings-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.settings-field-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: #444;
}

.settings-field-label .material-symbols-rounded {
  font-size: 16px;
  color: #2869D4;
}

/* ============================================
   LABEL DISPLAY + EDIT
   ============================================ */

.settings-label-display {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #F4F7FF;
  border: 1px solid #D6E4FF;
  border-radius: 8px;
}

.settings-label-display-text {
  flex: 1;
  font-size: 13.5px;
  color: #1a1a1a;
  line-height: 1.5;
  word-break: break-word;
}

.settings-label-display-empty {
  color: #ABABAB;
  font-style: italic;
  font-size: 13px;
}

.settings-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  height: 32px;
  padding: 0 12px;
  background: #fff;
  color: #2869D4;
  border: 1.5px solid #2869D4;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: "Poppins", sans-serif;
  transition: background 0.18s, color 0.18s;
}

.settings-edit-btn .material-symbols-rounded {
  font-size: 15px;
}

.settings-edit-btn:hover {
  background: #2869D4;
  color: #fff;
}

.settings-label-edit {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-label-edit .settings-field-input {
  flex: 1;
}

.settings-cancel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 42px;
  background: #F5F5F5;
  color: #888;
  border: 1.5px solid #E0E0E0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}

.settings-cancel-btn .material-symbols-rounded {
  font-size: 18px;
}

.settings-cancel-btn:hover {
  background: #FFE8E8;
  color: #E24D4C;
  border-color: #E24D4C;
}

.settings-field-input {
  width: 100%;
  box-sizing: border-box;
  height: 42px;
  padding: 0 14px;
  border: 1.5px solid #E0E0E0;
  border-radius: 8px;
  font-size: 14px;
  font-family: "Poppins", sans-serif;
  color: #1a1a1a;
  background: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.settings-field-input::placeholder {
  color: #BEBEBE;
}

.settings-field-input:focus {
  border-color: #2869D4;
  box-shadow: 0 0 0 3px rgba(40, 105, 212, 0.1);
}

.settings-field-hint {
  font-size: 12px;
  color: #ABABAB;
  line-height: 1.4;
}

/* ============================================
   SAVE BUTTON
   ============================================ */

.settings-card-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.settings-save-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 20px;
  background: #2869D4;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: "Poppins", sans-serif;
  transition: background 0.18s, transform 0.1s;
}

.settings-save-btn .material-symbols-rounded {
  font-size: 17px;
}

.settings-save-btn:hover {
  background: #1e5bb3;
}

.settings-save-btn:active {
  transform: scale(0.97);
}

/* ============================================
   MOBILE — ≤ 640px
   ============================================ */

@media (max-width: 640px) {

  .settings-tabs {
    margin-bottom: 20px;
  }

  .settings-tab-btn {
    padding: 9px 14px;
    font-size: 13px;
  }

  /* tighter card on mobile */
  .settings-card {
    padding: 16px;
    border-radius: 12px;
    gap: 14px;
  }

  /* smaller icon */
  .settings-card-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .settings-card-icon-wrap .material-symbols-rounded {
    font-size: 19px;
  }

  /* stack info + controls vertically */
  .settings-card-body {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  /* controls row: pill + toggle left, button right */
  .settings-card-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: nowrap;
  }

  /* pill + toggle grouped */
  .settings-card-right .settings-status-pill,
  .settings-card-right .settings-toggle {
    flex-shrink: 0;
  }

  /* action button fills the remaining space */
  .settings-action-btn {
    flex: 1;
    height: 40px;
    font-size: 13px;
  }

  /* payment provider controls stack on mobile */
  .settings-provider-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .settings-provider-select-wrap {
    width: 100%;
  }

  .settings-provider-select {
    width: 100%;
    min-width: 0;
  }

  .settings-action-btn-green {
    width: 100%;
  }

  /* redirect body closer to top */
  .settings-redirect-body {
    margin-top: 14px;
  }

  /* tighter inner toggle row */
  .settings-redirect-toggle-row {
    padding: 12px 14px;
  }

  .settings-redirect-toggle-title {
    font-size: 13px;
  }

  .settings-redirect-toggle-sub {
    font-size: 11px;
  }

  /* save button full width */
  .settings-card-footer {
    margin-top: 16px;
  }

  .settings-save-btn {
    width: 100%;
    height: 44px;
    font-size: 14px;
  }

  .settings-section-label {
    font-size: 10.5px;
  }
}

/* ============================================
   LEGACY OVERRIDES (keep old .tabs working
   if referenced elsewhere)
   ============================================ */

.tab-content {
  margin-top: 0;
  background: none;
  padding: 0;
  border-radius: 0;
}

.switch-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: "Poppins", sans-serif;
  margin-bottom: 20px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0;
  right: 0; bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 24px;
}

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

input:checked + .slider {
  background-color: #2869D4;
}

input:checked + .slider:before {
  transform: translateX(26px);
}
