/* Extracted from localBusinessDetailGS1.php */

.json-editor-btn-edit {
  display: none;
}

.json-editor-btn-edit_properties {
  display: none;
}

.json-editor-btn-save {
  display: none;
}

.FoodBeverageTobaccoProductTypeButton {
  display: none;
}

.inactivePanel {
  display: none;
}

.activePanel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
}

.productDiv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;

}

.row {
  border: 4px solid #c6cb2e;
  padding: 16px;
}

.header {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
}

.je-header {
  margin: 0 !important;
}

#choiceProductType li {
  list-style-type: none;
}

.infoTypeButton {
  background-color: #c6cb2e;
  color: white;
  min-height: 75px;
  position: relative !important;
}

.batraEditorPanel {
  text-align: center;
}

.batraEditorHeader {
  text-align: center;
}

.logoHeader {
  width: 100px;
  margin: auto;
}

.popup {
  background-color: white;
  color: black;
  position: fixed;
  width: 100%;
  height: 100%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  display: none;
}

.ficheProduitLabel {
  margin: auto;
  color: white;
  background-color: #C6CB2E;
  width: 184px;
  height: 49px;
  border: 2px solid #C6CB2E;
  border-radius: 48px;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vignette {
  margin: auto;
  width: 291px;
  background-color: #F8F8DD;
  border: 2px solid #F8F8DD;
  border-radius: 40px;
  margin-top: 16px;
  text-align: center;
}

.vignetteSmall {
  margin: auto;
  width: 150px;
  background-color: #F8F8DD;
  border: 2px solid #F8F8DD;
  border-radius: 40px;
  margin-top: 16px;
}

.value {
  font-size: 14px;
  color: #75AE3A;
}

.unitCode {
  font-size: 14px;
}

.gtin {
  text-align: center;
}

.container {
  text-align: center;
  color: #75AE3A;
}

.referencedFile_image {
  width: auto;
  height: auto;
  max-width: 207px;
  max-height: 207px;

}

.referencedFile_imageThumb {
  width: auto;
  height: auto;
  max-width: 50px;
  max-height: 50px;

}

.hidden {
  display: none;
}

.productName_container {
  font-size: 16px;
}

.productName_value {
  font-size: 16px;
}

.language_flag {
  width: 16px;
}

.label {
  width: auto;
  height: auto;
  max-width: 50px;
  max-height: 50px;
}

.allergen {
  width: auto;
  height: auto;
  max-width: 100px;
  max-height: 100px;
}

.netContent_container {
  font-size: 13px;
}

.buttonEdit {
  width: 16px;
}

.dataContainer {
  grid-gap: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
}

.ficheProduitOrigineIngredient {
  max-width: 320px;
  margin: auto;
  grid-gap: 4px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
}

.languageData {
  display: none;
}

.productTable {
  border-width: 2px;
  border-color: #C6CB2E;
  margin: auto;
  background-color: white;
}

.productTable td:first-child {
  text-align: left;
  font-size: 0.8em;
}

.productTable th {
  border-bottom: 1px solid #C6CB2E;
  padding: 8px;
  background-color: #C6CB2E;
}

.productTable td {
  border: 1px solid #C6CB2E;
  padding: 4px;
}

.magnet {
  width: 20px
}

dialog {
  z-index: 10;
  background: green;
  border: none;
  border-radius: 1rem;
}

dialog::backdrop {
  background-color: hsl(250, 100%, 50%, 0.25);
}

/* New Modal Styles */
#new_dialog {
  padding: 0;
  border: none;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  max-width: 1200px;
  width: 95%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: auto;
  /* Center horizontally and vertically */
}

#new_dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.modal-header {
  background-color: #75AE3A;
  color: white;
  padding: 15px 20px;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header h4 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
}

.modal-body {
  padding: 20px;
  background-color: #f9f9f9;
}

.modal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .modal-grid {
    grid-template-columns: 1fr;
  }
}

.form-card {
  background: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  border: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-card h5 {
  margin: 0 0 10px 0;
  font-size: 1rem;
  color: #75AE3A;
  border-bottom: 2px solid #75AE3A;
  padding-bottom: 5px;
  display: inline-block;
}

.input-group {
  margin-bottom: 10px;
}

.input-group label {
  display: block;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 4px;
}

.styled-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: border-color 0.2s;
  box-sizing: border-box;
  height: 38px;
}

