
/* Styles pulled from main and stylesheets css files to isolate styles for just mybox.html */
/*body.mybox-page .main-container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  max-width: 1100px;
  margin: 0 auto;
  min-height: 100vh; 
} */

body.mybox-page.page-mybox::before {
  content: "";
  background-image: url('/images/enterPageImages/pipebackgroundrg.png');
  background-size: 1487px auto; /* shrink it */
  background-repeat: repeat;
  background-position: center;
  opacity: 1;
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

body.mybox-page .main-container,
body.mybox-page section.centerCol,
body.mybox-page section.leftCol,
body.mybox-page section.rightCol {
  background-color: transparent !important;
}

.mybox-page .navigation ul {
    width: 200px;         /* take the available space */
    padding: 0;          /* no internal spacing */
    margin: 0;           /* prevent overflow */
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
  }


body.mybox-page section.centerCol {
    /* width: 100%; */
    flex: 1;
    max-width: 900px;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}


body.mybox-page .search-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px auto;

    /* width: 100%; */
    flex: 1;
    max-width: 900px;
}

body.mybox-page #search-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 900px;

   /* width: 100%; */
   flex: 1;
    margin: 0 auto;
}

body.mybox-page #searchInput {
   /* width: 100%; */
    max-width: 700px;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

body.mybox-page .button-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    width: 75%;
    max-width: 700px;
}

body.mybox-page .recipe-entry {
    background-color: #e8c99e;
    border: none;
    padding: 10px 20px;
    font-family: Rockwell, monospace;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

body.mybox-page .recipe-entry-search-button {
    background-color: #e8c99e;
    border: none;
    padding: 10px 20px;
    font-family: Rockwell, monospace;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

body.mybox-page .recipe-entry:hover {
    background-color: #edd5b2;
}

body.mybox-page .recipe-entry-search-button:hover {
    background-color: #edd5b2;
}

body.mybox-page .search-results, .public-search-results {
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
    border: 3pt solid #d9a760;
    border-radius: 8px;
    box-shadow: 0 8px 12px rgb(0 0 0 / 50%);
    background-color: #fffef8;
    padding: 10px;
    width: 100%;
    max-width: 900px;
}

body.mybox-page .search-results ul, .public-search-results ul {
    list-style: none;
    padding: 0;
    margin: 0;
}


body.mybox-page .search-results button {
    margin-left: 10px;
    color: white;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    background-color: #d9a760;
    transition: background-color 0.3s;
}

body.mybox-page .search-results button:hover {
    background-color: #e8c99e;
}

body.mybox-page .ui-message {
    font-family: Rockwell, monospace;
    font-size: 16px;
    padding: 12px 20px;
    margin-top:4px;
    border-radius: 24px;
    text-align: center;
    max-width: 800px;
    box-sizing: border-box;
}

body.mybox-page .ui-side-message info{
    font-family: Rockwell, monospace;
    font-size: 16px;
    padding: 6px 20px;
    margin-top:4px;
    border-radius: 6px;
    text-align: center;
    width: 100%;
    max-width: 500px;
    box-sizing: border-box;
}

body.mybox-page .ui-message.info {
    background-color: #fdf6ee;
    border: 1px solid #d9a760;
    color: #6b4e2d;
}

body.mybox-page .ui-message.error {
    background-color: #fff4f4;
    border: 1px solid #e57373;
    color: #c62828;
}

body.mybox-page #full-recipe-view {
    margin-top: 20px;
}

body.mybox-page .leftCol img {
    width: 100%;
    max-width: 64px;  
    height: auto;
    margin-top: 8px;
  }

  body.mybox-page .search-results li, .public-search-results li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fffef8;

    /* border: 1px solid #d9a760; 
    margin-bottom: 4px; */
    padding: 3px 8px;
    font-family: "Courier New", monospace;
    font-size: 15px;

    /* box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.08); */
    transition: background-color 0.2s ease;

    /* border-radius: 4px; */
}

body.mybox-page .search-results h3 {
    margin: 0;
    flex-grow: 1;
}
/* Do not change the background on hover for interactive recipe rows */
body.mybox-page .search-results li.interactive-line:hover,
body.mybox-page .public-search-results li.interactive-line:hover {
  background-color: inherit;
}


