/* =============================================
   LAMIM — PROFILE PREMIUM OVERRIDES
   ============================================= */

/* Keyframes */
@keyframes aura-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}


/* ---- Profile Hero ---- */
.profile-hero {
  position: relative;
  text-align: center;
  padding: var(--space-8) var(--space-6) var(--space-6);
  background: rgba(6, 11, 19, 0.6);
  border-radius: var(--card-radius);
  margin-bottom: var(--space-5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  overflow: hidden;
  z-index: 1;
}

[data-theme="light"] .profile-hero {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.08);
}

/* Remove all old lighting overlays completely */
.profile-hero::before,
.profile-hero::after {
  display: none !important;
}

[data-theme="light"] .profile-name {
  color: #0F172A !important;
  font-weight: 850;
}

[data-theme="light"] .profile-bio {
  color: #334155 !important;
  font-weight: 600;
}

[data-theme="light"] .profile-email {
  color: #64748B !important;
  opacity: 1;
}

[data-theme="light"] .profile-joined {
  color: #4F46E5 !important;
  opacity: 1;
  font-weight: 800;
}



/* ---- Avatar ---- */
.profile-avatar-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 110px;
  height: 110px;
  margin-bottom: var(--space-4);
  z-index: 2;
  border-radius: 50%;
}

.profile-avatar-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, 
    #ff007f, 
    #7928ca, 
    #00d4ff, 
    #ff007f
  );
  animation: aura-spin-once 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  z-index: -2;
  box-shadow: 0 0 25px rgba(255, 0, 127, 0.5), 0 0 45px rgba(0, 212, 255, 0.3);
}

/* Inner cut-out to create the gap */
.profile-avatar-wrap::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--color-bg-secondary);
  z-index: -1;
}

[data-theme="light"] .profile-avatar-wrap::after {
  background: #ffffff;
}

.profile-avatar {
  width: 94px;
  height: 94px;
  border-radius: 50%;
  border: none;
  object-fit: cover;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: var(--color-text-primary);
  font-weight: var(--fw-bold);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  z-index: 2;
  animation: avatar-spin-in 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.profile-avatar:hover { transform: scale(1.08); }

[data-theme="light"] .profile-avatar {
  border: none;
  box-shadow: none;
}

@keyframes avatar-spin-in {
  0% { transform: rotate(-360deg) scale(0.5); opacity: 0; }
  100% { transform: rotate(0deg) scale(1); opacity: 1; }
}

.avatar-edit-btn {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-accent-primary);
  color: #fff;
  border: 2.5px solid var(--color-surface-card);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: transform 0.2s ease, background 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  z-index: 10;
}
.avatar-remove-btn {
  position: absolute;
  bottom: 2px;
  left: 2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  border: 2.5px solid var(--color-surface-card);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  transition: transform 0.2s ease, background 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  z-index: 10;
  padding: 0;
}
.avatar-remove-btn:hover {
  transform: scale(1.15);
  background: #ef4444;
}

[data-theme="light"] .avatar-edit-btn {
  color: var(--color-bg-primary);
}
.avatar-edit-btn:hover {
  transform: scale(1.15);
  background: var(--color-accent-gold);
}

/* ---- Profile Text ---- */
.profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  position: relative;
  color: var(--color-text-primary);
}
.profile-bio {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin: 6px auto 4px auto;
  max-width: 280px;
  line-height: 1.5;
  font-style: italic;
}
.profile-email {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 2px;
  font-weight: 500;
  opacity: 0.7;
}
.profile-joined {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent-primary);
  margin-top: 8px;
  font-weight: 700;
  opacity: 0.8;
}

/* Profile meta chips (gender + joined) */
.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin: 2px auto 0;
}
.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--color-surface-raised, rgba(148, 163, 184, 0.12));
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
}
.profile-chip svg { flex: none; }
.profile-chip.gender-male {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.3);
  color: #3b82f6;
}
.profile-chip.gender-female {
  background: rgba(236, 72, 153, 0.14);
  border-color: rgba(236, 72, 153, 0.3);
  color: #ec4899;
}
[data-theme="light"] .profile-chip {
  background: #f1f5f9;
}

