
:root {
  --primary-color: #8b83f6;
  --secondary-color: #35259c;
  --hover-color: #9f3810;
  --background-color: #fff;
  --user-message-bg: #dcf8c6;
  --assistant-message-bg: #f1f0f0;
  --font-color: #000000;
  --link-color: #8a350d;
  --sidebar-bg: #f9f9f9;
  --button-border-radius: 48px;
  --button-shadow: 0 0px 0px rgba(0,0,0,0.0);
}

/* Overlay */
#afroditabot-chat-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  z-index: 9990;
}

/* Widget principal */
#afroditabot-chat-widget {
  position: fixed;
  bottom: 15px;
  right: 20px;
  width: 350px;
  height: 520px;
  background-color: var(--background-color);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  border-radius: 8px;
  display: none;
  flex-direction: column;
  z-index: 1000001;
  overflow: hidden;
  transition: width 0.3s, height 0.3s, top 0.3s, bottom 0.3s, left 0.3s, right 0.3s;
}
#afroditabot-chat-widget.fullscreen {
  top: 10%; left: 10%;
  bottom: auto; right: auto;
  width: 80vw; height: 80vh;
  border-radius: 8px;
}

/* Header */
#afroditabot-widget-header {
  background-color: var(--primary-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between; /* h2 a la izquierda, controles a la derecha */
  padding: 8px 12px;
}

#afroditabot-widget-header h2 {
  font-weight: bold;
  color: #fff;
  font-size: 1rem;
  margin: 0;
  padding: 0;
  line-height: 1;
}

#widget-controls {
  display: flex;
  gap: 8px;
}


/* Content y chat */
#afroditabot-widget-content {
  display: flex; flex-direction: column; flex: 1; height: 100%;
  overflow: hidden;
}
#afroditabot-chat-container {
  flex: 1; min-height: 0;
  overflow-y: auto; 
  padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
  background-color: #fff;
}

/* Input */


#afroditabot-input-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 4px;
  background: #ececec;
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
}


#afroditabot-chat-user-input {
  flex: 1;
  padding: 0 8px;
  font-size: 1rem;
  height: 36px !important;
  border: 1px solid #ccc;
  border-radius: 8px;
  outline: none;
  background-color: #ffff;
  color: #000;
  
}

#afroditabot-chat-user-input:hover {
  flex: 1;

  font-size: 1rem;
  height: 36px !important;
  border: 1px solid #ccc;
  border-radius: 4px;
  outline: none;
  background-color: #ffff;
  color: #000;
  

}

#afroditabot-send-btn {
  display: flex; /* importante para centrar el texto */
  align-items: center;
  justify-content: center;
  padding: 0 16px; /* más espacio horizontal */
  margin-left: 4px; /* separación con el input */
  font-size: 1rem;
  line-height: 1;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
  height: 36px;
  min-width: 64px; /* para evitar que sea muy pequeño */
}

#afroditabot-send-btn:hover {
  background: var(--secondary-color);
}


/* Loading */
#afroditabot-loading {
  position: absolute; inset: 0;
  background: linear-gradient(45deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6));
  display: none; justify-content: center; align-items: center;
  z-index: 9999; pointer-events: none;
}
.afroditabot-loading-container {
  display: flex; flex-direction: column; align-items: center;
}
.spinner {
  width: 40px; height: 40px;
  border: 8px solid rgba(255,255,255,0.3);
  border-top: 8px solid #fff;
  border-radius: 50%;
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 20px;
}
@keyframes spin {
  0% { transform: rotate(0deg);}
  100% { transform: rotate(360deg);}
}
#afroditabot-loading-text {
  color: #fff; font-size: 1rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
  opacity: 0; transition: opacity 0.4s;
}

/* Mensajes */

.message a[href] {
  color: var(--primary-color);
  text-decoration: underline;
}

.message {
  padding: 12px;
  border-radius: 12px;
  max-width: 80%;
  line-height: 1.4;
  font-size: 1.06rem;
  font-family: Arial, sans-serif;
  text-align: left;
  white-space: pre-wrap;
  word-wrap: break-word;
  color: #000;
}
.message.user {
  background-color: var(--user-message-bg);
  align-self: flex-end;
  border-bottom-right-radius: 0;
}
.message.assistant {
  background-color: var(--assistant-message-bg);
  align-self: flex-start;
  border-bottom-left-radius: 0;
}

