/* ─────────────────────────────────────────────────────────────
   MATCHING PORTAL  —  Post-event Khotwa / reflection selection
   ───────────────────────────────────────────────────────────── */

.portal-page { background: var(--sand); padding-top: 68px; min-height: 100vh; }

/* ── Header ──────────────────────────────────────────────────── */
.portal-header {
  background: linear-gradient(160deg, var(--teal-deep) 0%, var(--teal) 100%);
  padding: 56px 0 80px; text-align: center;
}
.portal-header h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; color: var(--white); margin-bottom: 8px; }
.portal-header p  { font-size: 1rem; color: rgba(255,255,255,0.65); }

/* ── Body ────────────────────────────────────────────────────── */
.portal-body { max-width: 900px; margin: -44px auto 80px; padding: 0 32px; }

/* Info notice */
.portal-info-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 32px;
  margin-bottom: 28px; display: flex; align-items: flex-start; gap: 20px;
}
.portal-info-icon {
  width: 48px; height: 48px; flex-shrink: 0; border-radius: var(--radius-sm);
  background: rgba(204,85,0,0.1);
  display: flex; align-items: center; justify-content: center; font-size: 1.375rem;
}
.portal-info-card h3 { font-size: 1.0625rem; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.portal-info-card p  { font-size: 0.9rem; color: var(--ink-muted); line-height: 1.65; }

/* 24-hour reflection notice */
.reflection-notice {
  background: linear-gradient(135deg, rgba(204,85,0,0.06), rgba(201,168,76,0.06));
  border: 1px solid rgba(204,85,0,0.2);
  border-radius: var(--radius-md); padding: 16px 20px;
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 14px;
}
.reflection-notice-icon { font-size: 1.375rem; flex-shrink: 0; }
.reflection-notice-text { font-size: 0.875rem; color: var(--ink-muted); line-height: 1.55; }
.reflection-notice-text strong { color: var(--terra); }
.reflection-timer {
  font-family: var(--font-serif); font-size: 1.25rem; font-weight: 700;
  color: var(--terra); margin-inline-start: auto; white-space: nowrap;
}

/* Event title */
.portal-event-title { font-size: 1.375rem; font-weight: 700; font-family: var(--font-serif); color: var(--ink); margin-bottom: 6px; }
.portal-event-sub   { font-size: 0.9rem; color: var(--ink-muted); margin-bottom: 28px; }

/* ── Selection status pills ──────────────────────────────────── */
.portal-selection-status { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.selection-pill {
  display: flex; align-items: center; gap: 8px; padding: 8px 16px;
  border-radius: var(--radius-full); font-size: 0.8125rem; font-weight: 600;
  background: var(--sand-dark); color: var(--ink-faint);
  border: 1.5px solid var(--sand-dark); transition: var(--transition);
}
.selection-pill.filled { background: rgba(201,168,76,0.12); color: var(--gold); border-color: rgba(201,168,76,0.35); }
.selection-pill-num {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--sand-dark); color: var(--ink-faint);
  font-size: 0.75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.selection-pill.filled .selection-pill-num { background: var(--gold); color: var(--white); }

/* ── Profile cards grid ──────────────────────────────────────── */
.profiles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 32px; }
.profile-card {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 20px 20px;
  text-align: center; cursor: pointer;
  transition: var(--transition); position: relative; overflow: hidden;
}
.profile-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(201,168,76,0.06), rgba(0,109,91,0.04));
  opacity: 0; transition: var(--transition);
}
.profile-card:hover           { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.profile-card:hover::before   { opacity: 1; }
.profile-card.selected-khotwa { border-color: var(--terra); box-shadow: 0 0 0 3px rgba(204,85,0,0.18), var(--shadow-md); }
.profile-card.selected-khotwa::before { opacity: 1; }
.profile-card.selected-pass   { opacity: 0.4; pointer-events: none; filter: grayscale(0.6); }
.profile-card.disabled        { opacity: 0.45; pointer-events: none; filter: grayscale(0.5); }

.profile-avatar {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 1.75rem; font-weight: 700; color: var(--white);
}
.profile-name { font-family: var(--font-serif); font-size: 1.125rem; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.profile-desc { font-size: 0.8rem; color: var(--ink-faint); margin-bottom: 16px; line-height: 1.5; }
.profile-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-bottom: 16px; }
.profile-tag  { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; padding: 3px 10px; border-radius: var(--radius-full); background: rgba(0,109,91,0.08); color: var(--teal); }
html[dir="rtl"] .profile-tag { letter-spacing: 0; }

/* Khotwa / Pass action buttons on card */
.profile-actions {
  display: flex; gap: 8px; justify-content: center; margin-top: 4px;
}
.profile-btn-khotwa {
  flex: 1; padding: 8px 0; border-radius: var(--radius-sm);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
  background: rgba(204,85,0,0.1); color: var(--terra);
  border: 1.5px solid rgba(204,85,0,0.3);
  transition: var(--transition); cursor: pointer;
}
html[dir="rtl"] .profile-btn-khotwa { letter-spacing: 0; }
.profile-btn-khotwa:hover,
.profile-card.selected-khotwa .profile-btn-khotwa {
  background: var(--terra); color: var(--white);
  border-color: var(--terra);
}
.profile-btn-pass {
  flex: 1; padding: 8px 0; border-radius: var(--radius-sm);
  font-size: 0.78rem; font-weight: 600;
  background: transparent; color: var(--ink-faint);
  border: 1.5px solid var(--border);
  transition: var(--transition); cursor: pointer;
}
.profile-btn-pass:hover { border-color: var(--ink-muted); color: var(--ink-muted); }

.profile-selected-badge {
  position: absolute; top: 12px; inset-inline-end: 12px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--terra); color: var(--white);
  display: none; align-items: center; justify-content: center;
  font-size: 0.875rem; font-weight: 700;
  box-shadow: var(--shadow-terra);
}
.profile-card.selected-khotwa .profile-selected-badge { display: flex; }

/* ── Submit section ──────────────────────────────────────────── */
.portal-submit {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px; text-align: center;
}
.portal-submit p  { font-size: 0.9375rem; color: var(--ink-muted); margin-bottom: 24px; line-height: 1.65; }
.portal-submit .btn { min-width: 220px; }
.submit-note { font-size: 0.8125rem; color: var(--ink-faint); margin-top: 12px; }

/* ── Submitted confirmation ──────────────────────────────────── */
.portal-submitted { display: none; text-align: center; padding: 60px 20px; }
.portal-submitted h2 { font-size: 1.75rem; font-family: var(--font-serif); font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.portal-submitted p  { font-size: 1rem; color: var(--ink-muted); max-width: 420px; margin: 0 auto 20px; }
.portal-submitted .arabic-msg { font-size: 1.125rem; color: var(--gold); direction: rtl; font-style: italic; margin: 16px 0; }
html[dir="rtl"] .portal-submitted .arabic-msg { direction: ltr; font-style: normal; }
.portal-submitted-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 32px; }

/* ── Portal Responsive ───────────────────────────────────────── */
@media (max-width: 960px) {
  .profiles-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .portal-body   { padding: 0 20px; }
  .portal-info-card { flex-direction: column; }
  .profiles-grid { grid-template-columns: 1fr; }
  .reflection-notice { flex-wrap: wrap; }
  .reflection-timer { margin-inline-start: 0; }
}

.profile-avatar-photo { display: block; object-fit: cover; background: var(--sand); }