.styled-input:focus {
  border-color: #75AE3A;
  outline: none;
  box-shadow: 0 0 0 2px rgba(117, 174, 58, 0.2);
}

.modal-footer {
  padding: 15px 20px;
  background-color: #f0f0f0;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-cancel {
  background-color: #ccc;
  color: #333;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.btn-submit {
  background-color: #75AE3A;
  color: white;
  border: none;
  padding: 8px 24px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  height: 38px;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-submit:hover {
  background-color: #649630;
}

.lang-flag {
  height: 14px;
  width: auto;
  /* Fix aspect ratio */
  max-width: 24px;
  /* Prevent giant flags */
  vertical-align: middle;
  margin-right: 5px;
}

.lang-flag-gray {
  height: 14px;
  width: auto;
  max-width: 24px;
  vertical-align: middle;
  margin-right: 5px;
  filter: grayscale(100%);
  opacity: 0.5;
  cursor: pointer;
}

.lang-flag-gray:hover {
  opacity: 1;
  filter: grayscale(0%);
}

/* Toolbar Styles */
.toolbar-container {
  display: flex;
  flex-direction: row;
  gap: 20px;
  margin-bottom: 30px;
  align-items: stretch;
}

.toolbar-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  flex: 1;
  display: flex;
  flex-direction: column;
  border: 1px solid #e0e0e0;
}

.toolbar-card h3 {
  margin: 0 0 15px 0;
  color: #75AE3A;
  font-size: 1.1rem;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 10px;
}

.toolbar-actions {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin-top: auto;
}

/* Wizard Styles */
.wizard-container {
  position: relative;
  overflow: hidden;
}

.wizard-step {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

.wizard-progress {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  position: relative;
}

.wizard-progress::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: #e0e0e0;
  z-index: 0;
  transform: translateY(-50%);
}

.progress-step {
  width: 30px;
  height: 30px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #999;
  position: relative;
  z-index: 1;
  transition: all 0.3s;
}

.progress-step.active {
  border-color: #75AE3A;
  background: #75AE3A;
  color: white;
}

.progress-step.completed {
  border-color: #75AE3A;
  background: #75AE3A;
  color: white;
}

.wizard-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.btn-nav {
  padding: 10px 20px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: white;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-nav:hover {
  background: #f9f9f9;
}

.btn-nav.primary {
  background: #75AE3A;
  color: white;
  border: none;
}

.btn-nav.primary:hover {
  background: #649630;
}

/* STT Styles */
.input-wrapper {
  position: relative;
  width: 100%;
}

.mic-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  width: 20px;
  height: 20px;
  fill: #999;
  transition: all 0.2s;
  z-index: 10;
}

.mic-icon:hover {
  fill: #666;
}

.magic-icon {
  position: absolute;
  right: 40px;
  /* Positioned to the left of the mic */
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  width: 20px;
  height: 20px;
  fill: #9b59b6;
  /* Purple for magic */
  transition: all 0.2s;
  z-index: 10;
}

.magic-icon:hover {
  fill: #8e44ad;
  transform: translateY(-50%) scale(1.1);
}

.magic-icon.loading {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  100% {
    -webkit-transform: translateY(-50%) rotate(360deg);
    transform: translateY(-50%) rotate(360deg);
  }
}

.mic-icon.recording {
  fill: #e74c3c;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: translateY(-50%) scale(1);
    box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
  }

  70% {
    transform: translateY(-50%) scale(1.2);
    box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
  }

  100% {
    transform: translateY(-50%) scale(1);
    box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
  }
}

/* Magic Suggestion Popup */
.magic-suggestion-popup {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: white;
  border: 2px solid #9b59b6;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 4px 15px rgba(155, 89, 182, 0.3);
  z-index: 1000;
  margin-top: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  color: #333;
  transition: all 0.2s ease;
  display: none;
  /* Hidden by default */
}

.magic-suggestion-popup:hover {
  background-color: #f8f0fc;
  /* Light purple tint */
  transform: translateY(2px);
}

.magic-suggestion-popup::before {
  content: '✨ Proposition IA (Cliquez pour appliquer)';
  display: block;
  font-size: 0.75rem;
  color: #9b59b6;
  font-weight: bold;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Image Drop Zone */
.image-drop-zone {
  border: 2px dashed #bdc3c7;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  background: #f9f9f9;
  transition: all 0.3s;
  margin-bottom: 20px;
  position: relative;
}

.image-drop-zone.dragover {
  background: #e8f6f3;
  border-color: #1abc9c;
  transform: scale(1.02);
}

.drop-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #7f8c8d;
}

