/* ============================================
   Sirr - Settings Styles
   Dark Theme | RTL | Mobile-First
   ============================================ */

/* ------------------------------------------
   Settings Hero
   ------------------------------------------ */
.settings-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #1a1a1a;
  border-bottom: 1px solid #1e1e1e;
}

.settings-avatar {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: #252525;
}

.settings-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.settings-hero-name {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 2px;
}

.settings-hero-user {
  font-size: 13px;
  color: #777;
  line-height: 1.3;
}

/* ------------------------------------------
   Settings Section
   ------------------------------------------ */
.settings-section {
  padding: 10px 0 4px;
}

.settings-section-title {
  font-size: 12px;
  font-weight: 700;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 0 16px;
  margin-bottom: 4px;
}

/* ------------------------------------------
   Settings Item
   ------------------------------------------ */
.settings-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.settings-item:hover {
  background: #1a1a1a;
}

.settings-item:active {
  background: #1e1e1e;
}

.settings-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* Icon color variants */
.settings-icon.blue {
  background: rgba(94, 175, 246, 0.15);
  color: #5eaff6;
}

.settings-icon.green {
  background: rgba(46, 213, 115, 0.15);
  color: #2ed573;
}

.settings-icon.purple {
  background: rgba(108, 92, 231, 0.15);
  color: #6c5ce7;
}

.settings-icon.orange {
  background: rgba(253, 150, 68, 0.15);
  color: #fd9644;
}

.settings-icon.red {
  background: rgba(231, 76, 94, 0.15);
  color: #e74c5e;
}

.settings-icon.gray {
  background: rgba(170, 170, 170, 0.12);
  color: #aaa;
}

.settings-label {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  min-width: 0;
}

.settings-value {
  font-size: 13px;
  color: #777;
  white-space: nowrap;
}

/* RTL arrow (points left) */
.settings-arrow {
  font-size: 16px;
  color: #777;
}

.settings-arrow::after {
  content: '\2190';
}

/* Divider */
.settings-divider {
  height: 1px;
  background: #1e1e1e;
  margin: 0 16px;
}

/* ------------------------------------------
   Settings Sub-Page (Full Overlay)
   ------------------------------------------ */
#settings-sub {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 300;
  background: #111;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.sub-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #1e1e1e;
  background: #111;
  position: sticky;
  top: 0;
  z-index: 10;
}

.sub-header-title {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.sub-back-btn {
  font-size: 20px;
  color: #fff;
  cursor: pointer;
  border: none;
  background: none;
  padding: 4px;
}

/* Sub-page Content */
.sub-content {
  padding: 30px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sub-icon {
  font-size: 60px;
  margin-bottom: 16px;
}

.sub-msg {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
  text-align: center;
}

.sub-desc {
  font-size: 14px;
  color: #777;
  text-align: center;
  line-height: 1.6;
  max-width: 300px;
  margin-bottom: 24px;
}

/* ------------------------------------------
   Edit Profile Form
   ------------------------------------------ */
.edit-profile-form {
  width: 100%;
  padding: 16px;
}

.edit-profile-avatar-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
  position: relative;
}

.edit-profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.edit-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.edit-profile-avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 22px;
  color: #fff;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #777;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-input:focus {
  border-color: #5eaff6;
}

.form-input::placeholder {
  color: #555;
}

textarea.form-input {
  min-height: 90px;
  resize: vertical;
  line-height: 1.5;
}

.form-hint {
  font-size: 12px;
  color: #555;
  margin-top: 4px;
}

/* Save Button */
.form-save-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 13px 20px;
  border: none;
  border-radius: 12px;
  background: #5eaff6;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s ease;
  margin-top: 8px;
}

.form-save-btn:hover {
  opacity: 0.9;
}

.form-save-btn:active {
  opacity: 0.8;
}

.form-save-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ------------------------------------------
   Group Item (like channel-card, rounded avatar)
   ------------------------------------------ */
.group-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #1e1e1e;
  cursor: pointer;
  transition: background 0.15s ease;
}

.group-item:hover {
  background: #1a1a1a;
}

.group-item:active {
  background: #222;
}

.group-avatar {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 16px;
  background: #1e1e1e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  overflow: hidden;
}

.group-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.group-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.group-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.group-sub {
  font-size: 12px;
  color: #777;
  line-height: 1.3;
}

.group-last {
  font-size: 12px;
  color: #aaa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.group-time {
  font-size: 11px;
  color: #777;
  white-space: nowrap;
  align-self: flex-start;
  margin-top: 2px;
}

/* ------------------------------------------
   Settings Toggle Switch
   ------------------------------------------ */
.settings-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  background: #333;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.settings-toggle.active {
  background: #5eaff6;
}

.settings-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.settings-toggle.active::after {
  transform: translateX(-20px);
}

/* ------------------------------------------
   Danger Zone
   ------------------------------------------ */
.settings-item.danger .settings-label {
  color: #e74c5e;
}

.settings-item.danger .settings-icon {
  background: rgba(231, 76, 94, 0.15);
  color: #e74c5e;
}
