/* ---------- Global Styles ---------- */
body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  background-color: #FAF9F6; /* warm cream */
  margin: 0;
  padding: 0;
  color: #333;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  position: relative; /* needed for totals positioning */
}

/* ---------- Sections / Cards ---------- */
section {
  background: #ffffff; /* white card */
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 24px;
}

/* ---------- Headings ---------- */
h2, h3 {
  color: #2F5233; /* deep green */
  margin-bottom: 12px;
}

/* ---------- Inputs ---------- */
input[type="text"],
input[type="number"],
select {
  width: 100%;
  padding: 10px 14px;
  margin-top: 6px;
  margin-bottom: 16px;
  border: 1px solid #D9CFC1; /* soft tan border */
  border-radius: 8px;
  background-color: #FFF8F0;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.04);
  font-size: 16px;
}

input:focus,
select:focus {
  outline: none;
  border-color: #3E7C59; /* sage green */
  box-shadow: 0 0 8px rgba(62, 124, 89, 0.35);
}

/* ---------- Buttons ---------- */
button {
  background-color: #3E7C59; /* sage green */
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

button:hover {
  background-color: #2F5233; /* deep green */
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ---------- Totals Box (Top Right) ---------- */
.totals-container {
  position: relative;
}

.totals {
  position: absolute;
  top: 60px;
  right: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  max-width: 220px;
  
}

.totals div {
  background: #F4C2C2; /* soft blush */
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  font-weight: bold;
  min-width: 120px;
  text-align: center;
  transition: all 0.2s ease;
}

.totals div:hover {
  box-shadow: 0 6px 18px rgba(47, 82, 51, 0.25);
}

/* ---------- Flower List / Rows ---------- */
#flowerList {
  max-height: 200px; /* fixed height, scroll if too many flowers */
  overflow-y: auto;
  padding: 12px;
  background: #FCF5F0;
  border-radius: 8px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.04);
}

#flowerList .flower-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #E8DED2;
}

#flowerList .flower-row:last-child {
  border-bottom: none;
}

#flowerList .removeButton {
  background-color: #E57C7C;
  font-size: 12px;
  padding: 4px 8px;
}

#flowerList .removeButton:hover {
  background-color: #D95C5C;
}

/* ---------- Calculator Page Layout ---------- */
.calculator-grid {
  display: grid;
  grid-template-areas:
    "recipe customer flowers"
    "hardgoods percentages flowers"
    "totals totals flowers";
  grid-template-columns: 1fr 1fr 1.5fr; /* 2 smaller columns + wider flower list */
  grid-gap: 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
}

section {
  height: 100%; /* prevent stretching mismatch */
}

/* Assign areas */
section.recipe { grid-area: recipe; }
section.customer { grid-area: customer; }
section.hardgoods { grid-area: hardgoods; }
section.percentages { grid-area: percentages; }
section.totals { height: auto; min-height: 0; }
section.flowers { grid-area: flowers; }


/* ---------- Small Labels ---------- */
label {
  font-size: 14px;
  color: #2F5233;
}
/* Make label text appear on its own line */
label {
  display: block;
  margin-bottom: 4px; /* optional spacing before input */
}


/* ---------- Optional Glow for Focused Sections ---------- */
section:focus-within {
  box-shadow: 0 6px 18px rgba(62, 124, 89, 0.25);
  border: 1px solid #3E7C59;
}

/* ---------- Navigation ---------- */
.nav-menu {
  list-style: none;
  display: flex;             /* horizontal */
  justify-content: center;   /* center items */
  align-items: center;
  gap: 1.5rem;               /* spacing between items */
  padding: 0.75rem 1rem;
  margin: 0;
  background: #2F5233;       /* deep green */
}

.nav-menu li {
  display: inline;
}

.nav-menu a,
.nav-menu button {
  color: #FAF9F6;           /* soft cream text */
  text-decoration: none;
  padding: 0.5rem 1rem;
  font-weight: 600;
  border-radius: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.nav-menu a:hover,
.nav-menu button:hover {
  background: #3E7C59;      /* sage green */
  color: #fff;
}

/* ---------- Responsive Adjustments ---------- */
@media (max-width: 768px) {
  .totals {
    flex-direction: column;
    align-items: flex-end;
    position: static;
    margin-bottom: 16px;
  }

  #flowerList {
    max-height: 150px;
  }

  .nav-menu {
    flex-direction: column;
    gap: 0.75rem;
  }
}
/* ---------- Compact Inputs & Selects ---------- */
input[type="text"],
input[type="number"],
select {
  width: auto;           /* shrink to content / container constraints */
  max-width: 300px;      /* optional: cap width */
  padding: 6px 10px;     /* smaller padding */
  font-size: 14px;       /* slightly smaller font */
  margin-top: 4px;
  margin-bottom: 8px;
}