body.mybox-page .search-results li:hover, .public-search-results li:hover {
    background-color: #fff3dc;
}

body.mybox-page h1, h2, h3, h4 {
    color: #fafa00;
    text-shadow: 0 2px 0 #3b2615,
    0 0 8px rgb(255 211 110 / 75%),
    0 0 22px rgb(255 211 110 / 40%);
    text-align: left;
}

body.mybox-page .search-results li h3, .public-search-results li h3 {
    font-size: 16px;
    color: #000;
    margin-bottom: 6px;
}

/* body.mybox-page .search-results li button.see-full-recipe {
    align-self: flex-end;
    padding: 4px 8px;
    background-color: #d9a760;
    border: none;
    color: #634535;
    font-family: "Rockwell", monospace;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
} */

body.mybox-page .search-results li button.see-full-recipe:hover {
    background-color: #f2e0c7;
}

body.mybox-page .mybox-action-buttons {
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
    display: none;
  }

  body.mybox-page .search-results li:hover .mybox-action-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  
  body.mybox-page .mybox-action-buttons button {
    padding: 4px 8px;
    font-size: 13px;
    border: none;
    border-radius: 4px;
    background-color: #d9a760;
    color: #634535;
    font-family: Rockwell, monospace;
    cursor: pointer;
    transition: background-color 0.2s ease;
  }
  
  body.mybox-page .mybox-action-buttons button:hover {
    background-color: #f2e0c7;
  }

  body.mybox-page .public-search-results .mybox-action-buttons {
    display: none;
}

body.mybox-page .public-search-results li:hover .mybox-action-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

body.mybox-page .public-search-results .mybox-action-buttons button {
    padding: 4px 8px;
    font-size: 13px;
    border: none;
    border-radius: 4px;
    background-color: #d9a760;
    color: #634535;
    font-family: Rockwell, monospace;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

body.mybox-page .public-search-results .mybox-action-buttons button:hover {
    background-color: #f2e0c7;
}

body.mybox-page .public-search-results .mybox-action-buttons button.favorited {
    background-color: #ccc;
    color: #999;
    cursor: default;
    font-style: italic;
    font-weight: bold;
    border: 1px dashed #999;
    pointer-events: none;
}

  body.mybox-page .image-panel-instructions {
    max-width: 700px;
    margin: 10px auto;
    text-align: center;
    font-size: 15px;
}

  body.mybox-page #imagePreviewContainer {
    display: block;
    margin-top: 12px;
  }
  
  body.mybox-page #imagePreviewContainer p {
    font-weight: bold;
    margin-bottom: 6px;
  }
  
body.mybox-page #imagePreviewBox {
  width: 512px;
  height: 512px;
  max-width: 100%;
  border: 1px solid #ccc;
  padding: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #fafafa;
  position: relative;
  overflow: hidden;
}

  body.mybox-page #imagePreviewBox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
  }

  body.mybox-page .image-button-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  margin: 12px;
}

body.mybox-page .image-button-grid .button-row {
  display: flex;
  justify-content: center;
  gap: 15px;
}

body.mybox-page .recipe-entry, .closeout-buttons {
    width: 100%;
    display: flex;
    flex-direction: column;
    margin-top: 5px;
    align-items: center;
    margin-bottom: 5px;
}

body.mybox-page .recipe-detail .close-box {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 24px;
    font-weight: bold;
    color: #444;
    cursor: pointer;
    background-color: #fdf6ee;
    border: 1px solid #aaa;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

body.mybox-page .recipe-detail .close-box:hover {
    background-color: #e8c99e;
}

body.mybox-page .recipe-detail {
  position: relative;
}

body.mybox-page .image-customization-grid {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 12px;
}

body.mybox-page .dropdown-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.mybox-page .dropdown-column label {
  font-family: Rockwell, monospace;
  font-size: 14px;
  margin-top: 4px;
}

body.mybox-page .dropdown-column select {
  padding: 6px;
  font-size: 14px;
  font-family: "Courier New", monospace;
  border-radius: 4px;
  border: 1px solid #ccc;
}

body.mybox-page .generate-prompt-button {
  margin-top: 16px;
  text-align: center;
}

/* body.mybox-page .mybox-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0px;
} */

body.mybox-page .mybox-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: hidden;         /* ❌ Prevent scrolling */
  position: relative;         /* 🔧 Needed for z-index layering */
  padding-left: 0;   
  margin-top:-16px;         /* Clean edge alignment */
}


