﻿.aniefcb-widget {
  --aniefcb-primary: #1b615a;
  --aniefcb-primary-gradient: #244b46;
  --aniefcb-secondary: #f7f6f2;
  --aniefcb-accent: #f4b13d;
  --aniefcb-text: #1c1f23;
  --aniefcb-muted: #5d6b73;
  --aniefcb-bg: #ffffff;
  --aniefcb-border: #d5d9dd;
  --aniefcb-guest-bubble: #1b615a;
  --aniefcb-guest-text: #ffffff;
  --aniefcb-guest-border-color: #1b615a;
  --aniefcb-guest-border-width: 1px;
  --aniefcb-bot-bubble: #ffffff;
  --aniefcb-bot-text: #1c1f23;
  --aniefcb-bot-border-color: #d5d9dd;
  --aniefcb-bot-border-width: 1px;
  --aniefcb-system-bubble: #fff3cd;
  --aniefcb-system-text: #856404;
  --aniefcb-system-border-color: #ffeeba;
  --aniefcb-system-border-width: 1px;
  --aniefcb-button-bg: #f4b13d;
  --aniefcb-button-text: #2a2a2a;
  --aniefcb-admin-area: #f8fafc;
  --aniefcb-disabled-text: #9ca3af;
  --aniefcb-header-icon-color: #ffffff;
  --aniefcb-label-bg: #111827;
  --aniefcb-label-text: #ffffff;
  --aniefcb-radius: 16px;
  --aniefcb-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  --aniefcb-font: "DM Sans", "Segoe UI", sans-serif;
  --aniefcb-spacing: 12px;
  --aniefcb-panel-width: 360px;
  --aniefcb-panel-height: 520px;
  --aniefcb-panel-border-width: 0px;
  --aniefcb-disabled-bg: #e5e7eb;
  --aniefcb-header-icon-size: 24px;
  border: none !important;
  outline: none !important;
  font-family: var(--aniefcb-font);
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2147483647;
  color: var(--aniefcb-text);
}

.aniefcb-widget,
.aniefcb-widget * {
  box-sizing: border-box;
}

.aniefcb-widget button,
.aniefcb-widget input,
.aniefcb-widget textarea,
.aniefcb-widget select {
  font-family: var(--aniefcb-font);
  line-height: 1.2;
  margin: 0;
}

.aniefcb-widget.aniefcb-left {
  left: 24px;
  right: auto;
}

.aniefcb-widget[data-mode="inline"] {
  position: relative;
  bottom: auto;
  right: auto;
  left: auto;
  margin: 24px 0;
}

.aniefcb-toggle {
  background: var(--aniefcb-primary);
  color: #fff;
  border: none;
  padding: 12px 16px;
  border-radius: 999px;
  box-shadow: var(--aniefcb-shadow);
  cursor: pointer;
  font-size: 14px;
  letter-spacing: 0.5px;
  position: relative;
}

.aniefcb-toggle.has-icon {
  padding: 0;
  width: var(--aniefcb-toggle-icon-size, 56px);
  height: var(--aniefcb-toggle-icon-size, 56px);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.aniefcb-toggle-icon {
  display: inline-flex;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
}

.aniefcb-toggle-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.aniefcb-toggle.has-icon .aniefcb-toggle-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.aniefcb-panel {
  width: var(--aniefcb-panel-width);
  max-width: calc(100vw - 32px);
  height: var(--aniefcb-panel-height);
  max-height: calc(100vh - 80px);
  background: var(--aniefcb-bg);
  border-radius: var(--aniefcb-radius);
  box-shadow: var(--aniefcb-shadow);
  border: var(--aniefcb-panel-border-width) solid var(--aniefcb-border) !important;
  margin-top: 12px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  outline: none !important;
}

.aniefcb-panel.is-open {
  display: flex;
  animation: aniefcb-fade-in 0.25s ease;
}

.aniefcb-panel:focus {
  outline: none !important;
}

.aniefcb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(120deg, var(--aniefcb-primary), var(--aniefcb-primary-gradient));
  color: #fff;
}

