/* Recipe styles — loaded only on recipe pages.
   CSS custom properties are defined at runtime by global.css (@theme tokens). */

@layer components {
  /* ============================================
     RECIPE: Ingredients List
     ============================================ */
  .ingredients-list {
    background: linear-gradient(135deg, var(--color-brand-gray-50) 0%, var(--color-brand-gold-light) 100%);
    padding: 2rem;
    border-radius: 16px;
    margin: 2rem 0;
    border: 2px solid var(--color-brand-gold-light);
    position: relative;
  }
  .ingredients-list::after {
    content: '';
    position: absolute;
    top: -10px;
    right: -10px;
    width: 40px;
    height: 40px;
    background: var(--color-brand-gold);
    border-radius: 50%;
    opacity: 0.4;
  }
  .ingredients-list h3 {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-brand-green) !important;
    margin: 0 0 1rem !important;
  }
  .ingredients-list ul {
    list-style: none !important;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    padding-left: 0 !important;
    margin: 0 !important;
  }
  .ingredients-list li {
    padding-left: 1.5rem !important;
    position: relative;
    margin: 0 !important;
    color: var(--color-brand-gray-800) !important;
    font-size: 0.95rem;
  }
  .ingredients-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-brand-green-light);
    font-weight: 700;
  }
  .ingredients-list li::marker {
    content: '';
  }
  @media (max-width: 600px) {
    .ingredients-list ul {
      grid-template-columns: 1fr !important;
    }
  }

  /* ============================================
     RECIPE: Timeline Steps
     ============================================ */
  .recipe-timeline {
    margin: 2.5rem 0;
    position: relative;
  }
  .recipe-timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--color-brand-green) 0%, var(--color-brand-gold) 50%, var(--color-brand-orange) 100%);
    border-radius: 2px;
  }
  .timeline-step {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
  }
  .step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-brand-green) 0%, var(--color-brand-green-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.3rem;
    flex-shrink: 0;
    box-shadow: 0 5px 20px rgba(45, 80, 22, 0.3);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
  }
  .timeline-step:hover .step-number {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(45, 80, 22, 0.4);
  }
  .step-content {
    flex: 1;
    background: var(--color-brand-white);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--color-brand-gray-200);
    transition: all 0.3s ease;
  }
  .timeline-step:hover .step-content {
    border-color: var(--color-brand-gold);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transform: translateX(5px);
  }
  .step-content h4 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--color-brand-green);
    margin-bottom: 0.5rem;
  }
  .step-content p {
    margin: 0 !important;
    color: var(--color-brand-gray-600) !important;
    font-size: 0.95rem;
  }
  .step-timer {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--color-brand-orange);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
  }

  /* ============================================
     RECIPE: Tip Box
     ============================================ */
  .tip-box {
    background: linear-gradient(135deg, var(--color-brand-gold-light) 0%, var(--color-brand-white) 50%, rgba(74, 124, 35, 0.05) 100%);
    border-left: 5px solid var(--color-brand-green-light);
    padding: 1.5rem 2rem;
    border-radius: 0 16px 16px 0;
    margin: 2.5rem 0;
    font-size: 1rem;
    box-shadow: 0 5px 20px rgba(45, 80, 22, 0.08);
  }
  .tip-box strong {
    color: var(--color-brand-green);
    display: block;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
  }
  .tip-box p {
    margin: 0 !important;
    color: var(--color-brand-gray-800) !important;
  }

  /* ============================================
     RECIPE: Prep Checklist (dark box)
     ============================================ */
  .prep-check {
    background: linear-gradient(135deg, var(--color-brand-gray-800) 0%, var(--color-brand-stone-dark) 100%);
    color: white;
    padding: 2rem;
    border-radius: 16px;
    margin: 2.5rem 0;
    position: relative;
    overflow: hidden;
  }
  .prep-check::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
  }
  .prep-check h3 {
    color: var(--color-brand-gold) !important;
    margin-top: 0 !important;
    position: relative;
    z-index: 1;
  }
  .checklist {
    list-style: none !important;
    padding: 0 !important;
    margin: 1.5rem 0 0 !important;
    position: relative;
    z-index: 1;
  }
  .checklist li {
    padding: 0.8rem 0 0.8rem 2.5rem !important;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: white !important;
  }
  .checklist li:last-child {
    border-bottom: none;
  }
  .checklist li::before {
    content: '⬜';
    position: absolute;
    left: 0;
    font-size: 1.2rem;
    transition: all 0.3s ease;
  }
  .checklist li::marker {
    content: '';
  }
  .checklist li.checked {
    color: var(--color-brand-gold-light) !important;
    text-decoration: line-through;
    opacity: 0.7;
  }
  .checklist li.checked::before {
    content: '✅';
  }
  .checklist li:hover {
    padding-left: 3rem !important;
  }

  /* ============================================
     RECIPE: Variant Cards
     ============================================ */
  .variant-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2.5rem 0;
  }
  .variant-card {
    background: var(--color-brand-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.4s ease;
    position: relative;
  }
  .variant-card:hover {
    transform: translateY(-10px) rotate(1deg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  }
  .variant-header {
    padding: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
  }
  .variant-header::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
  }
  .variant-header h4 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
    position: relative;
    z-index: 1;
  }
  .variant-header span {
    font-size: 0.8rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
  }
  .variant-header.variant-1 {
    background: linear-gradient(135deg, var(--color-brand-gold) 0%, var(--color-brand-orange) 100%);
  }
  .variant-header.variant-2 {
    background: linear-gradient(135deg, var(--color-brand-green) 0%, var(--color-brand-green-light) 100%);
  }
  .variant-header.variant-3 {
    background: linear-gradient(135deg, var(--color-brand-stone) 0%, var(--color-brand-stone-dark) 100%);
  }
  .variant-body {
    padding: 1.5rem;
  }
  .variant-body ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .variant-body li {
    padding: 0.5rem 0 !important;
    padding-left: 1.5rem !important;
    position: relative;
    font-size: 0.95rem;
    margin: 0 !important;
    color: var(--color-brand-gray-800) !important;
  }
  .variant-body li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-brand-green-light);
    font-size: 1.5rem;
    line-height: 1;
  }
  .variant-body li::marker {
    content: '';
  }
  @media (max-width: 768px) {
    .variant-grid {
      grid-template-columns: 1fr;
    }
  }

  @media (max-width: 768px) {
    .timeline-step {
      flex-direction: column;
      gap: 0.75rem;
    }
    .recipe-timeline::before {
      display: none;
    }
    .step-number {
      width: 45px;
      height: 45px;
      font-size: 1rem;
    }
  }
}