/*body.mybox-page .mybox-tab {
  background-repeat: no-repeat;
  background-size: 140px 100px;
  background-position: inherit;
  background-color: transparent;
  height: 100px;          
  min-width: 155px;      
  max-width: 160px;
  padding: 30px 14px 5px 0px;
  font-family: Rockwell, monospace;
  color: #fad507;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: unset;
      
  text-shadow: 0 1px 0 #3b2615, 0 0 8px rgb(255 211 110 / 75%), 0 0 22px rgb(255 211 110 / 40%);
}*/

body.mybox-page .mybox-tab {
  background-repeat: no-repeat;
  background-size: 140px 100px;
  background-position: inherit;
  background-color: transparent;
  height: 100px;           /* match image height */
  min-width: 155px;        /* match image width */
  max-width: 160px;
  padding: 30px 14px 5px 0px;
  font-family: Rockwell, monospace;
  color: #ffe66d; /* brighter gold for better contrast */
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: unset;

  /* beefed-up highlights + darker outline */
  text-shadow:
    0 0 2px #000,                        /* subtle black edge for crispness */
    0 1px 2px #2b1a0d,                   /* dark bronze underlay */
    0 0 6px rgba(255, 235, 130, 0.9),    /* inner glow */
    0 0 14px rgba(255, 220, 120, 0.7),   /* mid halo */
    0 0 28px rgba(255, 200, 80, 0.5);    /* outer halo */
}


body.mybox-page .mybox-results-header {
  text-align: center;
}


body.mybox-page .mybox-tab.active {
  font-weight: bold;
  text-decoration: underline;
}
body.mybox-page .public-search-tools {
  width: 100%;
}

body.mybox-page #public-recipe-display-section,
body.mybox-page #search-results-placeholder,
body.mybox-page #public-search-results-placeholder,
body.mybox-page #mybox-section,
body.mybox-page #public-search-section {
  margin-top: 0%;
  width: 100%;
  max-width: 900px;
  box-sizing: border-box;
}

body.mybox-page .mybox-tabs.overlap-tabs {
  /* overflow-x: auto; */
  white-space: nowrap;
}

body.mybox-page .mybox-tabs.overlap-tabs .mybox-tab {
  margin-left: -60px;
  z-index: 1;
}

body.mybox-page .mybox-tabs.overlap-tabs .mybox-tab:first-child {
  margin-left: 0;
}

body.mybox-page .mybox-tabs.overlap-tabs .mybox-tab:hover {
  /* margin-top: -2px; */
  z-index: 10;
}

body.mybox-page .mybox-tabs.overlap-tabs .mybox-tab.active {
  z-index: 5; /* higher than default, lower than hover */
}

body.mybox-page #uploadPreviewBox {
  margin-top: 10px;
  min-height: 100px;
}

body.mybox-page .image-panel-box {
  border: 1px solid #81591f;
  padding: 12px;
  background-color: transparent;
  border-radius: 24px;
  width: 500px;
  /*margin: 20px auto;*/
  font-family: "Courier New", monospace;
}

body.mybox-page .image-panel-box h3 {
  text-align: center;
}

body.mybox-page .image-panel-box label {
  display: block;
  font-size: 14px;
}

body.mybox-page .image-panel-box select {
  width: 100%;
  padding: 6px;
  font-size: 14px;
  font-family: "Courier New", monospace;
  border-radius: 4px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

/* Layout selects in two columns where applicable */
body.mybox-page .image-panel-box .dropdown-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
  margin-top: 20px;
}

body.mybox-page .image-panel-box .dropdown-column label {
  grid-column: span 2;
  margin-bottom: 4px;
  font-weight: bold;
}

/* Optional: ensure preview, prompt area match width */
body.mybox-page #imagePrompt {
  max-width: 480px;
  margin: 5px auto;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

body.mybox-page #imagePrompt.is-typing {
  opacity: 1;
}

