body {
  font-family: var(--font-ui);
  background-color: #f8f9fa;
  color: #343a40;
  margin: 0;
  padding: 0;
}

header {
  background: linear-gradient(90deg, #007bff, #6610f2);
  color: white;
  padding: 20px 0;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
  font-size: 2.5rem;
  margin: 0;
}

section {
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-bottom: 20px;
}

h2 {
  color: #495057;
  border-bottom: 2px solid #dee2e6;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.form-label {
  font-weight: bold;
}

.btn-success {
  background: linear-gradient(90deg, #28a745, #218838);
  border: none;
  transition: all 0.3s ease;
}

.btn-success:hover {
  background: linear-gradient(90deg, #218838, #1e7e34);
}

.btn-primary {
  background: linear-gradient(90deg, #007bff, #0056b3);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(90deg, #0056b3, #003f8a);
}

.add-row {
  display: flex;
  justify-content: flex-end;
}

table {
  font-size: 0.9rem;
}

table th {
  white-space: nowrap;
}

footer {
  background: #343a40;
  color: white;
  text-align: center;
  padding: 10px 0;
}

footer a {
  color: #ffc107;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

.side-panel {
  background: #fff;
  border-left: 1px solid #dee2e6;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
}

.side-panel h5 {
  font-weight: bold;
}

.clickable {
  cursor: pointer;
  text-decoration: underline;
}

/*Modal*/
/* Modal container styling */
.modal {
  display: none;
  /* Hidden by default */
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
  /* Black with opacity */
  /* text-align: center; */
}

/* Modal content box styling */
.modal-content {
  background-color: #fefefe;
  margin: 10% auto;
  /* Center the modal */
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  /* max-width: 600px; */
}

/* Close button styling */
.close {
  color: #aaa;
  float: right;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: #000;
}


/* Hide the content divs by default */
.collapsible-content {
  display: none;
  margin-left: 20px;
  /* Optional: indent content for clarity */
}

/* Style for clickable headers */
.collapsible-header {
  cursor: pointer;
  background-color: #f1f1f1;
  padding: 10px;
  border: 1px solid #ddd;
  margin-bottom: 5px;
}

.sticky-cta {
  position: sticky;
  bottom: 0;
  background-color: #fff;
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-top: 1px solid #e0e0e0;
  box-shadow: 0 -3px 6px rgba(0, 0, 0, 0.1);
}

.navbar {
  position: sticky !important;
  top: 0;
  z-index: 999;
}

.soon-label {
  font-size: 10px !important;
}

.combined-nav {
  position: relative;
  top: 74px;
  /* <- set this to match your top navbar’s height */
  z-index: 500;
  /* just below the first navbar */
  padding: 0;
}

div#chat-container {
  padding-top: 50px;
  height: 80vh;
  min-width: 320px;
  position: sticky;
  top: 100px;
  /* or adjust to how much offset you need */
  z-index: 1030;
}

.navbar {
  z-index: 1031;
  /* Slightly higher to stay above header if needed */
}

#prompt-output {
  padding-top: 50px;
}

/* Optional: give the header a background so it doesn’t look transparent */
.navbar,
.jumbotron {
  background-color: white;
}


/* Hero Section */
.jumbotron {
  /*background: url('https://t4.ftcdn.net/jpg/04/17/20/73/360_F_417207342_G7LYJqMP12em9M6szV1rEaUEGuVwBEYH.jpg') no-repeat center center;*/
  background-size: cover;
  color: #fff;
  padding: 0.5rem 4rem;
  text-shadow: 4px 2px 10px #060606;
}

.recipe-header {
  position: sticky !important;
  top: 0;
  z-index: 1033;
  /* Make sure it's above other elements */
  padding: 10px 0;
}

.jumbotron h1 {
  font-size: 6rem;
}

.jumbotron p {
  font-size: 1.25rem;
}

/* Card Header Colors */
.card-header.token {
  background-color: #ff6f61;
}

.card-header.overview {
  background-color: #fff3e0;
  color: #495057 !important;
}

.card-header.equipment {
  background-color: #fff3e0;
  color: #495057 !important;
}

.card-header.prep {
  background-color: #fff3e0;
  color: #495057 !important;
}

/* Recipe Overview Background */


/* Footer */
footer {
  background: #f1f1f1;
}

/* Fullscreen Loader */
#loader-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(250, 240, 230, 0.9);
  /* Light overlay */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* Loader Spinner */
#loader-container .spinner-border {
  width: 3rem;
  height: 3rem;
  color: #007bff;
}

/* Loader Message */
#loader-container p {
  margin-top: 1rem;
  font-size: 5.5rem;
  font-family: var(--font-ui);
  color: #2c3e50;
  text-align: center;
  animation: fadeInUp 0.8s ease-out;
}

/* Stop Request Button */
#loader-container #stop-request {
  margin-top: 1rem;
  padding: 10px 20px;
  font-size: 1rem;
  background-color: #dc3545;
  border: none;
  color: white;
  cursor: pointer;
  transition: background 0.3s ease-in-out;
}