/* ---------- Compact Buttons ---------- */
button {
  padding: 6px 12px;     /* smaller buttons */
  font-size: 14px;
  border-radius: 6px;
}

/* ---------- Admin Table Compactness ---------- */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;       /* smaller font */
  margin-bottom: 1rem;
}

.admin-table th,
.admin-table td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.admin-table th {
  background-color: #f7f7f7;
  font-weight: 600;
}

.admin-table tr:hover {
  background-color: #f1f1f1;
}

/* Scrollable table container to prevent huge tables */
.table-container {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 4px;
}

/* ---------- Compact Totals Box ---------- */
.totals div {
  min-width: 100px; /* slightly smaller */
  padding: 8px 14px;
  font-size: 14px;
}

/* ---------- Compact Flower List ---------- */
#flowerList {
  max-height: 180px;      /* smaller height */
  padding: 8px;           /* smaller padding */
}

#flowerList .flower-row {
  padding: 4px 0;         /* less vertical space */
}

/* Center login form vertically and horizontally */
body.login-page {
    display: flex;
    flex-direction: column;
    justify-content: center; /* vertical centering */
    align-items: center;     /* horizontal centering */
    min-height: 100vh;       /* full viewport height */
    margin: 0;
    font-family: "Helvetica Neue", Arial, sans-serif;
    background-color: #FAF9F6; /* optional: match your theme */
}

body.login-page main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.login-page form {
    display: flex;
    flex-direction: column;
    gap: 12px;            /* space between inputs and button */
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    min-width: 280px;
    max-width: 360px;
    width: 100%;
    box-sizing: border-box;
}

body.login-page form input,
body.login-page form button {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #D9CFC1;
    font-size: 16px;
    box-sizing: border-box;
}

body.login-page form button {
    background-color: #3E7C59;
    color: #fff;
    border: none;
    cursor: pointer;
}

body.login-page form button:hover {
    background-color: #2F5233;
}
/* ---------- Unified Headings & Key Labels ---------- */
.calculator-grid h2,
.calculator-grid label {
    color: #2F5233;       /* same deep green as recipe */
    font-size: 18px;      /* match size across all */
    font-weight: bold;    /* same boldness */
    margin-bottom: 8px;   /* consistent spacing below */
}

/* Optional: Make label text appear on its own line */
.calculator-grid label {
    display: block;
}
/* Make Greens bold and same color/size as headings */
.recipe strong {
    color: #2F5233;        /* same as h2 headings */
    font-size: 18px;       /* match h2 size */
}

#greens {
    color: #2F5233;        /* same as h2 headings */
    font-weight: bold;
    font-size: 18px;
}
/* Align labels and inputs/values vertically */
section.recipe label,
section.recipe div {
    display: flex;
    align-items: center;
    gap: 8px;   /* space between label and input/value */
    margin-bottom: 12px;
}
.toggle-buttons {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.toggle-buttons button {
  flex: 1;
  padding: 6px 12px;
  border: 1px solid #D9CFC1;
  border-radius: 6px;
  background-color: #FFF8F0;
  cursor: pointer;
  transition: all 0.2s;
}

.toggle-buttons button.active {
  background-color: #3E7C59;
  color: #fff;
  border-color: #3E7C59;
}
#cashButton, #creditButton {
    background-color: #f5f5dc;  /* beige */
    color: #333;                /* dark text for readability */
    border: 1px solid #ccc;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
}

#cashButton.active, #creditButton.active {
    background-color: #006400; /* dark green */
    color: #fff;               /* white text */
}
/* Container for hard goods + toggles */
.options-row {
  display: flex;
  flex-wrap: wrap;         /* Wrap to next line on smaller screens */
  gap: 12px;               /* Space between items */
  align-items: center;     /* Vertically align items */
  margin-bottom: 16px;     /* Space below row */
}

/* Style the inputs and checkboxes consistently */
.options-row input[type="text"],
.options-row input[type="checkbox"] {
  font-size: 1rem;
}

/* Label spacing for checkboxes */
.options-row label {
  display: flex;
  align-items: center;
  gap: 4px; /* Space between checkbox and text */
  cursor: pointer;
}

/* Optional: make the hard goods input a bit wider */
#hardGoodsSelect {
  flex: 1;                 /* Take available space */
  min-width: 150px;        /* Minimum width so it doesn't shrink too much */
  padding: 6px 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

/* Checkbox toggles size and color */
#packagingToggle,
#ribbonToggle {
  width: 16px;
  height: 16px;
}

/* Optional: responsive adjustment for small screens */
@media (max-width: 500px) {
  .options-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
