/* 08-recommendations.css — Picks page, match meter, sort pills, predicted rating */

/* ─── Match Meter (Recommendations) ─── */

/* Radial arc gauge */
.match-gauge {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.match-gauge__circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.match-gauge__value {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--amber-400);
}

.match-gauge__unit {
  font-family: var(--font-body);
  font-size: 0.6rem;
  color: var(--ivory-400);
}

/* Legacy bar meter (keep for backwards compat) */
.match-meter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.match-meter__bar {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.match-meter__fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--amber-400), var(--rouge-500));
  transition: width 0.6s ease;
}

.match-meter__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--amber-400);
  white-space: nowrap;
}

/* ─── Predicted Rating ─── */

.predicted-rating-card {
  background: var(--noir-800);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
}

.predicted-rating-value {
  font-family: var(--font-display, 'Playfair Display', serif);
  font-size: 1rem;
  color: var(--ivory-100);
  letter-spacing: -0.02em;
}

.predicted-rating-explanation {
  color: var(--ivory-300);
  line-height: 1.5;
}

.predicted-rating-cta {
  background: var(--noir-900);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.bg-high-confidence {
  background: rgba(59, 109, 92, 0.2);
  color: var(--sage-400);
  border: 1px solid rgba(59, 109, 92, 0.3);
}

.bg-medium-confidence {
  background: rgba(212, 168, 83, 0.15);
  color: var(--amber-300);
  border: 1px solid rgba(212, 168, 83, 0.25);
}

.bg-low-confidence {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ivory-300);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Bootstrap utility overrides below require !important to override Bootstrap's own !important */
.bg-light {
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--ivory-200) !important;
}

.bg-pink {
  background: rgba(217, 108, 123, 0.15) !important;
  color: #d96c7b !important;
}

/* ─── Recommendations ─── */

.recommendations .top-pick {
  background: var(--noir-900);
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--amber-400);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.recommendations .top-pick > .card-body {
  position: relative;
  z-index: 1;
}

.recommendations .top-pick::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 400px 300px at 90% 50%, rgba(212, 168, 83, 0.08), transparent 70%);
  pointer-events: none;
}

.recommendations .card {
  transition: border-color var(--duration-normal) ease, transform var(--duration-normal) ease;
}

.recommendations .card:hover {
  transform: translateY(-3px);
  border-color: var(--border-accent-hover);
}

/* ─── Sort Pills ─── */

.sort-pills {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.sort-pills::-webkit-scrollbar {
  display: none;
}

.sort-pills__label {
  font-size: 0.8rem;
  color: var(--ivory-400);
  white-space: nowrap;
  margin-right: var(--space-1);
}

.sort-pill {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-4);
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--ivory-300);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: background var(--duration-normal) ease,
              color var(--duration-normal) ease,
              border-color var(--duration-normal) ease;
  cursor: pointer;
}

.sort-pill:hover {
  border-color: var(--amber-400);
  color: var(--ivory-100);
  text-decoration: none;
}

.sort-pill--active {
  background: rgba(212, 168, 83, 0.1);
  border-color: rgba(212, 168, 83, 0.25);
  color: var(--amber-400);
  font-weight: 500;
}

.sort-pill--active:hover {
  background: rgba(212, 168, 83, 0.15);
  border-color: rgba(212, 168, 83, 0.35);
  color: var(--amber-400);
}

.sort-pill__icon {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}

.sort-pill {
  transition: background var(--duration-normal), color var(--duration-normal), border-color var(--duration-normal);
}

.top-pick-title {
  font-size: 1.75rem;
}

.top-pick-vintage {
  color: var(--ivory-400);
  font-weight: 400;
}

.top-pick-producer {
  color: var(--ivory-300);
}

.top-pick-explanation {
  color: var(--ivory-200);
  line-height: 1.7;
}

.match-meter--constrained {
  max-width: 320px;
}

.rec-card-meta {
  color: var(--ivory-400);
}

.rec-card-explanation {
  color: var(--ivory-300);
}

/* Recommendation card metadata row */
.rec-card__metadata {
  display: flex;
  gap: 0;
  padding: 10px 12px;
  background: var(--noir-900);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  margin-top: var(--space-2);
}

.rec-card__meta-item {
  flex: 1;
  padding: 0 12px;
}

.rec-card__meta-item:not(:last-child) {
  border-right: 1px solid var(--border-default);
}

.rec-card__meta-item:first-child {
  padding-left: 0;
}

.rec-card__meta-item:last-child {
  padding-right: 0;
}

.rec-card__meta-label {
  font-size: 0.5625rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ivory-400);
  margin-bottom: 2px;
}

.rec-card__meta-value {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ivory-200);
}

.rec-card__meta-value--amber {
  color: var(--amber-400);
}

/* ─── Loading State ─── */

.recs-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  gap: var(--space-3);
}

.recs-loading-state__glass {
  width: 32px;
  height: 48px;
  opacity: 0.7;
}

.recs-loading-state__glass svg {
  width: 100%;
  height: 100%;
}

.recs-loading-state__fill {
  transform: translateY(100%);
  animation: wine-pour 3.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes wine-pour {
  0% {
    transform: translateY(100%);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  70% {
    transform: translateY(30%);
    opacity: 1;
  }
  85%, 100% {
    transform: translateY(30%);
    opacity: 0;
  }
}

.recs-loading-state__text {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--amber-400);
  margin: 0;
  animation: cellar-pulse 2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .recs-loading-state__fill {
    animation: none;
    transform: translateY(30%);
    opacity: 1;
  }

  .recs-loading-state__text {
    animation: none;
  }
}