body.mybox-page #imagePrompt.is-ready {
  opacity: 1;
  transition: opacity 0.3s ease;
}

body.mybox-page#imagePreviewContainer {
  max-width: 500px;
  margin: 5px auto;
}

body.mybox-page .dropdown-pair-row {
  display: flex;
  gap: 24px;
  margin-top: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
}

body.mybox-page .dropdown-label-input {
  flex: 1;
  min-width: 225px;
  display: flex;
  flex-direction: column;
}

/*body.mybox-page .dropdown-label-input label {
  font-family: Rockwell, monospace;
  font-size: 14px;
  margin-bottom: 4px;
}*/

/* MyBox: dropdown labels over bright/brassy backgrounds */
body.mybox-page .dropdown-label-input > label {
  font-family: Rockwell, monospace;
  font-size: 14px;
  line-height: 1.15;
  letter-spacing: 0.2px;

  /* high-contrast, warm ivory text */
  color: #fff7d6;

  /* subtle outline + glow so it reads on busy art */
  text-shadow:
    0 1px 0 rgba(40, 24, 6, 0.85),   /* dark bevel */
    0 0 6px rgba(255, 200, 60, 0.45);/* warm glow */

  /* a little brass-tinted chip behind the text */
  background: linear-gradient(
    180deg,
    rgba(48, 32, 10, 0.65),
    rgba(32, 20, 6, 0.55)
  );
  border: 1px solid rgba(255, 210, 120, 0.35);
  border-radius: 8px;
  padding: 4px 8px;
  margin-bottom: 6px;

  /* keep it above the panel texture (no layout shift) */
  position: relative;
  z-index: 1;

  /* optional slight glassiness; safe to remove if unwanted */
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);

  /* soft inner shine */
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 220, 0.25),
    0 2px 6px rgba(0, 0, 0, 0.18);
}

/* ——— Image Upload panel: in-frame background ——— */
body.mybox-page .brass-frame#image-upload-panel-frame > .bf-grid::before {
  content: "";
  position: absolute;
  inset: var(--bf-plate-inset, 0);
  z-index: 0;
  pointer-events: none;

  border-radius: var(--bf-radius, 0);

  /* background image for upload panel */
  background-image: url("/images/uploadback1.png");
  background-position: center top;
  background-repeat: repeat-y;
  background-size: 500px auto;

  margin: 6px; /* consistent breathing room like other frames */
}

body.mybox-page .brass-frame#image-upload-panel-frame > .bf-content {
  position: relative;
  z-index: 1;
}


/* Focus/keyboard: brighten the chip when the input under it is focused */
body.mybox-page .dropdown-label-input:focus-within > label {
  border-color: rgba(255, 220, 140, 0.65);
  box-shadow:
    0 0 0 2px rgba(255, 210, 120, 0.25),
    inset 0 1px 0 rgba(255, 250, 220, 0.35);
}


body.mybox-page .dropdown-label-input select {
  padding: 6px;
  font-size: 14px;
  font-family: "Courier New", monospace;
  border-radius: 4px;
  border: 1px solid #ccc;
}

/* MyBox: standalone recipe description box */
body.mybox-page .recipe-description-box {
  margin: 10px 0 14px;
  padding: 6px 10px;
  font-family: Rockwell, monospace;
  font-size: 15px;
  text-align: center;
  /*margin-top: 80px;*/
  color: #fff7d6;
  background: linear-gradient(
    180deg,
    rgba(48, 32, 10, 0.65),
    rgba(32, 20, 6, 0.55)
  );
  border: 1px solid rgba(255, 210, 120, 0.35);
  border-radius: 10px;
  text-shadow:
    0 1px 0 rgba(40, 24, 6, 0.85),
    0 0 6px rgba(255, 200, 60, 0.45);
}

body.mybox-page .recipe-description-box p {
  margin: 0;
}


body.mybox-page .checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 8px;
  font-family: "Courier New", monospace;
  font-size: 13px;
}

body.mybox-page .main-container,
body.mybox-page section.centerCol,
body.mybox-page section.leftCol,
body.mybox-page section.rightCol {
  background-color: transparent !important;
}

