/* App-specific styles for project-to-make-changes (uses tokens from style.css) */

html,
body {
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

/* Home section headings (plain h2 on index) */
.why-us > h2,
.membership > h2,
.testimonials > h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  color: var(--clr-primary-dark);
  text-align: center;
  margin-bottom: var(--sp-lg);
}

/* Dashboard (legacy class names) */
.dashboard-stat {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  padding: 20px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med);
}

.dashboard-stat:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.dashboard-stat h2 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--crimson-800);
  margin-bottom: 8px;
}

.dashboard-stat p {
  color: var(--clr-muted);
  margin: 0;
  font-size: 0.88rem;
}

.dash-match-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--clr-border);
  gap: 12px;
}

.dash-match-row:last-of-type {
  border-bottom: none;
}

.dash-match-score {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--crimson-700);
  flex-shrink: 0;
}

/* Profile browse / listing */
.profiles-section {
  padding: var(--sp-xl) var(--sp-lg);
  max-width: 1200px;
  margin: 0 auto;
}

.profiles-section > h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600;
  color: var(--clr-primary-dark);
  margin-bottom: var(--sp-lg);
  text-align: center;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--sp-lg);
}

.profile-card {
  position: relative;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med);
}

.profile-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.profile-card img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 4px solid var(--crimson-50);
  box-shadow: var(--shadow-sm);
}

.profile-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--clr-primary-dark);
  margin: 0;
}

.profile-card p {
  font-size: 0.88rem;
  color: var(--clr-muted);
  line-height: 1.55;
  margin: 0;
}

.profile-card .btn-primary {
  margin-top: 8px;
  padding: 11px 24px;
  font-size: 0.88rem;
}

.match-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, var(--crimson-600), var(--crimson-800));
  color: #fff;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(139, 30, 63, 0.25);
}

.match-reasons {
  font-size: 0.82rem;
  color: var(--clr-muted);
  margin-bottom: 4px;
  line-height: 1.5;
  text-align: left;
  width: 100%;
}

/* Profile view pages */
.profile-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px var(--sp-lg) 80px;
  background:
    radial-gradient(ellipse 60% 40% at 30% 0%, rgba(139, 30, 63, 0.09) 0%, transparent 60%),
    linear-gradient(160deg, #fdf8fa 0%, #fdf4f7 100%);
  min-height: calc(100vh - 68px);
}

.profile-page h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--crimson-900);
  text-align: center;
  margin-bottom: var(--sp-lg);
}

.profile-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
  margin: 0 auto var(--sp-lg);
  border: 5px solid #fff;
  box-shadow: 0 4px 24px rgba(74, 14, 34, 0.2);
}

.profile-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.detail-box {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  padding: 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.detail-box strong {
  display: block;
  margin-bottom: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clr-muted);
}

.about-box {
  margin-top: 16px;
  grid-column: 1 / -1;
}

.about-box p {
  line-height: 1.75;
  color: var(--ink-500);
}

.profile-actions {
  text-align: center;
  margin-top: var(--sp-lg);
}

.hobby-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.hobby-tag {
  background: var(--crimson-100);
  color: var(--crimson-700);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
}

.hobbies-box {
  grid-column: span 2;
}

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 20px 0 30px;
  padding: 16px 20px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.filters select {
  min-width: 180px;
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-md);
  background: var(--clr-bg);
  font-size: 0.9rem;
  color: var(--clr-text);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}

.filters select:focus {
  outline: none;
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 4px rgba(139, 30, 63, 0.09);
}

/* Alerts */
.alert-success,
.auth-alert.success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 0.88rem;
}

.alert-error,
.auth-alert.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 0.88rem;
}

.empty-state {
  text-align: center;
  width: 100%;
  font-size: 1rem;
  color: var(--clr-muted);
  padding: var(--sp-lg);
}

/* Auth form extras */
.auth-form textarea {
  display: block;
  width: 100%;
  padding: 14px 18px;
  margin-bottom: 14px;
  background: var(--clr-bg);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-family: var(--font-body);
  color: var(--clr-text);
  resize: vertical;
  min-height: 120px;
  line-height: 1.65;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}

.auth-form textarea:focus {
  outline: none;
  border-color: var(--clr-primary);
  background: var(--clr-surface);
  box-shadow: 0 0 0 4px rgba(139, 30, 63, 0.09);
}

/* Select2 — themed to match Aurivah palette */
.select2-container {
  width: 100% !important;
}

.filters .select2-container {
  min-width: 180px;
  flex: 1;
}

.select2-container--default .select2-selection--single {
  height: 48px !important;
  border: 1.5px solid var(--clr-border) !important;
  border-radius: var(--radius-md) !important;
  background: var(--clr-bg) !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 14px !important;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast) !important;
}

.select2-container--default.select2-container--open .select2-selection--single {
  border-color: var(--clr-primary) !important;
  box-shadow: 0 0 0 4px rgba(139, 30, 63, 0.09) !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 46px !important;
  color: var(--clr-text) !important;
  font-size: 0.9rem !important;
  padding-left: 0 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 46px !important;
  right: 12px !important;
}

.select2-dropdown {
  border: 1px solid var(--clr-border) !important;
  border-radius: var(--radius-md) !important;
  overflow: hidden;
  box-shadow: var(--shadow-md) !important;
}

.select2-search--dropdown {
  padding: 12px;
  background: var(--clr-surface);
}

.select2-search__field {
  border: 1.5px solid var(--clr-border) !important;
  border-radius: var(--radius-sm) !important;
  padding: 10px 12px !important;
  outline: none !important;
  font-size: 0.88rem !important;
}

.select2-results__option {
  padding: 12px 16px !important;
  font-size: 0.9rem !important;
}

.select2-results__option--highlighted {
  background: var(--crimson-700) !important;
  color: #fff !important;
}

.select2-results__option--selected {
  background: var(--crimson-100) !important;
  color: var(--crimson-800) !important;
  font-weight: 600;
}

/* Select2 in filter bars only; profile forms use forms.css */
.filters .auth-form .select2-container {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .filters .select2-container {
    width: 100% !important;
  }

  .hobbies-box {
    grid-column: span 1;
  }

  .profile-details {
    grid-template-columns: 1fr;
  }

  .profile-photo {
    width: 120px;
    height: 120px;
  }
}
