/* public/css/profile.css — Styles for the /profile health profile page.
   Does NOT contain triage-app styles (those are in triage.css). */

:root {
  --cream: #F9F5F0;
  --cream-dark: #F0EAE0;
  --terracotta: #C8623A;
  --terracotta-light: #E07A52;
  --sage: #7A9E7E;
  --sage-light: #A5C4A7;
  --charcoal: #1A1A1A;
  --charcoal-mid: #3A3A3A;
  --warm-gray: #6B6560;
  --warm-gray-light: #9A938D;
  --white: #FFFFFF;
  --radius: 12px;
  --radius-sm: 6px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--cream);
  color: var(--charcoal);
  font-family: 'Figtree', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── HEADER ─── */
.profile-header {
  background: var(--charcoal);
  color: var(--white);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-mark {
  width: 36px;
  height: 36px;
  background: var(--terracotta);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Noto Sans Arabic', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
}

.logo-name {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-link {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.15s;
}
.header-link:hover { color: var(--white); }

.lang-switcher { display: flex; gap: 8px; }

.lang-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.6);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: 'Figtree', sans-serif;
}
.lang-btn.active, .lang-btn:hover {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: var(--white);
}

/* ─── PRIVACY BANNER ─── */
.privacy-banner {
  background: var(--sage-light);
  color: var(--charcoal);
  text-align: center;
  padding: 10px 24px;
  font-size: 13px;
  font-weight: 500;
}

/* ─── MAIN ─── */
.profile-main {
  flex: 1;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.profile-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 800;
  color: var(--charcoal);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.profile-subtitle {
  font-size: 15px;
  color: var(--warm-gray);
  margin-bottom: 36px;
}

/* ─── SAVED BANNER ─── */
.saved-banner {
  display: none;
  align-items: center;
  gap: 10px;
  background: var(--sage);
  color: var(--white);
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 24px;
}
.saved-banner.visible { display: flex; }

/* ─── FORM ─── */
.profile-section {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

.section-title {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title .icon {
  width: 28px;
  height: 28px;
  background: var(--cream);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-group:last-child { margin-bottom: 0; }

label {
  font-size: 13px;
  font-weight: 600;
  color: var(--charcoal-mid);
}

input[type="text"],
input[type="number"],
select,
textarea {
  background: var(--cream);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: 'Figtree', sans-serif;
  font-size: 14px;
  color: var(--charcoal);
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  border-color: var(--terracotta);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* ─── MULTI-SELECT CHIPS ─── */
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 100px;
  border: 1px solid var(--cream-dark);
  background: var(--cream);
  color: var(--charcoal-mid);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.chip:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
}

.chip.selected {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: var(--white);
}

.chip .check {
  display: none;
  width: 14px;
  height: 14px;
}

.chip.selected .check { display: inline; }

/* ─── SAVE BUTTON ─── */
.save-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 24px;
}

.save-btn {
  background: var(--terracotta);
  color: var(--white);
  font-family: 'Figtree', sans-serif;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 28px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.save-btn:hover { background: var(--terracotta-light); transform: translateY(-1px); }

.start-triage-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--cream-dark);
  color: var(--warm-gray);
  font-family: 'Figtree', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.15s;
}
.start-triage-btn:hover { border-color: var(--terracotta); color: var(--terracotta); }

.clear-btn {
  background: transparent;
  border: none;
  color: var(--warm-gray-light);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: color 0.15s;
}
.clear-btn:hover { color: #EF4444; }

/* ─── RESPONSIVE ─── */
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  .profile-main { padding: 24px 16px 60px; }
  .header-nav .header-link { display: none; }
}

/* ─── RTL ADJUSTMENTS ─── */
[dir="rtl"] body { font-family: 'Noto Sans Arabic', 'Figtree', sans-serif; }
[dir="rtl"] .logo-mark { font-family: 'Noto Sans Arabic', sans-serif; }