/* Botón flotante */
#afroditabot-chat-button {
  position: fixed; bottom: 20px; right: 20px;
  z-index: 1000000 !important;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  background-color: var(--primary-color);
  color: #fff; font-size: 1rem;
  border-radius: var(--button-border-radius);
  cursor: pointer; box-shadow: var(--button-shadow);
  border: none; outline: none; font-weight: bold;
  animation: pulse 1.5s infinite;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
@keyframes pulse {
  0% { transform: scale(1);}
  50% { transform: scale(1.07);}
  100% { transform: scale(1);}
}
#afroditabot-chat-button:hover {
  background-color: var(--hover-color, var(--secondary-color));
  transform: scale(1.05);
}
#afroditabot-chat-button:disabled { opacity: 0.5; cursor: not-allowed; }
#afroditabot-chat-button .icon {
  position: relative;
  left: var(--afroditabot-icon-offset-x, 0px);
  display: grid;
  flex: 0 0 auto;
  width: calc(var(--afroditabot-icon-size, 20px) + 4px);
  height: calc(var(--afroditabot-icon-size, 20px) + 4px);
  margin: 0;
  place-items: center;
  border-radius: 50%;
}
#afroditabot-chat-button .icon svg,
#afroditabot-chat-button .icon img {
  display: block;
  width: var(--afroditabot-icon-size, 20px);
  height: var(--afroditabot-icon-size, 20px);
}
#afroditabot-chat-button .icon img {
  object-fit: contain;
  border-radius: 22%;
  background: transparent;
}
#afroditabot-chat-button .icon.has-image {
  width: auto;
  min-width: calc(var(--afroditabot-icon-size, 20px) + 8px);
  max-width: calc(var(--afroditabot-icon-size, 20px) * 2.8);
  padding: 3px 5px;
  border-radius: 10px;
}
#afroditabot-chat-button .icon.has-image img {
  width: auto;
  max-width: calc(var(--afroditabot-icon-size, 20px) * 2.35);
  height: var(--afroditabot-icon-size, 20px);
  border-radius: 0;
}
#afroditabot-chat-button .icon.has-image,
#afroditabot-chat-button .icon.has-image.icon-soft,
#afroditabot-chat-button .icon.has-image.icon-contrast {
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#afroditabot-chat-button .label {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#afroditabot-chat-button .icon-soft { background: rgba(255,255,255,0.18); }
#afroditabot-chat-button .icon-contrast {
  color: var(--primary-color);
  background: #fff;
  box-shadow: 0 3px 10px rgba(32,26,45,0.13);
}
#afroditabot-chat-button.outline .icon-contrast,
#afroditabot-chat-button.ghost .icon-contrast {
  color: #fff;
  background: var(--primary-color);
}
#afroditabot-chat-button.no-animation { animation: none; }
#afroditabot-chat-button[data-layout="icon"] {
  gap: 0;
  width: var(--afroditabot-button-background-width, 46px);
  min-height: var(--afroditabot-button-background-height, 46px);
  padding: 0;
}

#afroditabot-chat-button.sm { font-size: 0.85rem; padding: 4px 18px; }
#afroditabot-chat-button.md { font-size: 1rem;  padding: 8px 28px; }
#afroditabot-chat-button.lg { font-size: 1.2rem; padding: 12px 28px; }

/* Variantes de botón */
#afroditabot-chat-button.solid { background-color: var(--primary-color); color: #fff; border: none; }
#afroditabot-chat-button.outline { background-color: #fff; color: var(--primary-color); border: 1px solid var(--primary-color);}
#afroditabot-chat-button.ghost { background-color: rgba(255,255,255,0.5); color: var(--primary-color); border: none; }
#afroditabot-chat-button.shadow { box-shadow: 0 2px 8px rgba(0,0,0,0.462);}
#afroditabot-chat-button.noshadow { box-shadow: none; }

/* Responsive */
@media (max-width: 600px) {
  #afroditabot-chat-widget {
    width: 90vw;
    height: 80vh;
    left: 5vw !important;
    right: auto;
    bottom: 10px !important;
  }
  #afroditabot-chat-button {
    bottom: 10px;
    right: 10px;
  }
}


