/* --- CSS Variables and Global Styles --- */
:root {
  --primary-color: #4a90e2;
  --primary-hover-color: #357abd;
  --secondary-color: #f0f2f5;
  --text-color: #333;
  --text-light-color: #666;
  --border-color: #e0e0e0;
  --background-color: #ffffff;
  --pill-background: #f0f2f5;
  --pill-selected-background: #e0eaf7;
  --pill-selected-border: #4a90e2;
  --tooltip-background: #333;
  --tooltip-text-color: #fff;
  --border-radius: 12px;
  --font-family: "Poppins", sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--secondary-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* --- Main Layout --- */
.main-container {
  font-size: 16px;
  display: flex;
  flex-direction: column;
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px;
  @media screen and (max-width: 768px) {
    padding: 5px;
    /*margin-right: -3dvw;
    margin-left: 21px !important;*/
  }
}

.form-container {
  background-color: var(--background-color);
  padding: 10px;
  @media screen and (max-width: 768px) {
    padding: 5px;
  }
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.results-container {
  margin-top: 20px;
  padding: 25px;
  @media screen and (max-width: 768px) {
    padding: 5px;
    text-align: center;
    font-size: 14px;
  }
  background-color: var(--background-color);
  border-radius: var(--border-radius);
}

/* Desktop & Tablet Layout (30% / 70% split) */
@media (min-width: 992px) {
  .main-container {
    flex-direction: row;
    gap: 20px;
  }
  .form-container {
    width: 35%;
    flex-shrink: 0;
    /* height: 100dvh;
    overflow: scroll; */
  }
  .results-container {
    width: 65%;
    margin-top: 0;
  }
}
delete-meal-plan-item:a:hover {
    color: red !important;
    text-decoration: none;
}
/* --- Form Elements --- */
.form-title {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 25px;
  text-align: center;
}

/* Section headings like "NUTRITIONAL TARGETS" */
.form-section-heading {
  margin-top: 25px;
  margin-bottom: 10px;
  color: var(--text-light-color);
  font-size: 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  padding-left: 5px;
}

.form-group {
  margin-bottom: 10px;
  position: relative;
}

.pill-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 12px 15px;
  background-color: var(--pill-background);
  border-radius: var(--border-radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.pill-trigger:hover {
  background-color: #e9ecef;
}

.form-group.active > .pill-trigger {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background-color: #e9ecef;
}

.pill-trigger .label {
  font-weight: 500;
}

.pill-trigger .selected-value {
  color: var(--primary-color);
  font-weight: 400;
  margin-left: auto;
  padding-right: 12px;
  text-align: right;
  /* letter-spacing: -1px; */
}

.pill-trigger .chevron {
  transition: transform 0.3s ease;
}

.form-group.active .chevron {
  transform: rotate(180deg);
}

/* Options Container (The Dropdown) */
.options-container {
  max-height: 0;
  overflow: hidden;
  background-color: #f8f9fa;
  border: 0px solid var(--border-color);
  border-top: none;
  border-bottom-left-radius: var(--border-radius);
  border-bottom-right-radius: var(--border-radius);
  padding: 0 10px;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.form-group.active .options-container {
  max-height: 300px; /* Adjust as needed */
  overflow-y: auto;
  padding: 10px;
}

.option-pill {
  display: inline-block;
  padding: 8px 15px;
  margin: 5px;
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.5rem;
}

.option-pill:hover {
  border-color: var(--primary-color);
}

.option-pill.selected {
  background-color: var(--pill-selected-background);
  border-color: var(--pill-selected-border);
  color: var(--primary-color);
  font-weight: 500;
}

/* --- Tooltips --- */
.tooltip {
  position: relative;
  display: inline-block;
  margin-left: 8px;
  color: var(--text-light-color);
}

.tooltip .tooltip-text {
  visibility: hidden;
  width: 220px;
  background-color: var(--tooltip-background);
  color: var(--tooltip-text-color);
  text-align: center;
  border-radius: 6px;
  padding: 8px;
  position: absolute;
  z-index: 10;
  bottom: 125%;
  left: 50%;
  margin-left: -110px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.85rem;
  font-weight: 400;
}

.tooltip .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--tooltip-background) transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* --- Action Buttons --- */
.form-actions {
  margin-top: 30px;
  display: flex;
  gap: 15px;
}

.btn1 {
  flex-grow: 1;
  padding: 14px;
  border-radius: var(--border-radius);
  border: none;
  font-size: 1.6rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}
.btn-primary:hover {
  background-color: var(--primary-hover-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
  background-color: #e9ecef;
  color: var(--text-color);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background-color: #dfe3e6;
}

/* --- Results & URL Preview --- */
.url-preview {
  margin-top: 20px;
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}
.url-preview pre {
  white-space: pre-wrap;
  word-break: break-all;
  font-family: monospace;
  font-size: 1.5rem;
  color: var(--text-light-color);
}