.aniefcb-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.aniefcb-header-actions button {
  background: transparent;
  color: var(--aniefcb-header-icon-color, #fff);
  border: none;
  margin-left: 8px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  position: relative;
}

.aniefcb-header-icon {
  height: var(--aniefcb-header-icon-size, 24px);
  width: auto;
  max-width: 160px;
  border-radius: 0;
  overflow: visible;
  display: none;
  align-items: center;
  justify-content: center;
}

.aniefcb-header.has-icon .aniefcb-header-icon {
  display: inline-flex;
}

.aniefcb-header-icon img {
  height: 100%;
  width: auto;
  object-fit: contain;
  display: block;
}

.aniefcb-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.aniefcb-messages {
  padding: 16px 16px;
  overflow-y: auto;
  flex: 1;
  background: var(--aniefcb-secondary);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.aniefcb-message {
  padding: 10px 12px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  max-width: 80%;
  position: relative;
  white-space: pre-line;
  word-break: break-word;
}

.aniefcb-message.aniefcb-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.aniefcb-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(15, 23, 42, 0.2);
  border-top-color: var(--aniefcb-primary);
  border-radius: 50%;
  animation: aniefcb-spin 0.8s linear infinite;
  flex: 0 0 auto;
}

.aniefcb-message.bot {
  background: var(--aniefcb-bot-bubble);
  color: var(--aniefcb-bot-text);
  border: var(--aniefcb-bot-border-width) solid var(--aniefcb-bot-border-color);
  align-self: flex-start;
  border-top-left-radius: 6px;
}

.aniefcb-message.user {
  background: var(--aniefcb-guest-bubble);
  color: var(--aniefcb-guest-text);
  border: var(--aniefcb-guest-border-width) solid var(--aniefcb-guest-border-color);
  align-self: flex-end;
  border-top-right-radius: 6px;
}

.aniefcb-message.system {
  background: var(--aniefcb-system-bubble);
  color: var(--aniefcb-system-text);
  border: var(--aniefcb-system-border-width) solid var(--aniefcb-system-border-color);
  align-self: center;
}

.aniefcb-message.is-disabled,
.aniefcb-submit.is-disabled,
.aniefcb-option.is-disabled {
  position: relative;
}

.aniefcb-disabled-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
  margin-left: 6px;
  vertical-align: middle;
}

.aniefcb-message.bot::after {
  content: '';
  position: absolute;
  left: -9px;
  top: 6px;
  border-width: 8px 10px 8px 0;
  border-style: solid;
  border-color: transparent var(--aniefcb-bot-bubble) transparent transparent;
}

.aniefcb-message.user::after {
  content: '';
  position: absolute;
  right: -9px;
  top: 6px;
  border-width: 8px 0 8px 10px;
  border-style: solid;
  border-color: transparent transparent transparent var(--aniefcb-guest-bubble);
}

.aniefcb-message p {
  margin: 0;
}

.aniefcb-message ul,
.aniefcb-message ol {
  margin: 0;
  padding-left: 18px;
}

.aniefcb-message li {
  margin: 0;
}

.aniefcb-input {
  padding: 0px 0px;
  border-top: 1px solid var(--aniefcb-border);
  background: var(--aniefcb-bg);
}

.aniefcb-input-area {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.aniefcb-text {
  flex: 1 1 auto;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--aniefcb-border);
  background: var(--aniefcb-bg);
  color: var(--aniefcb-text);
}

.aniefcb-select {
  flex: 1 1 auto;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--aniefcb-border);
  background: var(--aniefcb-bg);
  color: var(--aniefcb-text);
}

.aniefcb-submit,
.aniefcb-option {
  background: var(--aniefcb-button-bg);
  color: var(--aniefcb-button-text);
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.aniefcb-download-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  background-color: currentColor;
  mask: var(--aniefcb-download-icon-url) no-repeat center / contain;
  -webkit-mask: var(--aniefcb-download-icon-url) no-repeat center / contain;
}

.aniefcb-option.selected {
  background: var(--aniefcb-primary);
  color: #fff;
}

.aniefcb-option.is-disabled {
  background: #e5e7eb;
  color: #6b7280;
  cursor: not-allowed;
}

.aniefcb-option.is-dev {
  background: #e5e7eb;
  color: #6b7280;
  border: 1px solid #cbd5f5;
}

.aniefcb-dev-node .aniefcb-message.is-dev {
  background: #e5e7eb;
  color: #6b7280;
}

.aniefcb-dev-node .aniefcb-submit,
.aniefcb-dev-node .aniefcb-text,
.aniefcb-dev-node .aniefcb-select,
.aniefcb-dev-node textarea {
  background: #f1f5f9;
  color: #6b7280;
  border-color: #cbd5f5;
}

.aniefcb-submit:disabled,
.aniefcb-option:disabled {
  background: var(--aniefcb-disabled-bg);
  color: var(--aniefcb-disabled-text);
  cursor: not-allowed;
}

.aniefcb-submit.is-loading {
  cursor: progress;
  opacity: 0.9;
}

.aniefcb-button-label {
  position: relative;
  z-index: 2;
}

.aniefcb-progress {
  position: absolute;
  inset: 0;
  width: 0%;
  background: rgba(255, 255, 255, 0.35);
  z-index: 1;
  transition: width 0.15s ease;
}

.aniefcb-widget button:focus,
.aniefcb-widget input:focus,
.aniefcb-widget textarea:focus,
.aniefcb-widget select:focus {
  outline: 2px solid var(--aniefcb-accent);
  outline-offset: 2px;
}