.afroditabot-widget-btn {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1.4rem;
  padding: 2px 10px;
  border-radius: 5px;
  transition: background 0.16s, color 0.16s, box-shadow 0.16s;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  
}
.afroditabot-widget-btn:hover {
  background: rgba(0,0,0,0.16);
  color: #ffe4b3;
  background: transparent;

}
#afroditabot-close-btn {
  font-size: 1.1rem;
  color: #fff;
  background: transparent;
  height: 25px; 

}
#afroditabot-close-btn:hover {
  color: #ffb3b3;
  background: transparent;

}
#afroditabot-expand-btn {
  font-size: 1.35rem;
  color: #fff;
  background: transparent;
  height: 25px; 


}
#afroditabot-expand-btn:hover {
  color: #ffe49c;
  background: transparent;
}

/* Conversación alineada visualmente con el acceso flotante */
#afroditabot-chat-overlay {
  background: rgba(30, 24, 40, 0.34);
  backdrop-filter: blur(4px);
}

#afroditabot-chat-widget {
  right: 20px;
  bottom: 24px;
  width: min(390px, calc(100vw - 32px));
  height: min(620px, calc(100vh - 72px));
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--afroditabot-widget-radius, 24px);
  background: #fff;
  box-shadow: 0 30px 90px rgba(35, 24, 54, 0.27), 0 8px 30px rgba(35, 24, 54, 0.12);
  transform-origin: bottom right;
  animation: afroditabot-panel-in 0.24s ease-out;
}

#afroditabot-chat-widget[data-position="left"] {
  transform-origin: bottom left;
}

#afroditabot-widget-header {
  min-height: 58px;
  padding: 8px 10px 8px 14px;
  box-sizing: border-box;
  background: color-mix(in srgb, var(--primary-color) 88%, #151118);
}

.afroditabot-widget-brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
}

.afroditabot-widget-brand-icon {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  overflow: visible;
  place-items: center;
  border: 0;
  border-radius: 0;
  color: #fff;
  background: transparent;
  box-shadow: none;
}

.afroditabot-widget-brand-icon svg,
.afroditabot-widget-brand-icon img {
  display: block;
  width: 28px;
  height: 28px;
}

.afroditabot-widget-brand-icon img {
  object-fit: contain;
  border-radius: 50%;
}

.afroditabot-widget-brand-icon.has-image {
  width: auto;
  max-width: 64px;
  flex-basis: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.afroditabot-widget-brand-icon.has-image img {
  width: auto;
  max-width: 50px;
  height: 22px;
  border-radius: 0;
}

.afroditabot-widget-brand-copy {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

#afroditabot-widget-header .afroditabot-widget-brand-copy h2 {
  overflow: hidden;
  color: #fff;
  font-size: 0.92rem;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.afroditabot-widget-brand-copy small {
  display: flex;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.63rem;
  font-weight: 650;
}

.afroditabot-widget-brand-copy small i {
  width: 6px;
  height: 6px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  background: #38e59c;
}

#afroditabot-widget-controls {
  display: flex;
  gap: 2px;
}

.afroditabot-widget-btn,
#afroditabot-close-btn,
#afroditabot-expand-btn {
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: transparent;
  transition: background 0.18s, transform 0.18s;
}

.afroditabot-widget-btn:hover,
#afroditabot-close-btn:hover,
#afroditabot-expand-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  transform: none;
}

.afroditabot-widget-btn[hidden] {
  display: none !important;
}

.afroditabot-widget-btn.is-active {
  background: rgba(255, 255, 255, 0.22);
}

.afroditabot-widget-btn svg {
  width: 15px;
  height: 15px;
}

#afroditabot-widget-content {
  position: relative;
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary-color) 4%, #fff), #fff 30%);
}

#afroditabot-chat-container {
  gap: 12px;
  padding: 20px 17px 16px;
  background: transparent;
  scrollbar-color: color-mix(in srgb, var(--primary-color) 25%, #d9d4e2) transparent;
  scrollbar-width: thin;
}

.afroditabot-chat-intro {
  display: grid;
  gap: 7px;
  margin-bottom: 2px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--primary-color) 12%, #ece8f1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 30px rgba(37, 27, 52, 0.06);
}

.afroditabot-chat-intro > span {
  color: var(--primary-color);
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.13em;
}

.afroditabot-chat-intro strong {
  color: #211b2c;
  font-size: 1rem;
  line-height: 1.25;
}

