/* 
   style.css - ZutatenZirkus - Drachenatem | Recipe Website
   Míriam Domínguez Martínez - 18.03.2026
*/

/* ================================================================
   0. CSS CUSTOM PROPERTIES
*/

/*
  Entschuldigung dafür, dass ich die Farben der Vorlage nicht eingehalten habe, 
  ich habe einfach mein eigenes Variablen-Template aus meinem Portfolio verwendet, um das CSS schneller erstellen zu können.
*/

:root {
  --white:       #FFF;
  --light-green: #C0E992;
  --primary:     #4b9c76;
  --dark-green:  #59896C;
  --accent:      #59AF7D;
  --text:        #1a1a1a;
  --text-muted:  #6b7280;
  --border:      #e5e7eb;
  --surface:     #f9fafb;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ================================================================
   1. BASE BODY STYLES
*/
body {
  font-family: Arial, sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
}


/* ================================================================
   2. HEADER
*/
header {
  text-align: center;
  padding: 24px 16px 8px;
}

header h1 {
  font-size: 32px;
  color: var(--primary);
}

.tagline {
  color: var(--text-muted);
  font-style: italic;
  margin-top: 4px;
}


/* ================================================================
   3. RECIPE HERO BOX
*/
.recipe-hero {
  background: var(--primary);
  color: var(--white);
  margin: 20px auto;
  max-width: 700px;
  border-radius: 8px;
  padding: 24px 28px;
}

.recipe-hero h2 {
  font-size: 22px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Semi-transparent inner box for the description text */
.recipe-hero p {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 14px;
  line-height: 1.6;
  font-size: 14px;
}


/* ================================================================
   4. PORTION SELECTOR BAR
*/
.portions-bar {
  text-align: center;
  margin: 20px auto;
  font-size: 15px;
}

.portions-bar input {
  width: 50px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px;
  font-size: 15px;
  margin-left: 6px;
}

.portions-bar input:focus {
  outline: none;
  border-color: var(--primary); /* Green border on focus since was orange for defauld */
}


/* ================================================================
   5. MAIN CONTENT WRAPPER
*/
main {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

/* Two-column flex layout: sidebar (aside) + steps (section) */
.content {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}


/* ================================================================
   6. INGREDIENTS SIDEBAR (ASIDE)
*/
aside {
  background: var(--white);
  border-radius: 8px;
  padding: 16px 20px;
  min-width: 170px;
  flex-shrink: 0; /* prevents the sidebar from shrinking */
}

aside h3 {
  font-size: 15px;
  margin-bottom: 12px;
  color: var(--dark-green);
}

aside table {
  width: 100%;
  border-collapse: collapse;
}

aside td {
  padding: 5px 4px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

/* Right-aligned bold cell for the ingredient amount */
aside td:last-child {
  text-align: right;
  font-weight: bold;
  color: var(--dark-green);
}


/* ================================================================
   7. RECIPE STEPS (SECTION)
*/
section h3 {
  font-size: 18px;
  margin-bottom: 14px;
  color: var(--text);
}

section ol {
  padding-left: 20px;
}

section ol li {
  margin-bottom: 14px;
  line-height: 1.6;
  font-size: 14px;
  background: rgba(192, 233, 146, 0.4); /* Light green background for better readability */
  padding: 5px 5px;
  border-radius: 6px; /* Rounded corners */
}

/* ================================================================
   8. INFO BUTTON
*/
.recipe-hero h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-btn {
  background: rgba(255, 255, 255, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

.info-btn:hover {
  background: rgba(255, 255, 255, 0.45);
}

/* ================================================================
   9. ALLERGEN OVERLAY & POPUP
*/

/* Full-screen dark overlay — hidden by default */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  z-index: 100; /* sits above everything */
  justify-content: center;
  align-items: center;
}

/* When .active is toggled on, show the overlay as flex */
.overlay.active {
  display: flex;
}

/* The white popup box centered inside the overlay */
.popup-box {
  background: var(--white);
  border-radius: 10px;
  padding: 28px 32px;
  max-width: 360px;
  width: 90%;
  position: relative;
  z-index: 101; /* sits above the overlay */
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

.popup-box h3 {
  font-size: 17px;
  color: var(--dark-green);
  margin-bottom: 16px;
}

.popup-box ul {
  list-style: none;
  padding: 0;
  margin-bottom: 20px;
}

.popup-box ul li {
  padding: 7px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

.popup-box ul li:last-child {
  border-bottom: none;
}

.close-btn {
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 6px;
  padding: 9px 20px;
  font-size: 14px;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s;
}

.close-btn:hover {
  background: var(--dark-green);
}

/* ============================================
   10. FOOTER
*/

/* Footer styles */
footer {
    background-color: var(--white); /* White background for better contrast with text */
    color: var(--text); /* Darker text color for better contrast */
    padding: 32px 48px;
    text-align: center;
    font-size: 14.4px;
}

footer p {
    color: var(--text); /* Darker text color for better contrast */
    margin: 0; /* Removes default margin from the footer paragraph for better spacing */
}