.mybox-tab:hover {
  filter: brightness(1.05);

}

body.mybox-page #mybox-help-panel {
  font-family: Rockwell, monospace;
  font-size: 14px;
  background-color: #fdf6ee;
  border: 1px solid #d9a760;
  color: #6b4e2d;
  border-radius: 12px;
  max-height: 640px;
  overflow-y: auto;
  box-sizing: border-box;

}

body.mybox-page #mybox-help-panel::-webkit-scrollbar {
  width: 12px;
}

body.mybox-page #mybox-help-panel::-webkit-scrollbar-track {
  background: #fdf6ee;
}

body.mybox-page #mybox-help-panel::-webkit-scrollbar-thumb {
  background-color: #d9a760;
  border-radius: 8px;
}

body.mybox-page #mybox-help-panel h3 {
  font-size: 14px;
  margin-top: 0;
  color: #aa7529;
  text-shadow: 0 1px 0 #3b2615, 0 0 1px rgb(255 211 110 / 75%), 0 0 22px rgb(255 211 110 / 40%);
}

body.mybox-page #mybox-help-panel .help-image {
  max-width: 100%;
  height: auto;
  margin: 8px 0;
}

/*body.mybox-page .mybox-help-box {
  font-family: Rockwell, monospace;
  font-size: 13px;
  background-color: #fdf6ee;
  border: 1px solid #d9a760;
  color: #6b4e2d;
  border-radius: 6px;
  padding: 8px 10px;
  margin-top: 20px;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  width: 180px;
  box-sizing: border-box;
  box-shadow: 0 4px 10px rgb(0 0 0 / 15%);
}*/

body.mybox-page .mybox-help-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

body.mybox-page .mybox-help-logo {
  max-width: 100%;
  margin-bottom: 8px;
}

body.mybox-page .mybox-help-header {
  font-size: 14px;
  margin: 0 0 6px;
  color: #aa7529;
  text-align: center;
}

body.mybox-page .mybox-help-intro,
body.mybox-page .mybox-help-text {
  font-size: 14px;
  text-align: left;
  margin: 4px 0;
  padding: 0 4px;
}

body.mybox-page .mybox-help-image {
  max-width: 100%;
  height: auto;
  margin: 8px 0;
  border-radius: 4px;
  box-shadow: 0 0 4px rgb(0 0 0 / 5%);
}

body.mybox-page .mybox-help-box::-webkit-scrollbar {
  width: 12px;
}

body.mybox-page .mybox-help-box::-webkit-scrollbar-track {
  background: #fdf6ee;
}

body.mybox-page .mybox-help-box::-webkit-scrollbar-thumb {
  background-color: #d9a760;
  border-radius: 8px;
}

/* Spinner added to Generate Image button */
body.mybox-page button.loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

body.mybox-page button.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  border: 2px solid #634535;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  transform: translate(-50%, -50%);
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

body.mybox-page .box-message {
  font-family: "Courier New", monospace;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  max-width: 450px;
}

body.mybox-page #kitchen-companion-panel {
  margin-top: -10px;
  padding: 8px;
  background-color: #fffef8;
  border: 2px solid #d9a760;
  border-radius: 6px;
  box-shadow: 0 4px 6px rgb(0 0 0 / 10%);
  text-align: center;
}

body.mybox-page #kitchen-companion-panel img {
  max-width: 100%;
  margin-bottom: 8px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgb(0 0 0 / 5%);
}

body.mybox-page .companion-heading {
  font-family: Rockwell, monospace;
  font-size: 18px;
  font-weight: bold;
  color: #aa7529;
  text-align: center;
  margin-top: 20px;
  line-height: 1.3;
}

body.mybox-page #kitchen-companion-panel {
  position: relative;
}

body.mybox-page .qr-image-clear {
  width: 100%;
  max-width: 180px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgb(0 0 0 / 5%);
  display: block;
  margin: 0 auto;
}

body.mybox-page .qr-blur-overlay {
  position: absolute;
  top: 230px;
  left: 0;
  width: 100%;
  max-width: 205px;
  height: 50%;
  backdrop-filter: blur(6px);
  background-color: rgb(255 255 255 / 40%);
  border-radius: 8px;
  margin: 6px;
  pointer-events: none;
  display: none; /* show only for tier 0 */
}