.afroditabot-chat-intro p {
  margin: 0;
  color: #716a7c;
  font-size: 0.76rem;
  line-height: 1.5;
}

#afroditabot-chat-container .message {
  max-width: 86%;
  padding: 11px 13px;
  border-radius: 16px;
  font-family: inherit;
  font-size: 0.84rem;
  line-height: 1.5;
  box-shadow: 0 5px 16px rgba(34, 25, 48, 0.06);
}

#afroditabot-chat-container .message.assistant {
  border: 1px solid #ebe7ef;
  border-bottom-left-radius: 5px;
  background: #fff;
}

#afroditabot-chat-container .message.user {
  border-bottom-right-radius: 5px;
  color: #fff;
  background: var(--primary-color);
}

#afroditabot-input-row {
  align-items: center;
  gap: 5px;
  padding: 5px 7px 3px;
  border-top: 1px solid #ece8f1;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: none !important;
}

#afroditabot-input-shell {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}

#afroditabot-chat-user-input,
#afroditabot-chat-user-input:hover,
#afroditabot-chat-user-input:focus {
  width: 100%;
  height: 40px !important;
  min-height: 40px;
  padding: 0 42px 0 13px;
  box-sizing: border-box;
  border: 1px solid #ddd7e5;
  border-radius: 13px;
  color: #2d2735;
  background: #faf9fc;
  box-shadow: none;
  font-size: 0.9rem;
}

#afroditabot-chat-user-input:focus {
  border-color: color-mix(in srgb, var(--primary-color) 58%, #fff);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary-color) 10%, transparent);
}

#afroditabot-mic-btn,
#afroditabot-mic-btn:hover,
#afroditabot-mic-btn:focus,
#afroditabot-mic-btn:active {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  margin: 0;
  padding: 0;
  place-items: center;
  appearance: none;
  box-sizing: border-box;
  border: 0;
  border-radius: 0;
  color: var(--primary-color);
  background: transparent;
  box-shadow: none !important;
  filter: none !important;
  transform: translateY(-50%) !important;
  cursor: pointer;
  opacity: 0.72;
}

#afroditabot-mic-btn[hidden] {
  display: none !important;
}

#afroditabot-mic-btn svg {
  width: 18px;
  height: 18px;
}

#afroditabot-mic-btn:hover,
#afroditabot-mic-btn:focus-visible {
  color: color-mix(in srgb, var(--primary-color) 82%, #111);
  background: transparent;
  opacity: 1;
}

#afroditabot-mic-btn.is-listening {
  color: var(--primary-color);
  background: transparent;
  opacity: 1;
  animation: afroditabot-mic-pulse 1.25s ease-in-out infinite;
}

#afroditabot-mic-btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary-color) 45%, transparent);
  outline-offset: 1px;
}

#afroditabot-mic-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

@keyframes afroditabot-mic-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

#afroditabot-send-btn,
#afroditabot-send-btn:hover,
#afroditabot-send-btn:focus,
#afroditabot-send-btn:active {
  gap: 5px;
  min-width: 78px;
  height: 40px !important;
  min-height: 40px !important;
  margin: 0;
  padding: 0 12px;
  box-sizing: border-box;
  border-radius: 13px;
  background: var(--primary-color);
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
  font-size: 0.7rem;
  font-weight: 800;
}

#afroditabot-send-btn svg {
  width: 14px;
  height: 14px;
}

#afroditabot-send-btn:hover {
  background: color-mix(in srgb, var(--primary-color) 86%, #fff);
}

.afroditabot-marketing-footer {
  flex: 0 0 auto;
  padding: 4px 9px 4px;
  border-top: 1px solid #f1eef4;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: none !important;
}

.afroditabot-marketing-footer a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 12px;
  padding: 0;
  border: 0;
  color: #aaa4af;
  background: transparent;
  text-decoration: none;
  transition: color 0.18s, opacity 0.18s;
}

.afroditabot-marketing-footer a:hover {
  color: var(--primary-color);
  opacity: 0.86;
}

.afroditabot-marketing-footer span,
.afroditabot-marketing-footer strong {
  font-size: 0.46rem;
  line-height: 1;
}

.afroditabot-marketing-footer span {
  color: inherit;
  font-weight: 500;
}