.aniefcb-choice {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.aniefcb-booking-choice {
  flex-direction: column;
  align-items: stretch;
}

.aniefcb-booking-choice .aniefcb-text,
.aniefcb-booking-choice .aniefcb-select,
.aniefcb-booking-choice textarea {
  width: 100%;
}

.aniefcb-booking-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.aniefcb-submit-ghost {
  background: transparent;
  color: var(--aniefcb-text);
  border: 1px solid var(--aniefcb-border);
}

.aniefcb-file {
  color: var(--aniefcb-text);
  border: none;
  background: transparent;
  font-size: 13px;
  font-family: inherit;
  max-width: 100%;
}

.aniefcb-file::file-selector-button {
  background: var(--aniefcb-button-bg);
  color: var(--aniefcb-button-text);
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  margin-right: 8px;
}

.aniefcb-file::-webkit-file-upload-button {
  background: var(--aniefcb-button-bg);
  color: var(--aniefcb-button-text);
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  margin-right: 8px;
}

.aniefcb-file:disabled::file-selector-button,
.aniefcb-file:disabled::-webkit-file-upload-button {
  background: var(--aniefcb-border);
  color: var(--aniefcb-disabled-text);
  cursor: not-allowed;
}

.aniefcb-admin-edit {
  padding: 8px 16px 16px;
  background: var(--aniefcb-admin-area);
  border-top: 1px solid var(--aniefcb-border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.aniefcb-admin-edit[hidden] {
  display: none !important;
}

.aniefcb-footer {
  padding: 6px 16px 12px;
  background: var(--aniefcb-bg);
  border-top: 1px solid var(--aniefcb-border);
  text-align: center;
  font-size: 11px;
  color: var(--aniefcb-muted);
}

.aniefcb-noscript {
  margin-top: 12px;
  background: #fff3cd;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
}

.aniefcb-modal {
  position: fixed;
  inset: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.aniefcb-modal-content {
  background: var(--aniefcb-bg);
  color: var(--aniefcb-text);
  padding: 16px;
  border-radius: 12px;
  width: min(90vw, 420px);
  max-height: 80vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aniefcb-modal-content label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.aniefcb-modal-content input,
.aniefcb-modal-content textarea,
.aniefcb-modal-content select {
  width: 100%;
  border: 1px solid var(--aniefcb-border);
  border-radius: 6px;
  padding: 6px 8px;
  background: var(--aniefcb-bg);
  color: var(--aniefcb-text);
}

.aniefcb-modal-actions {
  display: flex;
  gap: 8px;
}

.aniefcb-modal-error {
  background: #fee2e2;
  color: #7f1d1d;
  border: 1px solid #fecaca;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12px;
}

.aniefcb-toggle[data-tooltip]:hover::after,
.aniefcb-toggle[data-tooltip]:focus::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--aniefcb-label-bg);
  color: var(--aniefcb-label-text);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.aniefcb-toggle[data-tooltip]:hover::before,
.aniefcb-toggle[data-tooltip]:focus::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 6px 0 6px;
  border-style: solid;
  border-color: var(--aniefcb-label-bg) transparent transparent transparent;
  pointer-events: none;
}

.aniefcb-header-actions button[data-tooltip]:hover::after,
.aniefcb-header-actions button[data-tooltip]:focus::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--aniefcb-label-bg);
  color: var(--aniefcb-label-text);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
  z-index: 2;
}

.aniefcb-header-actions button[data-tooltip]:hover::before,
.aniefcb-header-actions button[data-tooltip]:focus::before {
  content: '';
  display: none;
}

.aniefcb-dark {
  --aniefcb-bg: #0f1418;
  --aniefcb-secondary: #171c20;
  --aniefcb-text: #eef2f5;
  --aniefcb-muted: #9aa3ad;
  --aniefcb-border: #2a3137;
  --aniefcb-primary: #1f7a70;
  --aniefcb-primary-gradient: #12423d;
  --aniefcb-accent: #f4b13d;
  --aniefcb-guest-bubble: #1f7a70;
  --aniefcb-guest-text: #f8fafc;
  --aniefcb-guest-border-color: #1f7a70;
  --aniefcb-guest-border-width: 1px;
  --aniefcb-bot-bubble: #1a2026;
  --aniefcb-bot-text: #e5e7eb;
  --aniefcb-bot-border-color: #2a3137;
  --aniefcb-bot-border-width: 1px;
  --aniefcb-system-bubble: #1f2937;
  --aniefcb-system-text: #f9fafb;
  --aniefcb-system-border-color: #374151;
  --aniefcb-system-border-width: 1px;
  --aniefcb-button-bg: #f4b13d;
  --aniefcb-button-text: #1b1f23;
  --aniefcb-admin-area: #11161b;
  --aniefcb-disabled-text: #6b7280;
  --aniefcb-header-icon-color: #f9fafb;
  --aniefcb-label-bg: #0b0f12;
  --aniefcb-label-text: #f9fafb;
  --aniefcb-disabled-bg: #374151;
}

@keyframes aniefcb-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes aniefcb-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .aniefcb-widget {
    right: 12px;
    left: auto;
    bottom: 12px;
  }
  .aniefcb-widget[data-mode="floating"] .aniefcb-panel {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: 100vw;
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
    margin: 0;
  }
}