/* ---- Settings Groups ---- */
.settings-group {
  background: var(--color-surface-card);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: var(--space-4);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: box-shadow 0.3s ease;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.settings-group:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

[data-theme="light"] .settings-group {
  background: #FFFFFF !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .settings-group-title {
  color: #64748B !important;
  font-weight: 800;
}
.settings-group-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  padding: 14px 20px 6px;
  font-weight: 600;
}

/* ---- Settings Items ---- */
.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--color-border-muted);
  cursor: pointer;
  transition: background 0.15s ease;
  min-height: 52px;
}
.settings-item:first-of-type {
  border-top: none;
}
.settings-item:hover {
  background: var(--color-glass-hover);
}
.settings-item:active {
  background: var(--color-border-muted);
  transition: background 0.05s ease;
}
.settings-item:focus-visible {
  outline: 2px solid var(--color-accent-primary);
  outline-offset: -2px;
}
.settings-item-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

/* ---- Icon Pill ---- */
.settings-item-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  color: #fff;
  flex-shrink: 0;
  background: var(--color-bg-tertiary);
}

[data-theme="light"] .settings-item-icon {
  color: var(--color-bg-primary);
}
/* Colored icon backgrounds — each gets a unique vivid gradient */
.settings-item-icon.ic-blue    { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.settings-item-icon.ic-indigo  { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.settings-item-icon.ic-violet  { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.settings-item-icon.ic-teal    { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.settings-item-icon.ic-emerald { background: linear-gradient(135deg, #10b981, #059669); }
.settings-item-icon.ic-amber   { background: linear-gradient(135deg, #f59e0b, #d97706); }
.settings-item-icon.ic-orange  { background: linear-gradient(135deg, #f97316, #ea580c); }
.settings-item-icon.ic-rose    { background: linear-gradient(135deg, #f43f5e, #e11d48); }
.settings-item-icon.ic-pink    { background: linear-gradient(135deg, #ec4899, #db2777); }
.settings-item-icon.ic-sky     { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.settings-item-icon.ic-slate   { background: linear-gradient(135deg, #64748b, #475569); }
.settings-item-icon.ic-cyan    { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.settings-item-icon.ic-lime    { background: linear-gradient(135deg, #84cc16, #65a30d); }
.settings-item-icon.ic-red     { background: linear-gradient(135deg, #ef4444, #dc2626); }

/* ---- Text ---- */
.settings-item-label {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--color-text-primary);
}
.settings-item-value {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.3;
  margin-top: 2px;
}

[data-theme="light"] .settings-item-label {
  color: #0F172A !important;
  font-weight: 750;
}

[data-theme="light"] .settings-item-value {
  color: #475569 !important;
  font-weight: 600;
}

[data-theme="light"] .settings-item-right {
  color: #64748B !important;
  font-weight: 700;
}
.settings-item-right {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text-secondary);
  font-size: 14px;
  flex-shrink: 0;
  font-weight: 500;
}
.settings-item-right > span:last-child {
  font-size: 18px;
  font-weight: 400;
  color: var(--color-text-muted);
}

/* ---- Language Toggle ---- */
.lang-toggle-pill {
  display: flex;
  background: var(--color-surface-nested);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 2px;
  gap: 2px;
}
.lang-toggle-pill button {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.lang-toggle-pill button.active {
  background: var(--color-accent-primary);
  color: #fff;
  box-shadow: 0 2px 10px rgba(139, 92, 246, 0.35);
}

[data-theme="light"] .lang-toggle-pill button.active {
  color: #FFFFFF !important;
  background: #0F172A !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* ---- Profile Select/Input Overrides ---- */
#section-profile select.input,
#section-profile input[type="date"].input {
  background: var(--color-surface-nested);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text-primary);
  font-size: 13px;
  padding: 5px 10px;
  transition: border-color 0.2s ease;
  cursor: pointer;
}
#section-profile select.input:focus,
#section-profile input[type="date"].input:focus {
  border-color: var(--color-accent-primary);
  outline: none;
}

/* ---- Streak Badges ---- */
.profile-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: var(--space-4);
  margin-bottom: var(--space-4);
}

.streak-badge {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 17px;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
  background: var(--color-surface-nested);
  border: 1px solid var(--color-border);
  white-space: nowrap;
  transition: all 0.3s ease;
  color: var(--color-text-secondary);
}

.streak-badge .badge-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
}

.streak-badge.active.streak-consistency {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
  animation: badge-pulse-green 2s ease-in-out infinite alternate;
}

.streak-badge.active.streak-perfect {
  background: rgba(251, 146, 60, 0.12);
  border-color: rgba(251, 146, 60, 0.4);
  color: #fbbf24;
  box-shadow: 0 0 15px rgba(251, 146, 60, 0.15);
  animation: badge-pulse-gold 2s ease-in-out infinite alternate;
}

.streak-badge.active.streak-hijri {
  background: rgba(129, 140, 248, 0.12);
  border-color: rgba(129, 140, 248, 0.4);
  color: #a5b4fc;
  box-shadow: 0 0 15px rgba(129, 140, 248, 0.15);
  animation: badge-pulse-blue 2s ease-in-out infinite alternate;
}

@keyframes badge-pulse-green {
  from { box-shadow: 0 0 8px rgba(16, 185, 129, 0.1); transform: scale(1); }
  to { box-shadow: 0 0 16px rgba(16, 185, 129, 0.3); transform: scale(1.02); }
}

@keyframes badge-pulse-gold {
  from { box-shadow: 0 0 8px rgba(251, 146, 60, 0.1); transform: scale(1); }
  to { box-shadow: 0 0 16px rgba(251, 146, 60, 0.3); transform: scale(1.02); }
}

@keyframes badge-pulse-blue {
  from { box-shadow: 0 0 8px rgba(129, 140, 248, 0.1); transform: scale(1); }
  to { box-shadow: 0 0 16px rgba(129, 140, 248, 0.3); transform: scale(1.02); }
}

/* ---- Streak Badges — Light Mode Contrast Fix ---- */
[data-theme="light"] .streak-badge {
  background: #E2E8F0;
  border-color: rgba(0, 0, 0, 0.08);
  color: #475569;
}
[data-theme="light"] .streak-badge.active.streak-consistency {
  background: rgba(5, 150, 105, 0.1);
  border-color: rgba(5, 150, 105, 0.35);
  color: #047857;
  box-shadow: 0 0 12px rgba(5, 150, 105, 0.12);
}
[data-theme="light"] .streak-badge.active.streak-perfect {
  background: rgba(217, 119, 6, 0.1);
  border-color: rgba(217, 119, 6, 0.35);
  color: #B45309;
  box-shadow: 0 0 12px rgba(217, 119, 6, 0.12);
}
[data-theme="light"] .streak-badge.active.streak-hijri {
  background: rgba(79, 70, 229, 0.1);
  border-color: rgba(79, 70, 229, 0.35);
  color: #4338CA;
  box-shadow: 0 0 12px rgba(79, 70, 229, 0.12);
}

/* ---- Date of Birth Pill ---- */
.dob-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1.5px solid #f97316;
  border-radius: 20px;
  padding: 5px 14px;
  background: rgba(249, 115, 22, 0.06);
  transition: all 0.25s ease;
  cursor: pointer;
  min-width: 120px;
  justify-content: center;
}
.dob-pill:hover {
  background: rgba(249, 115, 22, 0.12);
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.15);
  transform: scale(1.02);
}
.dob-pill:active {
  transform: scale(0.97);
}
.dob-seg {
  font-size: 13px;
  font-weight: 700;
  color: #f97316;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.dob-seg.dob-placeholder {
  color: rgba(249, 115, 22, 0.4);
  font-weight: 600;
}
.dob-sep {
  font-size: 13px;
  font-weight: 500;
  color: rgba(249, 115, 22, 0.35);
  margin: 0 1px;
}

[data-theme="light"] .dob-pill {
  background: rgba(249, 115, 22, 0.08);
  border-color: #ea580c;
}
[data-theme="light"] .dob-seg {
  color: #ea580c;
}
[data-theme="light"] .dob-seg.dob-placeholder {
  color: rgba(234, 88, 12, 0.4);
}
[data-theme="light"] .dob-sep {
  color: rgba(234, 88, 12, 0.35);
}
