.intro-card
{
  margin-bottom: 20px;
  padding-top: 18px;
  padding-bottom: 18px;
  padding-left: 16px;
  padding-right: 16px;
  background: radial-gradient(circle at top left, #dbeafe, #fce7f3);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}

.intro-title
{
  margin-top: 0;
  margin-bottom: 6px;
  font-size: 22px;
}

.intro-text
{
  margin-top: 4px;
  margin-bottom: 4px;
  font-size: 14px;
  color: var(--baby-ink);
}

.section-title
{
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 18px;
  font-weight: 600;
}

.empty-state
{
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--baby-muted);
}

.gift-section
{
  margin-bottom: 24px;
}

.add-section
{
  margin-bottom: 24px;
}

/* Gift list */

.gift-list
{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gift-card
{
  background-color: var(--baby-card-bg);
  border-radius: 18px;
  padding-top: 12px;
  padding-bottom: 12px;
  padding-left: 14px;
  padding-right: 14px;
  box-shadow: var(--shadow-soft);
}

.gift-header-row
{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.gift-title
{
  margin-top: 0;
  margin-bottom: 4px;
  font-size: 16px;
}

.gift-meta
{
  margin-top: 2px;
  margin-bottom: 2px;
  font-size: 13px;
  color: var(--baby-muted);
}

.gift-description
{
  margin-top: 6px;
  margin-bottom: 4px;
  font-size: 14px;
}

.gift-link-row
{
  margin-top: 4px;
  margin-bottom: 4px;
}

.gift-link
{
  font-size: 13px;
  font-weight: 500;
}

/* Purchase form */

.gift-form
{
  margin-top: 10px;
  border-top-width: 1px;
  border-top-style: dashed;
  border-top-color: var(--baby-border);
  padding-top: 8px;
}

.add-form
{
  margin-top: 6px;
}

/* Honeypot */

.hp-field
{
  position: absolute;
  left: -9999px;
}

/* Purchased section */

.purchased-section
{
  margin-bottom: 24px;
}

.purchased-details
{
  background-color: #eef2ff;
  border-radius: 16px;
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 12px;
  padding-right: 12px;
  font-size: 13px;
}

.purchased-summary
{
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}

.purchased-summary::-webkit-details-marker
{
  display: none;
}

.purchased-summary::before
{
  content: "▸";
  display: inline-block;
  margin-right: 6px;
  font-size: 11px;
}

.purchased-details[open] .purchased-summary::before
{
  content: "▾";
}

.purchased-list
{
  list-style: none;
  padding-left: 0;
  margin-top: 8px;
  margin-bottom: 0;
}

.purchased-item
{
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}

.purchased-title
{
  font-weight: 500;
}

.purchased-meta
{
  color: var(--baby-muted);
}

/* Slight spacing tweaks on larger screens */

@media (min-width: 640px)
{
  .gift-card
  {
    padding-left: 18px;
    padding-right: 18px;
  }

  .intro-card
  {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* Purchased section layout */

.purchased-section {
  margin-top: 20px;
}

.purchased-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.purchased-title {
  font-size: 16px;
  margin-bottom: 8px;
}

/* Compact purchased cards */

.purchased-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gift-card--purchased.gift-card--compact {
  padding: 8px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f9fafb, #eef2ff);
  box-shadow: none;
  opacity: 0.95;
}

.gift-title--compact {
  font-size: 14px;
  margin-bottom: 2px;
}

.chip--compact {
  font-size: 11px;
  padding: 2px 8px;
}

.gift-meta--compact {
  font-size: 12px;
  margin-bottom: 2px;
}

.gift-purchased--compact {
  font-size: 12px;
  margin-top: 2px;
  margin-bottom: 2px;
}

.gift-note--compact {
  font-size: 12px;
  font-style: italic;
  margin-top: 2px;
  margin-bottom: 0;
}

/* Tighten spacing on very small screens */

@media (max-width: 480px) {
  .gift-card--purchased.gift-card--compact {
    padding: 8px 10px;
  }

  .gift-title--compact {
    font-size: 13px;
  }
}

/* Purchased section layout */

.purchased-section {
  margin-top: 20px;
}

.purchased-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.purchased-title {
  font-size: 16px;
  margin-bottom: 0;
}

.purchased-help {
  margin: 0;
  font-size: 12px;
  color: var(--baby-muted);
}

/* Compact list container */

.purchased-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Base purchased card – slightly brighter colours */

.gift-card--purchased {
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.gift-card--purchased.gift-card--compact {
  padding: 8px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, #e0f2fe, #dbeafe); /* brighter */
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  opacity: 0.98;
}

.gift-card--purchased.gift-card--compact:hover {
  transform: translateY(-1px);
}

/* Compact typography */

.gift-title--compact {
  font-size: 14px;
  margin-bottom: 2px;
}

.chip--compact {
  font-size: 11px;
  padding: 2px 8px;
}

.gift-meta--compact {
  font-size: 12px;
  margin-top: 0;
  margin-bottom: 2px;
}

.gift-purchased--compact {
  font-size: 12px;
  margin-top: 2px;
  margin-bottom: 2px;
}

.gift-note--compact {
  font-size: 12px;
  font-style: italic;
  margin-top: 2px;
  margin-bottom: 0;
}

/* Details that are only visible when expanded */

.gift-description--purchased,
.gift-link-row--purchased,
.gift-meta-detail {
  display: none;
  font-size: 13px;
}

/* Expanded state – full card look */

.gift-card--purchased.is-expanded {
  padding: 14px 14px;
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
}

.gift-card--purchased.is-expanded .gift-title--compact {
  font-size: 15px;
}

.gift-card--purchased.is-expanded .gift-meta--compact,
.gift-card--purchased.is-expanded .gift-purchased--compact,
.gift-card--purchased.is-expanded .gift-note--compact {
  font-size: 13px;
}

.gift-card--purchased.is-expanded .gift-description--purchased,
.gift-card--purchased.is-expanded .gift-link-row--purchased,
.gift-card--purchased.is-expanded .gift-meta-detail {
  display: block;
  margin-top: 4px;
}

/* Mobile tweaks */

@media (max-width: 480px) {
  .gift-card--purchased.gift-card--compact {
    padding: 8px 10px;
  }

  .gift-title--compact {
    font-size: 13px;
  }
}