body.mybox-page .search-results li,
body.mybox-page .public-search-results li {
  font-size: 16px;
  font-family: "Courier New", monospace;
  font-weight: bold;
  color: #000;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 6px); /* prevent collision with buttons */
}

body.mybox-page .main-container {
  min-height: 600px; /* or whatever baseline keeps layout intact */
}

body.mybox-page .companion-heading .help-icon {
  width: 64px;
  height: 64px;
  margin-left: 6px;
  vertical-align: middle;
  cursor: pointer;
  margin-top: 4px;
}

body.mybox-page .recipe-entry {
  background-color: #e8c99e;
  border: 2px solid #000;
  color: #000;
  font-family: Rockwell, monospace;
  font-size: 16px;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 4px;
  text-shadow: 1px 1px 4px rgb(255 255 255 / 100%),
               -1px -1px 4px rgb(255 255 255 / 100%),
               0 0 6px rgb(255 255 255 / 100%);
  cursor: pointer;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 2px 2px 6px rgb(0 0 0 / 40%);
}

body.mybox-page .recipe-entry,
body.mybox-page .closeout-buttons {
  width: 100%;
  display: flex;
  flex-direction: column;
  margin-top: 0;
  align-items: center;
}

body.mybox-page section.leftCol {
  width: 300px;
  flex-shrink: 0;
  margin-top: 20px;
}

body.mybox-page section.centerCol {
  flex: 1;
  min-width: 0;
  margin-right: 10px;
  margin-top: 20px;
}


/* Ensure the tabs row doesn’t shrink to the width of its buttons */
body.mybox-page #search-results-placeholder .mybox-tabs {
  display: flex;
  flex-wrap: wrap;    /* allows many tabs to flow, one tab still spans full container */
  gap: 8px;
}

/* make the My Box content span the full column width */
body.mybox-page #mybox-main-content {
  margin: 0 auto;     /* keep it centered in the column */
}

/* ----- Public-results sorting controls (strictly scoped) ----- */
body.mybox-page .rating-sort-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 8px 0 12px;
  font-family: "Courier New", monospace;
  font-size: 14px;
}

body.mybox-page .rating-sort-controls .sort-label, 
body.mybox-page .rating-sort-controls .sort-option {
  color: #fafa00;
  font-family: Rockwell, monospace;
  font-size: 18px;
  font-weight: bold;
  text-shadow: 0 2px 0 #3b2615,
    0 0 8px rgb(255 211 110 / 75%),
    0 0 22px rgb(255 211 110 / 40%);
}

body.mybox-page .rating-sort-controls .sort-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  
}

body.mybox-page .rating-sort-controls input[type="radio"] {
  accent-color: #d9a760; /* keeps within page aesthetic */
}

/* mybox.css — scoped to MyBox page */
body.mybox-page #imagePreviewContainer {
  margin-top: 8px;
}

body.mybox-page #imagePreviewBox {
  /* The panel column width defines the preview width; keep it responsive */
  width: 100%;
  border: 1px dashed #ccc;
  border-radius: 8px;
  padding: 8px;
  box-sizing: border-box;
  background: #fafafa;
}

body.mybox-page #imagePreviewBox img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

body.mybox-page #imagePreviewContainer .box-message {
  display: block;
  font-size: 0.9rem;
  margin-top: 6px;
}

/* mybox.css — scoped to MyBox page only */
body.mybox-page #imagePreviewBox {
  width: 100%;
  opacity: 0.5;
  transition: opacity 240ms ease-in-out;
}

body.mybox-page #imagePreviewBox.is-ready {
  opacity: 1;
}

body.mybox-page #imagePreviewBox canvas,
body.mybox-page #imagePreviewBox img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

h2.banner-headline {
  margin: 0;
}