#loader-container #stop-request:hover {
  background-color: #c82333;
}

/* Fade-in Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand-side-menu {
  position: absolute;
  bottom: 0;
}


/* Side menu styling */
.offcanvas-body {
  background-color: #f8f9fa;
  font-family: var(--font-ui);
  font-size: 1.2rem;
  color: #343a40;
}

.offcanvas-body .nav-link {
  font-size: 1.25rem;
  color: #343a40;
  padding: 10px 15px;
  border-radius: 0.25rem;
  margin-bottom: 10px;
  transition: background-color 0.2s, color 0.2s;
  border: 0;
  background: none;
}

.offcanvas-body .nav-link:hover,
.offcanvas-body .nav-link:focus {
  background-color: #343a40;
  color: #fff;
  text-decoration: none;
}

.offcanvas-body .nav-link i {
  margin-right: 8px;
  font-size: 1.4rem;
  color: #007bff;
  transition: color 0.2s;

}

.offcanvas-body .nav-link:hover i {
  color: #fff;
}

/* Logo at the bottom styling */
.offcanvas-body .logo-bottom {
  margin-top: auto;
  text-align: center;
  padding: 15px 0;
}

.my-recipes-scrollable-list {
  max-height: 400px;
  overflow-y: auto;

}

/*Business plan*/
.wizard-step {
  display: none;
}

.wizard-step.active {
  display: block;
}

.progress-container {
  margin-bottom: 20px;
}


/* Chat Container */
.chat-container {
  width: 500px;
  height: 700px;
  background-color: #fff;
  border: 1px solid #dee2e6;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
}

/* Chat Header */
.chat-header {
  background-color: #0069d9;
  color: #fff;
  padding: 1rem;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.2rem;
}

/* Chat Messages Area */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  background-color: #f0f0f0;
}

/* Chat Input Area */
.chat-input {
  padding: 1rem;
  border-top: 1px solid #dee2e6;
  background-color: #fff;
  border-radius: 40px;
}

/* Message styling */
.message {
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.message-text {
  margin-left: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  max-width: 80%;
  word-wrap: break-word;
  background-color: #e9ecef;
}

/* User and AI message customization */
.user-request {
  justify-content: flex-start;
}

.user-request-text {
  background-color: #d1e7dd;
  /* Light green background */
  color: #0f5132;
  /* Dark green text */
}

.ai-response {
  justify-content: flex-end;
}

.ai-response-text {
  background-color: #cff4fc;
  /* Light blue background */
  color: #055160;
  /* Dark blue text */
}

/* Floating Chat Button */
.floating-chat-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  width: 60px;
  height: 60px;
  background: linear-gradient(45deg, #007bff, #6610f2);
  border: none;
  border-radius: 50%;
  font-size: 2rem;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}


/*Flash messages*/



#flash-messages {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1050;
  width: 400px;
}

/* Flex alignment to center icon & text */
#flash-messages .alert {
  display: flex;
  align-items: center;
  padding: 10px 15px;
}

/* Space between icon and message text */
#flash-messages .alert i {
  margin-right: 10px;
  font-size: 1.25rem;
}

/* Ensure the close button aligns properly */
#flash-messages .alert .btn-close {
  margin-left: auto;
  padding: 1rem 1rem;
}



/*Account settings*/

body {
  background-color: #f9f9fb;
}

h2.section-title {
  font-weight: 600;
  margin-bottom: 2rem;
}

.card {
  border: none;
  border-radius: 1rem;
}

.card-title {
  font-weight: 500;
}

.btn {
  border-radius: 0.5rem;
}

.form-text a {
  font-weight: 500;
}

