.ggi-guide-chat {
  --ggi-brand: #109188;
  --ggi-brand-dark: #0d746c;
  max-width: 760px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  background: #f8fafc;
}

.ggi-guide-chat [hidden] {
  display: none !important;
}

.ggi-guide-chat__messages {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.ggi-guide-chat__bubble {
  border-radius: 10px;
  padding: 10px 12px;
  line-height: 1.4;
}

.ggi-guide-chat__bubble--user {
  background: #0f2235;
  color: #fff;
}

.ggi-guide-chat__bubble--error {
  background: #fee2e2;
  color: #7f1d1d;
}

.ggi-guide-chat__bubble--system {
  background: #eef2ff;
  color: #1e293b;
}

.ggi-guide-chat__card {
  background: #fff;
  border: 1px solid #dbe4ee;
  border-radius: 12px;
  padding: 14px;
}

.ggi-guide-chat__summary {
  margin: 0 0 10px;
  font-weight: 500;
  line-height: 1.6;
}

.ggi-guide-chat__summary:last-child {
  margin-bottom: 0;
}

.ggi-guide-chat__rich a {
  color: var(--ggi-brand-dark);
  text-decoration: underline;
}

.ggi-guide-chat__list {
  margin: 0 0 10px 18px;
  padding: 0;
}

.ggi-guide-chat__item {
  margin: 0 0 6px;
  line-height: 1.5;
}

.ggi-guide-chat__item:last-child {
  margin-bottom: 0;
}

.ggi-guide-chat__loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 8px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
}

.ggi-guide-chat__loading::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid #bcd7d4;
  border-top-color: var(--ggi-brand);
  animation: ggi-guide-spin 0.8s linear infinite;
}

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

.ggi-guide-chat__contacts {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.ggi-guide-chat__contacts-toggle {
  align-self: start;
  border: 1px solid var(--ggi-brand) !important;
  border-radius: 999px !important;
  background: var(--ggi-brand) !important;
  color: #fff !important;
  font-weight: 700 !important;
  padding: 8px 14px !important;
  cursor: pointer !important;
}

.ggi-guide-chat__contacts-toggle:hover {
  background: var(--ggi-brand-dark) !important;
  border-color: var(--ggi-brand-dark) !important;
}

.ggi-guide-chat__contacts-panel {
  display: grid;
  gap: 10px;
}

.ggi-guide-chat__contact-card {
  border: 1px solid #d6deea;
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px;
}

.ggi-guide-chat__contact-title {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.3;
}

.ggi-guide-chat__contact-row {
  margin: 0 0 6px;
  line-height: 1.45;
}

.ggi-guide-chat__contact-row:last-child {
  margin-bottom: 0;
}

.ggi-guide-chat__form {
  display: grid;
  gap: 8px;
}

.ggi-guide-chat__form textarea {
  width: 100%;
  min-height: 100px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px;
  resize: vertical;
}

.ggi-guide-chat .ggi-guide-chat__send,
.ggi-guide-chat button.ggi-guide-chat__send,
.ggi-guide-chat button[type="submit"].ggi-guide-chat__send {
  border: 1px solid var(--ggi-brand) !important;
  border-radius: 10px !important;
  background: var(--ggi-brand) !important;
  color: #fff !important;
  font-weight: 700 !important;
  text-shadow: none !important;
  box-shadow: none !important;
  opacity: 1 !important;
  filter: none !important;
  padding: 10px 16px !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.ggi-guide-chat .ggi-guide-chat__send:hover,
.ggi-guide-chat button.ggi-guide-chat__send:hover,
.ggi-guide-chat button[type="submit"].ggi-guide-chat__send:hover {
  background: var(--ggi-brand-dark) !important;
  border-color: var(--ggi-brand-dark) !important;
  color: #fff !important;
}

.ggi-guide-chat .ggi-guide-chat__send:disabled,
.ggi-guide-chat button.ggi-guide-chat__send:disabled,
.ggi-guide-chat button[type="submit"].ggi-guide-chat__send:disabled {
  background: var(--ggi-brand) !important;
  border-color: var(--ggi-brand) !important;
  color: #fff !important;
  opacity: 1 !important;
  filter: none !important;
  cursor: not-allowed !important;
}

.ggi-guide-chat__hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  width: 0;
  height: 0;
}

.ggi-guide-chat__final-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
}

.ggi-guide-chat__final-btn {
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  text-decoration: none;
  border: none;
}

.ggi-guide-chat__final-btn--secondary {
  background: #e2e8f0;
  color: #0f172a;
  cursor: pointer;
}

.ggi-guide-chat__final-btn--secondary:hover {
  background: #cbd5e1;
}

.ggi-guide-chat__feedback {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  display: grid;
  gap: 8px;
}

.ggi-guide-chat__feedback-title {
  font-size: 13px;
  color: #334155;
}

.ggi-guide-chat__feedback-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ggi-guide-chat__stars {
  display: inline-flex;
  gap: 4px;
}

.ggi-guide-chat__star {
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #cbd5e1 !important;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px !important;
  box-shadow: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.ggi-guide-chat__star:hover,
.ggi-guide-chat__star.is-active {
  color: #f59e0b;
}

.ggi-guide-chat__feedback-status {
  font-size: 13px;
  color: #0f766e;
  min-height: 18px;
}

.ggi-guide-chat__report-btn {
  margin-left: 6px;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #334155 !important;
  text-decoration: none !important;
  padding: 6px 10px !important;
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer !important;
  box-shadow: none !important;
}

.ggi-guide-chat__report-btn:hover {
  border-color: #94a3b8 !important;
  background: #f8fafc !important;
  text-decoration: none !important;
}

.ggi-guide-chat__modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  padding: 12px;
}

.ggi-guide-chat__modal {
  width: min(560px, 100%);
  background: #fff;
  border-radius: 12px;
  border: 1px solid #dbe4ee;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.ggi-guide-chat__modal-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.ggi-guide-chat__modal-text {
  width: 100%;
  min-height: 120px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px;
  resize: vertical;
}

.ggi-guide-chat__modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.ggi-guide-chat__modal-btn {
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
}

.ggi-guide-chat__modal-btn--light {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
}

.ggi-guide-chat__modal-btn--primary {
  border: 1px solid var(--ggi-brand);
  background: var(--ggi-brand);
  color: #fff;
}

.ggi-guide-chat__modal-btn--primary:hover {
  border-color: var(--ggi-brand-dark);
  background: var(--ggi-brand-dark);
}

@media (max-width: 680px) {
  .ggi-guide-chat {
    padding: 12px;
    border-radius: 12px;
  }
}