.afroditabot-marketing-footer strong {
  color: inherit;
  font-weight: 750;
}

.afroditabot-marketing-footer svg {
  width: 8px;
  height: 8px;
  color: inherit;
}

#afroditabot-loading {
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(5px);
}

.afroditabot-loading-container {
  min-width: 190px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  color: #332a40;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 55px rgba(37, 27, 52, 0.16);
}

#afroditabot-loading .spinner {
  width: 28px;
  height: 28px;
  margin-bottom: 12px;
  border-width: 3px;
  border-color: color-mix(in srgb, var(--primary-color) 18%, #eee);
  border-top-color: var(--primary-color);
}

#afroditabot-loading-text {
  color: #5f5669;
  text-shadow: none;
  font-size: 0.75rem;
  font-weight: 700;
}

#afroditabot-chat-widget.fullscreen {
  top: 5%;
  left: 8%;
  width: 84vw;
  height: 90vh;
  border-radius: var(--afroditabot-widget-radius, 24px);
}

@keyframes afroditabot-panel-in {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 600px) {
  #afroditabot-chat-widget {
    top: auto !important;
    right: 10px !important;
    bottom: 10px !important;
    left: 10px !important;
    width: auto;
    height: min(720px, calc(100vh - 20px));
    border-radius: 22px;
  }

  #afroditabot-send-btn {
    min-width: 46px;
    padding: 0;
  }

  #afroditabot-send-btn span {
    display: none;
  }
}

/* Acciones comerciales: compactas, accesibles y separadas de la conversación. */
#afroditabot-commercial {
  flex: 0 0 auto;
  max-height: 285px;
  overflow: auto;
  padding: 9px 10px 8px;
  border-top: 1px solid #ece8f1;
  background: color-mix(in srgb, var(--primary-color) 3%, #fff);
  scrollbar-width: thin;
}

#afroditabot-commercial[hidden] {
  display: none !important;
}

.afroditabot-commercial-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 2px 7px;
}

.afroditabot-commercial-heading strong,
.afroditabot-commercial-heading small {
  display: block;
}

.afroditabot-commercial-heading strong {
  color: #2d2735;
  font-size: 0.72rem;
  line-height: 1.2;
}

.afroditabot-commercial-heading small {
  margin-top: 2px;
  color: #827a8c;
  font-size: 0.59rem;
}

.afroditabot-commercial-actions {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 1px 1px 3px;
  scrollbar-width: none;
}

.afroditabot-commercial-actions::-webkit-scrollbar {
  display: none;
}