/* Headline look (sitewide) */
body.mybox-page h2.banner-headline {
  position: relative;
  display: block;
  margin: 0 auto;                 /* remove default h2 margins */
  padding: 18px;
  border-radius: 12px;
  margin: 8px 0px;
  white-space: normal;       /* allow wrapping explicitly */
  line-height: 1.25;
  font-family: Rockwell, serif;
  font-size: clamp(1.0rem, 0.8vw + 0.75rem, 1.55rem);
  letter-spacing: 0.02em;
  text-align: center;
  color: #fafa00;
  text-shadow:
    0 2px 0 #3b2615,
    0 0 8px rgb(255 211 110 / 75%),
    0 0 22px rgb(255 211 110 / 40%);
    background-color: transparent;
}

body.mybox-page h2.companion-headline {
  position: relative;
  display: block;
  margin: 0 auto;                 /* remove default h2 margins */
  padding: 18px;
  border-radius: 12px;
  margin: 8px 0px;
  white-space: normal;       /* allow wrapping explicitly */
  line-height: 1.25;
  font-family: Rockwell, serif;
  font-size: clamp(1.0rem, 0.8vw + 0.75rem, 1.55rem);
  letter-spacing: 0.02em;
  text-align: center;
  color: #fafa00;
  text-shadow:
    0 2px 0 #3b2615,
    0 0 8px rgb(255 211 110 / 75%),
    0 0 22px rgb(255 211 110 / 40%);
}

#kitchen-companion-section {
  margin-bottom: 10px;
  margin-top: -8px;
  padding: 0px;
  padding-top: 9px;
}

body.mybox-page section.leftCol .brass-frame.sm {
  width: 100%;
  max-width: 100%;
  display: block;
}

body.mybox-page section.leftCol #side-content-wrapper {
  width: 100%;
  max-width: 100%;
}

#side-content-wrapper .bf-content {
  padding: 10px 12px;
}


/* ——— Area 1: MyBox list frame ——— */
body.mybox-page .brass-frame#mybox-section-frame > .bf-grid::before {
  content: "";
  position: absolute;
  inset: var(--bf-plate-inset, 0);
  z-index: 0;
  pointer-events: none;

  /* geometry tuned for this frame only */
  width: 91.5%;
  margin-left: 40px;
  margin-top: 36px;
  margin-bottom: 38px;
  border-radius: var(--bf-radius, 0);

  /* image */
  background-image: url("/images/buttonpipebackground.png");
  background-position: center top;
  background-repeat: repeat;
  background-size: contain;
}

/* keep content above the decorative strip */
body.mybox-page .brass-frame#mybox-section-frame > .bf-content {
  position: relative;
  z-index: 1;
}


/* ——— Area 2: Public recipe display frame ——— */
body.mybox-page .brass-frame#public-recipe-display-section-frame > .bf-grid::before {
  content: "";
  position: absolute;
  inset: var(--bf-plate-inset, 0);
  z-index: 0;
  pointer-events: none;

  width: 91.5%;
  margin-left: 40px;
  margin-top: 36px;
  margin-bottom: 38px;
  border-radius: var(--bf-radius, 0);

  background-image: url("/images/buttonpipebackground.png");
  background-position: center top;
  background-repeat: repeat;
  background-size: contain;
}

body.mybox-page .brass-frame#public-recipe-display-section-frame > .bf-content {
  position: relative;
  z-index: 1;
}


/* ——— Public search tools: in-frame backdrop ——— */
body.mybox-page .brass-frame#public-search-tools-frame > .bf-grid::before {
  content: "";
  position: absolute;
  inset: var(--bf-plate-inset, 0);
  z-index: 0;
  pointer-events: none;

  /* your in-frame margins */
  margin: 6px;
  border-radius: var(--bf-radius, 0);

  /* image (overridable via --bf-bg-image if needed) */
  background-image: var(--bf-bg-image, url("/images/myboxback.png"));
  background-position: center top;
  background-repeat: repeat;
  background-size: 100%;
}

body.mybox-page .brass-frame#public-search-tools-frame > .bf-content {
  position: relative;
  z-index: 1;
}

/* Image Generation panel: fixed background on the frame plate */
body.mybox-page .brass-frame#image-generation-panel-frame > .bf-grid::before {
  content: "";
  position: absolute;
  inset: var(--bf-plate-inset, 0);
  z-index: 0;
  pointer-events: none;

  /* inside-edge rounding to match the brass plate */
  border-radius: var(--bf-radius, 0);

  /* image: start with imageback1.png; change the number to swap */
  background-image: url("/images/imageback2.png");
  background-position: center top;
  background-repeat: repeat-y;

  /* Your art is 500 × 1723. Keep aspect ratio, scale to 500px wide. */
  background-size: 500px auto;

  /* optional inner breathing room like your other frames */
  margin: 6px;
}