.form-control,
.form-select {
  border-radius: 0.5rem;
}

.upload-section .card {
  transition: box-shadow 0.2s ease-in-out;
}

.upload-section .card:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05);
}

/* Enhance overall page background and typography */
body {
  background-color: #f8f9fa;
  font-family: var(--font-ui);
}

/* Provide extra spacing for container content */
.container.my-5 {
  padding-top: 40px;
  padding-bottom: 40px;
}

/* Style the main heading */
h2.mb-4 {
  font-weight: 700;
  color: #343a40;
  border-bottom: 2px solid #dee2e6;
  padding-bottom: 10px;
  margin-bottom: 30px;
}

/* Label styling for better readability */
form label.form-label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 5px;
}

/* Subtle focus styling for inputs and selects */
.form-control:focus,
.form-select:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Button enhancements for hover states */
.btn-dark {
  background-color: #343a40;
  border-color: #343a40;
  transition: all 0.3s ease;
}

.btn-dark:hover {
  background-color: #23272b;
  border-color: #1d2124;
}

/* Card styling improvements */
.card {
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card-title {
  font-weight: 600;
  color: #212529;
}

.form-text {
  font-size: 0.9rem;
  color: #6c757d;
}

/* Input group text styling */
.input-group-text {
  background-color: #e9ecef;
  border: 1px solid #ced4da;
}

/* Extra spacing between upload cards */
.row.mb-5 {
  margin-top: 40px;
  margin-bottom: 40px;
}

textarea:focus,
input:focus {
  outline: none;
}


.floating-gpt-bar {
  position: fixed;
  bottom: 0;
  left: 25vw;
  width: 50vw;
  z-index: 3000;
  background: rgba(34, 40, 49, 0.95);
  box-shadow: 0 -2px 18px rgba(0, 0, 0, 0.14), 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: 1rem 0.5rem 0.85rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-top-left-radius: 1.2rem;
  border-top-right-radius: 1.2rem;
}

.gpt-bar-inner {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  border-radius: 2rem;
  padding: 0.5rem 0.85rem;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.07);
}

.gpt-float-textarea {
  width: 100%;
  min-height: 44px;
  max-height: 160px;
  resize: none;
  border: none;
  outline: none;
  background: transparent;
  color: #f8fafc;
  font-size: 1.15rem;
  font-family: inherit;
  padding: 0.75rem 1.1rem;
  box-shadow: none;
  border-radius: 1.5rem;
}

.gpt-float-textarea:focus {
  background: #181c22;
  color: #fff;
}

.gpt-float-send {
  background: linear-gradient(90deg, #007aff, #22c1c3);
  color: #fff !important;
  font-size: 1.35rem;
  border: none;
  height: 44px;
  width: 44px;
  border-radius: 1.25rem;
  box-shadow: 0 2px 8px rgba(34, 193, 195, 0.11);
  transition: background 0.16s;
}

.gpt-float-send:hover {
  background: linear-gradient(90deg, #005bb5, #005a82);
}

.floating-gpt-bar .text-muted {
  color: #3f3f3f !important;
  font-size: 0.93rem;
  margin-left: 0.3rem;
}


/*
Chat sessions
*/

#history-pane {
  height: 700px;
  left: 0;
  top: 0;
  z-index: 1000;
  overflow-y: scroll;
  overflow-x: hidden;
}

/* Hide the empty DataTables length control wrapper */
#history-pane .dataTables_length:empty,
#history-pane .dataTables_length:not(:has(*)) {
  display: none !important;
}

/* Optional: If you want the search bar to take full width */
#history-pane .dataTables_filter {
  float: none !important;
  text-align: left !important;
  width: 100%;
}

#history-pane .dataTables_filter input[type="search"] {
  width: 100% !important;
  margin-top: 0.5em;
}


@media (max-width: 800px) {
  .gpt-bar-inner {
    max-width: 97vw;
    padding: 0.5rem 0.25rem;
  }

  .floating-gpt-bar {
    padding: 0.85rem 0.1rem 0.7rem 0.1rem;
  }
}


/* Sidebar transition for hide/show */
#history-pane {
  transition: all 0.25s cubic-bezier(.4, 0, .2, 1);
  z-index: 1100;
}

#generator-pane {
  transition: all 0.25s cubic-bezier(.4, 0, .2, 1);
}