.afroditabot-commercial-action {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  margin: 0;
  padding: 0 9px;
  border: 1px solid color-mix(in srgb, var(--primary-color) 18%, #e5e0e9);
  border-radius: 999px;
  color: color-mix(in srgb, var(--primary-color) 78%, #28212f);
  background: #fff;
  box-shadow: none;
  font-family: inherit;
  font-size: 0.63rem;
  font-weight: 780;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s, transform 0.16s;
}

.afroditabot-commercial-action:hover,
.afroditabot-commercial-action:focus-visible {
  border-color: color-mix(in srgb, var(--primary-color) 48%, #fff);
  color: var(--primary-color);
  background: color-mix(in srgb, var(--primary-color) 5%, #fff);
  transform: translateY(-1px);
  outline: none;
}

.afroditabot-commercial-action svg {
  width: 14px;
  height: 14px;
  stroke-width: 1.8;
}

.afroditabot-booking-dialog {
  box-sizing: border-box;
  width: min(960px, 96vw);
  max-width: 96vw;
  height: min(850px, 92dvh);
  max-height: 92dvh;
  margin: auto;
  padding: 20px;
  border: 1px solid #d9dfe7;
  border-radius: 16px;
  background: #fff;
  color: #192334;
  font: 14px/1.5 system-ui, sans-serif;
}
.afroditabot-booking-dialog[open] { display: flex; flex-direction: column; gap: 10px; }
.afroditabot-booking-dialog::backdrop { background: rgb(15 23 42 / 55%); }
.afroditabot-booking-dialog p { margin: 0; }
.afroditabot-booking-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.afroditabot-booking-dialog iframe { width: 100%; min-height: 200px; flex: 1; border: 0; background: #fff; }
.afroditabot-booking-dialog a { color: #2450a0; text-decoration: underline; }
.afroditabot-commercial-panel {
  display: grid;
  gap: 8px;
}

.afroditabot-commercial-panel-head {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #2d2735;
  font-size: 0.72rem;
}

.afroditabot-commercial-back {
  display: grid;
  width: 27px;
  height: 27px;
  margin: 0;
  padding: 0;
  place-items: center;
  border: 1px solid #e5e0e9;
  border-radius: 9px;
  color: #5f5669;
  background: #fff;
  box-shadow: none;
  font: 700 1.2rem/1 inherit;
  cursor: pointer;
}

.afroditabot-commercial-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.afroditabot-commercial-field {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: #5f5669;
  font-size: 0.59rem;
  font-weight: 720;
}

.afroditabot-commercial-field:has(textarea),
.afroditabot-commercial-consent,
.afroditabot-commercial-submit,
.afroditabot-commercial-status,
.afroditabot-order-result {
  grid-column: 1 / -1;
}

.afroditabot-commercial-field input,
.afroditabot-commercial-field textarea,
.afroditabot-commercial-search input {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 7px 9px;
  box-sizing: border-box;
  border: 1px solid #ddd7e5;
  border-radius: 10px;
  color: #2d2735;
  background: #fff;
  box-shadow: none;
  font: 500 0.7rem/1.3 inherit;
  outline: none;
}

.afroditabot-commercial-field input {
  height: 34px;
}

.afroditabot-commercial-field textarea {
  min-height: 54px;
  resize: vertical;
}

.afroditabot-commercial-field input:focus,
.afroditabot-commercial-field textarea:focus,
.afroditabot-commercial-search input:focus {
  border-color: color-mix(in srgb, var(--primary-color) 54%, #fff);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary-color) 9%, transparent);
}

.afroditabot-commercial-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.afroditabot-commercial-consent {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: #746c7e;
  font-size: 0.56rem;
  line-height: 1.35;
}

.afroditabot-commercial-consent input {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  margin: 1px 0 0;
  accent-color: var(--primary-color);
}

.afroditabot-commercial-consent a {
  color: var(--primary-color);
}

.afroditabot-commercial-submit,
.afroditabot-commercial-search button {
  min-height: 34px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--primary-color);
  box-shadow: none;
  font-family: inherit;
  font-size: 0.67rem;
  font-weight: 800;
  cursor: pointer;
}

.afroditabot-commercial-submit:disabled,
.afroditabot-commercial-search button:disabled {
  opacity: 0.58;
  cursor: wait;
}

.afroditabot-commercial-status {
  margin: 0;
  padding: 8px 9px;
  border-radius: 9px;
  color: #665e70;
  background: #f4f1f6;
  font-size: 0.63rem;
  line-height: 1.4;
}

.afroditabot-commercial-status.is-success {
  color: #0e6b4a;
  background: #e7f7f0;
}

.afroditabot-commercial-status.is-error {
  color: #9a3044;
  background: #ffedf1;
}

.afroditabot-commercial-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
}

.afroditabot-product-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.afroditabot-product-card {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 6px;
  border: 1px solid #e7e2eb;
  border-radius: 11px;
  color: #332b3d;
  background: #fff;
  text-decoration: none;
}

.afroditabot-product-card img {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

.afroditabot-product-card span,
.afroditabot-order-result {
  display: grid;
  min-width: 0;
}

.afroditabot-product-card strong {
  overflow: hidden;
  font-size: 0.61rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.afroditabot-product-card small,
.afroditabot-order-result span {
  color: #7c7486;
  font-size: 0.56rem;
}

.afroditabot-order-result {
  gap: 3px;
  padding: 9px;
  border: 1px solid color-mix(in srgb, var(--primary-color) 16%, #e7e2eb);
  border-radius: 11px;
  color: #332b3d;
  background: color-mix(in srgb, var(--primary-color) 4%, #fff);
  font-size: 0.68rem;
}

@media (max-width: 420px) {
  #afroditabot-commercial {
    max-height: 310px;
  }

  .afroditabot-commercial-form,
  .afroditabot-product-results {
    grid-template-columns: 1fr;
  }

  .afroditabot-commercial-field,
  .afroditabot-commercial-consent,
  .afroditabot-commercial-submit,
  .afroditabot-commercial-status,
  .afroditabot-order-result {
    grid-column: 1;
  }
}