/* Keep content above the decorative skin */
body.mybox-page .brass-frame#image-generation-panel-frame > .bf-content {
  position: relative;
  z-index: 1;
}

/* Upload panel: make its paragraphs look like the label chips */
body.mybox-page #image-upload-panel-frame .bf-content .image-panel-box > p,
body.mybox-page #image-upload-panel-frame .bf-content #imagePreviewContainer > p,
body.mybox-page #image-upload-panel-frame .bf-content #imagePreviewContainer .box-message {
  font-family: Rockwell, monospace;
  font-size: 14px;
  line-height: 1.15;
  letter-spacing: 0.2px;

  color: #fff7d6; /* warm ivory */
  text-shadow:
    0 1px 0 rgba(40, 24, 6, 0.85),
    0 0 6px rgba(255, 200, 60, 0.45);

  background: linear-gradient(
    180deg,
    rgba(48, 32, 10, 0.65),
    rgba(32, 20, 6, 0.55)
  );
  border: 1px solid rgba(255, 210, 120, 0.35);
  border-radius: 8px;
  padding: 4px 8px;
  margin: 6px 0;

  position: relative;
  z-index: 1;
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 220, 0.25),
    0 2px 6px rgba(0, 0, 0, 0.18);
}

/* Keep the header unchanged (explicitly no chip) */
body.mybox-page #image-upload-panel-frame .bf-content .image-panel-box > h3 {
  background: transparent;
  border: 0;
  box-shadow: none;
}

/* --- Difficulty-based row coloring for MyBox & Public lists --- */
/* --- Difficulty-based row coloring for MyBox & Public lists --- */
/* --- Difficulty-based row coloring for MyBox & Public lists (simplified) --- */
body.mybox-page .interactive-line {
  /*padding: 10px 12px;
  margin: 6px 0;*/
  list-style: none;
  /*background: transparent;  base is transparent; diff-* sets flat color */
  border: none;
  border-radius: 0;
  box-shadow: none;
  /* Do NOT change text color */
}



/* Flat backgrounds only — match the pill colors exactly */
body.mybox-page .interactive-line.diff-easy  { background: #e6f6e6; }
body.mybox-page .interactive-line.diff-med    { background: #fff7cc; }
body.mybox-page .interactive-line.diff-hard  { background: #ffe3e3; }
/* Add NA case to match your pill set */
body.mybox-page .interactive-line.diff-na    { background: #eee9df; }


/* keep buttons aligned & readable on tinted rows */
body.mybox-page .interactive-line .mybox-action-buttons {
  margin-top: 8px;
}

/* Hide native frame dropdown but keep it functional for JS */
.frame-select-hidden {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Thumbnail grid container – hidden by default; opened by toggle */
.frame-picker-grid {
  display: none;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.frame-picker-grid.open {
  display: flex;
}

/* Toggle button for showing/hiding the frame picker */
.frame-picker-toggle {
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
  padding: 4px 10px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid rgba(255, 210, 120, 0.5);
  background: rgba(40, 24, 6, 0.7);
  color: #ffeec5;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.frame-picker-toggle:hover {
  background: rgba(60, 36, 10, 0.85);
}

.frame-picker-toggle span {
  font-size: 0.75rem;
}


/* Individual frame tile */
.frame-picker-tile {
  border: 1px solid #555;
  border-radius: 6px;
  padding: 4px;
  background: ivory;
  cursor: pointer;
  text-align: center;
  min-width: 90px;
  max-width: 110px;
  width: 110px;
}

/* Selected tile */
.frame-picker-tile.active {
  border-color: #ffd700;
  box-shadow: 0 0 4px #ffd700;
}

/* Thumbnail wrapper */
.frame-picker-thumb {
  width: 100px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

/* Thumbnail image */
.frame-picker-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Label text under thumbnail */
.frame-picker-label {
  margin-top: 2px;
  font-size: 0.75rem;
}








