/* Noga Diamonds concierge widget. All rules are scoped under .noga-cc.
   Colors can be overridden from the site's design system through the --noga-cc-* tokens. */
.noga-cc {
  --noga-cc-bg: #fbfaf7;
  --noga-cc-surface: #ffffff;
  --noga-cc-text: #1d1c1a;
  --noga-cc-muted: #5e5a54;
  --noga-cc-accent: #1d1c1a;
  --noga-cc-accent-text: #fbfaf7;
  --noga-cc-user: #ece8e0;
  --noga-cc-border: #d9d4ca;
  --noga-cc-error: #8a1c1c;
  --noga-cc-focus: #3a6ea5;
  --noga-cc-radius: 14px;
  --noga-cc-font: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  --noga-cc-title-font: "Cormorant Garamond", Georgia, serif;
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 2147483000;
  font-family: var(--noga-cc-font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--noga-cc-text);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .noga-cc {
    --noga-cc-bg: #171614;
    --noga-cc-surface: #201f1c;
    --noga-cc-text: #f1eee8;
    --noga-cc-muted: #b4aea4;
    --noga-cc-accent: #f1eee8;
    --noga-cc-accent-text: #171614;
    --noga-cc-user: #2e2c28;
    --noga-cc-border: #3b3833;
    --noga-cc-error: #f0a3a3;
    --noga-cc-focus: #8ab4e8;
  }
}
:root[data-theme="dark"] .noga-cc {
  --noga-cc-bg: #171614;
  --noga-cc-surface: #201f1c;
  --noga-cc-text: #f1eee8;
  --noga-cc-muted: #b4aea4;
  --noga-cc-accent: #f1eee8;
  --noga-cc-accent-text: #171614;
  --noga-cc-user: #2e2c28;
  --noga-cc-border: #3b3833;
  --noga-cc-error: #f0a3a3;
  --noga-cc-focus: #8ab4e8;
}

.noga-cc *, .noga-cc *::before, .noga-cc *::after { box-sizing: border-box; }

.noga-cc-launcher {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid var(--noga-cc-accent);
  border-radius: 999px;
  background: var(--noga-cc-accent);
  color: var(--noga-cc-accent-text);
  font: inherit;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.noga-cc-launcher:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22); }
.noga-cc-launcher-icon {
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  border: 1.5px solid currentColor;
}
.noga-cc--open .noga-cc-launcher { display: none; }

.noga-cc-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(380px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 32px));
  height: min(560px, calc(100dvh - 32px));
  background: var(--noga-cc-bg);
  border: 1px solid var(--noga-cc-border);
  border-radius: var(--noga-cc-radius);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  animation: noga-cc-in 0.22s ease-out;
}
.noga-cc-panel[hidden] { display: none; }
@keyframes noga-cc-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.noga-cc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 12px 12px 18px;
  border-bottom: 1px solid var(--noga-cc-border);
}
.noga-cc-title {
  margin: 0;
  font-family: var(--noga-cc-title-font);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
}
.noga-cc-close {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.noga-cc-close:hover { background: var(--noga-cc-user); }

.noga-cc-log {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overscroll-behavior: contain;
}
.noga-cc-msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 12px;
  overflow-wrap: anywhere;
}
.noga-cc-msg p { margin: 0; }
.noga-cc-msg p + p { margin-top: 0.6em; }
.noga-cc-msg a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.noga-cc-msg--assistant { align-self: flex-start; background: var(--noga-cc-surface); border: 1px solid var(--noga-cc-border); }
.noga-cc-msg--user { align-self: flex-end; background: var(--noga-cc-user); }
.noga-cc-msg--error { color: var(--noga-cc-error); border-color: currentColor; }

.noga-cc-typing { display: inline-flex; gap: 5px; padding: 14px; }
.noga-cc-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--noga-cc-muted);
  animation: noga-cc-blink 1.2s infinite ease-in-out;
}
.noga-cc-dot:nth-child(2) { animation-delay: 0.15s; }
.noga-cc-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes noga-cc-blink {
  0%, 80%, 100% { opacity: 0.25; }
  40% { opacity: 1; }
}

.noga-cc-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px 6px;
  border-top: 1px solid var(--noga-cc-border);
}
.noga-cc-input {
  flex: 1;
  min-height: 44px;
  max-height: 140px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid var(--noga-cc-border);
  border-radius: 10px;
  background: var(--noga-cc-surface);
  color: inherit;
  font: inherit;
}
.noga-cc-send {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: var(--noga-cc-accent);
  color: var(--noga-cc-accent-text);
  font: inherit;
  cursor: pointer;
}
.noga-cc-send:disabled { opacity: 0.55; cursor: progress; }

.noga-cc-disclaimer {
  margin: 0;
  padding: 0 14px 10px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--noga-cc-muted);
}

.noga-cc button:focus-visible,
.noga-cc textarea:focus-visible,
.noga-cc a:focus-visible,
.noga-cc-log:focus-visible {
  outline: 2px solid var(--noga-cc-focus);
  outline-offset: 2px;
}

.noga-cc-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 480px) {
  .noga-cc { right: 12px; bottom: 12px; }
  .noga-cc--open { left: 12px; top: 12px; }
  .noga-cc-panel { width: 100%; height: 100%; position: absolute; inset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .noga-cc-launcher, .noga-cc-panel, .noga-cc-dot { animation: none; transition: none; }
  .noga-cc-launcher:hover { transform: none; }
  .noga-cc-dot { opacity: 0.6; }
}
