/* ==========================================================================
   CARFIX — PROFILE MODULE STYLES (profile.css)
   مطابق لـ ProfileScreen.kt
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. MAIN LAYOUT
   -------------------------------------------------------------------------- */
.profile-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

.profile-screen::-webkit-scrollbar { width: 4px; }
.profile-screen::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.10);
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   2. HERO HEADER
   -------------------------------------------------------------------------- */
.profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-8) var(--space-6) var(--space-6);
  position: relative;
  text-align: center;
}

/* Radial glow behind avatar */
.profile-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,107,0,0.14) 0%, transparent 70%);
  pointer-events: none;
}

/* Avatar ring */
.profile-avatar-wrap {
  position: relative;
  width: 114px;
  height: 114px;
  margin-bottom: var(--space-4);
}

.profile-avatar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(#FF6B35, #06B6D4, #8B5CF6, #FF6B35);
  animation: profile-ring-spin 12s linear infinite;
}

@keyframes profile-ring-spin { to { transform: rotate(360deg); } }

.profile-avatar-inner {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: radial-gradient(circle, #1C2535, #0F1624);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.profile-avatar-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-avatar-initial {
  font-size: 42px;
  font-weight: var(--font-bold);
  color: #fff;
  line-height: 1;
}

/* Name / Email */
.profile-name {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.profile-email {
  font-size: var(--text-sm);
  color: rgba(6,182,212,0.85); /* CyanAccent */
  margin-bottom: var(--space-5);
}

/* Stats chips */
.profile-stats-row {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  justify-content: center;
  margin-top: var(--space-1);
}

.profile-stat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-md);
  min-width: 80px;
  cursor: pointer;
  transition: background 0.15s;
}

.profile-stat-chip:hover { background: rgba(255,107,0,0.12); }

.profile-stat-value {
  font-size: 16px;
  font-weight: var(--font-bold);
  color: #fff;
  line-height: 1;
}

.profile-stat-label {
  font-size: 11px;
  color: rgba(255,255,255,0.50);
  margin-top: 3px;
}

/* --------------------------------------------------------------------------
   3. MENU SECTIONS
   -------------------------------------------------------------------------- */
.profile-sections {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: 0 var(--space-5) var(--space-4);
}

.profile-section {
  background: rgba(20,23,26,0.75);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 20px;
  overflow: hidden;
}

.profile-section-title {
  font-size: 11px;
  font-weight: var(--font-bold);
  color: rgba(255,255,255,0.38);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: var(--space-3) var(--space-4) var(--space-2);
}

/* Menu Item */
.profile-menu-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 13px var(--space-4);
  cursor: pointer;
  transition: background 0.15s;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.profile-menu-item:first-of-type { border-top: none; }

.profile-menu-item:hover { background: rgba(255,255,255,0.04); }
.profile-menu-item:active { background: rgba(255,255,255,0.07); }

.profile-menu-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.profile-menu-icon.orange { background: rgba(255,107,0,0.14); }
.profile-menu-icon.cyan   { background: rgba(6,182,212,0.14); }
.profile-menu-icon.green  { background: rgba(16,185,129,0.14); }
.profile-menu-icon.amber  { background: rgba(245,158,11,0.14); }
.profile-menu-icon.olive  { background: rgba(132,204,22,0.14); }

.profile-menu-label {
  flex: 1;
  font-size: 14px;
  font-weight: var(--font-medium);
  color: rgba(255,255,255,0.88);
}

.profile-menu-chevron {
  font-size: 16px;
  color: rgba(255,255,255,0.25);
}

/* --------------------------------------------------------------------------
   4. SIGN OUT BUTTON
   -------------------------------------------------------------------------- */
.profile-signout-btn {
  margin: 0 var(--space-5) var(--space-4);
  padding: 16px;
  background: rgba(239,68,68,0.10);
  border: 1px solid rgba(239,68,68,0.35);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  cursor: pointer;
  font-size: 15px;
  font-weight: var(--font-bold);
  color: #EF4444;
  font-family: inherit;
  transition: background 0.15s;
}

.profile-signout-btn:hover { background: rgba(239,68,68,0.16); }

/* --------------------------------------------------------------------------
   5. VERSION TEXT
   -------------------------------------------------------------------------- */
.profile-version {
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  font-weight: var(--font-semi);
  padding-bottom: var(--space-7);
}

/* --------------------------------------------------------------------------
   6. EDIT PROFILE MODAL
   -------------------------------------------------------------------------- */
.profile-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  animation: fadeIn 0.2s ease;
}

.profile-modal-overlay.is-hidden { display: none; }

.profile-modal {
  width: 100%;
  max-width: 440px;
  background: var(--surface-base);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 24px;
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  animation: slideUp 0.25s cubic-bezier(0.16,1,0.3,1);
}

.profile-modal-title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
}

.profile-modal-field-label {
  font-size: 12px;
  font-weight: var(--font-semi);
  color: rgba(255,255,255,0.50);
  margin-bottom: 5px;
}

.profile-modal-input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 11px var(--space-4);
  color: rgba(255,255,255,0.90);
  font-size: 14px;
  font-family: inherit;
  direction: rtl;
  outline: none;
  transition: border-color 0.18s;
  box-sizing: border-box;
}

.profile-modal-input:focus { border-color: rgba(255,107,0,0.50); }

.profile-modal-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.profile-modal-cancel {
  flex: 1;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  background: none;
  color: rgba(255,255,255,0.60);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}

.profile-modal-save {
  flex: 2;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #FF6B35, #E65100);
  color: #fff;
  font-size: 14px;
  font-weight: var(--font-bold);
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.2s;
}

.profile-modal-save:hover { opacity: 0.88; }
.profile-modal-save:disabled { opacity: 0.55; cursor: not-allowed; }

/* --------------------------------------------------------------------------
   7. INFO MODAL (FAQ / Privacy / Terms / App Info)
   -------------------------------------------------------------------------- */
.profile-info-modal {
  width: 100%;
  max-width: 480px;
  max-height: 75vh;
  background: var(--surface-base);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  padding: var(--space-6);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  animation: slideUp 0.25s cubic-bezier(0.16,1,0.3,1);
}

.profile-info-modal::-webkit-scrollbar { width: 3px; }
.profile-info-modal::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }

.profile-info-content {
  font-size: 13px;
  line-height: 1.8;
  color: rgba(255,255,255,0.75);
  direction: rtl;
}

.profile-info-close {
  align-self: center;
  padding: 10px 28px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #FF6B35, #E65100);
  color: #fff;
  font-size: 14px;
  font-weight: var(--font-bold);
  font-family: inherit;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   8. RATING MODAL
   -------------------------------------------------------------------------- */
.profile-stars {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
}

.profile-star {
  font-size: 32px;
  cursor: pointer;
  transition: transform 0.12s;
  filter: grayscale(1) opacity(0.4);
}

.profile-star.is-active {
  filter: none;
  transform: scale(1.15);
}
