/* ===== Results UI ===== */
.results-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr); /* 2 per row */
  gap: 16px;
}

/* Mobile */
@media (max-width: 768px) {
  .results-grid {
    grid-template-columns: 1fr; /* 1 per row */
  }
}

.result-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease;
  position: relative; /* for SVG overlay */
  overflow: hidden; /* keep SVG inside */
}

/* Hover effect */
.result-card:hover {
  transform: translateY(-4px);
}

/* Title */
.result-card h5 {
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* List styling */
.result-card ul {
  padding-left: 18px;
  margin: 0;
}

.result-card li {
  margin-bottom: 8px;
  line-height: 1.4;
}

/* ===== Optional SVG watermark per card ===== */
.result-card::after {
  content: "";
  position: absolute;
  right: -10px;
  bottom: -10px;
  width: 120px;
  height: 120px;
  opacity: 0.05;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}

/* Example SVG for sections (replace with your own SVGs) */
.card-coverage::after {
  background-image: url("data:image/svg+xml,%3Csvg ... %3C/svg%3E");
}

.card-exclusions::after {
  background-image: url("data:image/svg+xml,%3Csvg ... %3C/svg%3E");
}

.card-claims::after {
  background-image: url("data:image/svg+xml,%3Csvg ... %3C/svg%3E");
}

.card-notes::after {
  background-image: url("data:image/svg+xml,%3Csvg ... %3C/svg%3E");
}

/* ===== Optional subtle gradient overlay ===== */
.result-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(0, 0, 0, 0.02) 100%
  );
  pointer-events: none;
}

/* subtle section colors */
.card-coverage {
  border-top: 5px solid #4f90ff;
}

.card-exclusions {
  border-top: 5px solid #ff6b6b;
}

.card-claims {
  border-top: 5px solid #20c997;
}

.card-notes {
  border-top: 5px solid #f4b400;
}

/* Spinner */
.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 5px;
}

#loading {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.2rem;
  background: rgba(255, 255, 255, 0.9);
  padding: 15px 25px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* AI Button */
.ai-button {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(90deg, #4f90ff, #00d4ff);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: bold;
  font-size: 1rem;
  cursor: not-allowed;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); }
  50% { box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); }
}

/* Rotating dots animation */
.dots::after {
  content: "•";
  display: inline-block;
  margin-left: 3px;
  animation: bounce 1s infinite steps(3);
}

@keyframes bounce {
  0%, 20% { content: "•"; }
  40% { content: "••"; }
  60% { content: "•••"; }
  80%, 100% { content: "•"; }
}

/* ===== Dynamic Questions Accordion ===== */
.accordion {
  list-style: none;
  padding: 0;
  margin: 0;
}

.accordion-item {
  border-radius: 10px;
  margin-bottom: 12px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.accordion-item.important {
  border-left: 5px solid #f4b400;
  background: #fffaf0;
  box-shadow: 0 6px 16px rgba(244, 180, 0, 0.25);
}

.accordion-header {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion-header:hover {
  background: #f8fafc;
}

.accordion-header span {
  flex: 1;
}

.badge-important {
  background: #f4b400;
  color: #000;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  margin-left: 10px;
}

.accordion-body {
  padding: 0 16px 16px 16px;
  display: none;
  color: #374151;
  line-height: 1.5;
}

.accordion-item.active .accordion-body {
  display: block;
}


.result-card {
    background: #ffffff; /* keep */
    border-radius: 14px; /* keep */
    padding: 18px;       /* keep */
    box-shadow: 0 8px 20px rgba(0,0,0,0.08); /* keep */
    transition: transform 0.2s ease; /* keep */
    position: relative;  /* NEW */
    overflow: hidden;    /* NEW, needed for pseudo-element */
}

/* SVG watermark per card */
.result-card::after {
    content: "";
    position: absolute;
    right: -20px;
    bottom: -20px;
    width: 160px;
    height: 160px;
    opacity: 0.06;
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
}

/* Example per-section SVG (replace your section classes) */
.card-coverage::after {
    background-image: url("data:image/svg+xml,...");
}