.drop-zone-icon {
  width: 48px;
  height: 48px;
  fill: #bdc3c7;
}

.image-preview-container {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.preview-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border: 2px solid white;
}

/* Nano Status Robot */
.nano-status-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  /* High z-index as requested */
  transition: transform 0.3s ease;
}

.nano-status-fab:hover {
  transform: scale(1.1);
}

.nano-status-fab img {
  width: 40px;
  height: 40px;
}

.nano-status-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid white;
  background-color: #ccc;
  /* Default gray */
}

.nano-status-dot.active {
  background-color: #4caf50;
  /* Green */
  box-shadow: 0 0 5px #4caf50;
}

.nano-tooltip {
  position: absolute;
  bottom: 70px;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  white-space: nowrap;
  display: none;
  pointer-events: none;
}

.nano-status-fab:hover .nano-tooltip {
  display: block;
}

/* AI Settings Modal */
.ai-modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 0;
  border: 1px solid #888;
  width: 80%;
  max-width: 600px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.ai-modal-header {
  padding: 15px 20px;
  background-color: #f0f0f0;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ai-modal-header h2 {
  margin: 0;
  font-size: 1.2rem;
  color: #333;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-close {
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.ai-close:hover,
.ai-close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.ai-modal-body {
  padding: 20px;
}

.ai-tabs {
  display: flex;
  border-bottom: 1px solid #ddd;
  margin-bottom: 20px;
}

.ai-tab-btn {
  background-color: inherit;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 10px 20px;
  transition: 0.3s;
  font-size: 1rem;
  color: #666;
  border-bottom: 2px solid transparent;
}

.ai-tab-btn:hover {
  background-color: #f1f1f1;
}

.ai-tab-btn.active {
  color: #75AE3A;
  border-bottom: 2px solid #75AE3A;
  font-weight: 600;
}

.ai-tab-content {
  display: none;
  animation: fadeEffect 0.5s;
}

.ai-tab-content.active {
  display: block;
}

@keyframes fadeEffect {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.ai-form-group {
  margin-bottom: 15px;
}

.ai-form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #333;
}

.ai-form-group select,
.ai-form-group input[type="text"],
.ai-form-group textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  font-family: inherit;
}

.ai-form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.ai-form-group input[type="range"] {
  width: 100%;
}

.ai-range-value {
  float: right;
  color: #75AE3A;
  font-weight: bold;
}

.ai-modal-footer {
  padding: 15px 20px;
  background-color: #f0f0f0;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  text-align: right;
}

.ai-btn-save {
  background-color: #75AE3A;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
}

.ai-btn-save:hover {
  background-color: #649630;
}

/* AI Context & Suggestions */
.ai-context-container {
  margin-top: 15px;
  border-top: 1px solid #eee;
  padding-top: 10px;
  display: none;
  /* Hidden by default */
}

.ai-context-label {
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 5px;
  display: block;
}

.ai-context-content {
  width: 100%;
  padding: 8px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.8rem;
  color: #333;
  resize: vertical;
  min-height: 60px;
}

/* Robot Pulse Animation */
@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
  }
}

.nano-status-fab.pulse {
  animation: pulse-green 2s infinite;
}

/* Product Card Styles (Restored) */
.product-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #e0e0e0;
  padding: 15px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
  height: 100%;
  box-sizing: border-box;
  margin: auto;
  width: 300px;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  font-weight: bold;
  font-size: 0.9rem;
  color: #333;
}

.card-body {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  flex-grow: 1;
}

.card-image {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 8px;
  background: #f9f9f9;
  padding: 5px;
}

.card-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.product-title {
  font-weight: 700;
  font-size: 1rem;
  color: #333;
  margin: 0;
  line-height: 1.3;
}

.product-net-content {
  font-weight: 600;
  font-size: 0.9rem;
  color: #666;
}

.score-container {
  display: flex;
  gap: 5px;
  margin-top: 5px;
}

.score-container img {
  height: 24px;
}

.card-footer {
  border-top: 1px solid #f0f0f0;
  padding-top: 10px;
  font-size: 0.85rem;
  color: #555;
  text-align: center;
}

.gpc-info {
  margin-bottom: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.card-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 10px;
}

.card-actions img,
.card-actions svg {
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.card-actions img:hover,
.card-actions svg:hover {
  opacity: 1;
}