/* Hide sidebar and make main area full width */
#history-pane.collapsed {
  display: none !important;
}

#generator-pane.full-width {
  width: 100% !important;
  flex: 0 0 100%;
  max-width: 100%;
}

/* Floating expand button style */
#expand-sidebar {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.17);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.3rem;
  top: 80px;
  left: 16px;
  z-index: 1044;
  display: block;
}


.navbar-brand button,
.navbar button {
  border: 0;
  background: none;
}


@media (max-width: 800px) {
  .container-fluid.py-4 {
    padding-bottom: 140px !important;
  }

  .floating-gpt-bar {
    padding: 0.85rem 0.1rem 0.7rem 0.1rem !important;
  }
}


/* Slide-in from right */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(80px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.recipe-slide-in {
  animation: slideInRight 0.6s ease-out forwards;
}


.recipe-hidden {
  opacity: 0;
  transform: translateX(30px);
}



#stream-chat {
  padding: 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  white-space: normal;
}

#stream-chat h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0.5rem 0 0.2rem;
}

#stream-chat ul,
#stream-chat ol {
  margin: 0.4rem 0 0.6rem;
  padding-left: 1.25rem;
}

#stream-chat li {
  margin-bottom: 0.3rem;
}

#stream-chat p {
  margin: 0.3rem 0;
}

#stream-chat strong {
  font-weight: 600;
}

#stream-chat em {
  font-style: italic;
}

.chat-fade-in {
  opacity: 0;
  transform: translateY(4px);
  animation: fadeInUp 0.25s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.recipe-chat-container {
  padding-bottom: 150px;
}



/*GPT Model Picker*/

/* Dropdown panel polish */
.dropdown-menu.p-2 {
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Card-like options */
.dropdown-menu .model-option {
  position: relative;
  border-radius: 10px;
  padding: 10px 12px;
  gap: 2px;
  /* for the stacked title + subtitle */
  transition: background-color .15s ease, box-shadow .15s ease, border-color .15s ease;
}

/* Hover/focus state */
.dropdown-menu .model-option:hover,
.dropdown-menu .model-option:focus {
  background-color: rgba(13, 110, 253, 0.06);
  /* bs-primary with low alpha */
  box-shadow: inset 0 0 0 1px rgba(13, 110, 253, 0.18);
  /* subtle focus ring */
  text-decoration: none;
}

/* Selected state (Bootstrap uses .active, we’ll leverage it) */
.dropdown-menu .model-option.active {
  background-color: rgba(13, 110, 253, 0.10);
  box-shadow: inset 0 0 0 2px rgba(13, 110, 253, 0.28);
  color: black;
}

/* Checkmark for selected */
.dropdown-menu .model-option.active::after {
  content: "✓";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  color: #0d6efd;
  /* bs-primary */
}

/* Typography tweaks */
.dropdown-menu .model-option .fw-bold {
  line-height: 1.1;
}

.dropdown-menu .model-option small {
  line-height: 1.2;
}


/* Recipe loader */
.recipe-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  font-weight: 500;
  font-size: 1rem;
  z-index: 10;
}

#chat {
  overflow-y: auto;
}



#recipe-loader {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#recipe-loader.active {
  opacity: 1;
  visibility: visible;
}

.success-check {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
  font-size: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* ── Refusal banner (shown when backend emits NO_RECIPE short-circuit) ── */
.refusal-banner {
  padding: 1.5rem;
  border-left: 4px solid #d97706;
  background: #fef3c7;
  color: #78350f;
  border-radius: 4px;
  margin: 1rem 0;
}
.refusal-banner h3 { margin-top: 0; }
.refusal-banner p { margin: 0.5rem 0; }

.success-check.show {
  opacity: 1;
}

/* ── Regen offer card (shown when backend emits regen_signal) ── */
.regen-offer {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 4px;
}
.regen-offer strong {
  display: block;
  margin-bottom: 0.25rem;
}
.regen-offer p {
  margin: 0.4rem 0 0.6rem 0;
  font-size: 0.95em;
}
.regen-offer button {
  margin-right: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: 3px;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 0.95em;
}
.regen-offer button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.regen-offer--mandatory {
  background: #fef3c7;
  border-left: 4px solid #d97706;
  color: #78350f;
}
.regen-offer--suggested {
  background: #e0e7ff;
  border-left: 4px solid #4f46e5;
  color: #3730a3;
}
