/* DRYCON AI Chat – Külső stíluslap (100% CSP style-src 'self', 1-oldalas teljes képernyős illeszkedés) */
.chat-page-main {
  padding-top: 86px;
  padding-bottom: 10px;
}
.chat-page-inner {
  width: 100%;
}
.chat-heading-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 8px;
  flex-shrink: 0;
}
.chat-legal-note {
  margin-top: 7px;
  margin-bottom: 0;
  font-size: 11px;
  line-height: 1.35;
  flex-shrink: 0;
}
.chat-shell {
  background: linear-gradient(180deg, rgba(16, 33, 58, 0.96) 0%, rgba(11, 23, 42, 0.98) 100%);
  border: 1px solid rgba(74, 144, 217, 0.24);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.chat-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 18px;
  background: rgba(8, 17, 32, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.chat-avatar {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(74, 144, 217, 0.16);
  border: 1px solid rgba(74, 144, 217, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6ab0f3;
  flex-shrink: 0;
}
.chat-brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-status-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 2px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.62);
}
.chat-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-gate-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 4px;
}
#chat-gate-lead {
  margin-bottom: 10px;
}
#chat-quick-bar {
  padding: 9px 18px;
  gap: 7px;
  background: rgba(8, 17, 32, 0.55);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  flex-shrink: 0;
}
.chat-quick-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.42);
  margin-right: 4px;
}
.chat-chip {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(74, 144, 217, 0.10);
  border: 1px solid rgba(74, 144, 217, 0.28);
  border-radius: 9999px;
  padding: 6px 13px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.chat-chip:hover:not(:disabled) {
  background: rgba(74, 144, 217, 0.24);
  border-color: rgba(74, 144, 217, 0.55);
  color: #ffffff;
}
.chat-chip:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.chat-ctrl-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 6px 11px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.chat-ctrl-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
}
.chat-ctrl-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
.chat-ctrl-btn[hidden] {
  display: none !important;
}
.chat-ctrl-finish {
  color: #cfe5ff;
  background: rgba(74, 144, 217, 0.14);
  border-color: rgba(74, 144, 217, 0.38);
}
.chat-ctrl-finish:hover:not(:disabled) {
  background: rgba(74, 144, 217, 0.26);
  border-color: rgba(122, 184, 245, 0.65);
  color: #ffffff;
}
.chat-stage {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
}
#drycon-chat-mount {
  width: 100%;
  height: clamp(390px, calc(100vh - 255px), 680px);
  height: clamp(390px, calc(100dvh - 255px), 680px);
  min-height: 390px;
}
deep-chat#drycon-chat {
  display: block;
  width: 100% !important;
  height: 100% !important;
  background-color: transparent !important;
  border: none !important;
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
}
.chat-bot-gate {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  overflow-y: auto;
  background: rgba(9, 19, 36, 0.86);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: opacity 0.22s ease;
}
.chat-bot-gate[hidden] {
  display: none !important;
}
.chat-gate-card {
  width: 100%;
  max-width: 540px;
  margin: auto;
  background: #0f2038;
  border: 1px solid rgba(74, 144, 217, 0.36);
  border-radius: 13px;
  padding: 15px 18px 14px 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  text-align: left;
}
.chat-gate-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 9px;
}
@media (min-width: 520px) {
  .chat-gate-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.chat-gate-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: rgba(226, 232, 240, 0.86);
  margin-bottom: 3px;
}
.chat-gate-input {
  width: 100%;
  box-sizing: border-box;
  background: #0b182c;
  border: 1px solid rgba(74, 144, 217, 0.36);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  color: #f1f5f9;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.chat-gate-input::placeholder {
  color: rgba(148, 163, 184, 0.72);
}
.chat-gate-input:focus {
  border-color: #4a90d9;
  box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.20);
}
.chat-gate-input[aria-invalid="true"] {
  border-color: #f59e0b;
}
.chat-phone-row {
  margin-bottom: 9px;
}
.chat-opt-tag {
  font-weight: 400;
  color: rgba(148, 163, 184, 0.78);
  font-size: 11px;
}
.chat-offline-wrap {
  margin-bottom: 9px;
}
.chat-offline-wrap[hidden] {
  display: none !important;
}
.chat-offline-notice {
  font-size: 11.5px;
  line-height: 1.4;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.11);
  border: 1px solid rgba(245, 158, 11, 0.30);
  border-radius: 8px;
  padding: 7px 10px;
  margin-bottom: 8px;
}
.chat-gate-textarea {
  min-height: 62px;
  resize: vertical;
  line-height: 1.4;
}
.chat-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 9px;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(226, 232, 240, 0.76);
}
.chat-consent-row input[type="checkbox"] {
  margin-top: 2px;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  accent-color: #4a90d9;
  cursor: pointer;
}
.chat-start-btn {
  width: 100%;
  margin-top: 9px;
  padding: 8.5px 16px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #ffffff;
  background: linear-gradient(180deg, #529ae3 0%, #3276bf 100%);
  border: 1px solid rgba(147, 202, 255, 0.48);
  box-shadow: 0 3px 12px rgba(74, 144, 217, 0.32);
  cursor: pointer;
  transition: all 0.18s ease;
}
.chat-start-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #62a8ef 0%, #3d83ce 100%);
  border-color: rgba(186, 220, 255, 0.72);
  box-shadow: 0 5px 16px rgba(74, 144, 217, 0.45);
}
.chat-start-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  box-shadow: none;
}
.chat-gate-banner {
  font-size: 12px;
  line-height: 1.45;
  margin-top: 11px;
  padding: 8px 10px;
  border-radius: 8px;
}
.chat-gate-banner-err {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.32);
}
.chat-gate-banner-ok {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.32);
}
.chat-hp-wrap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
/* ALTCHA sötétkék DRYCON arculat */
#chat-altcha {
  --altcha-color-base: #0b182c;
  --altcha-color-base-content: #e2e8f0;
  --altcha-border-color: rgba(74, 144, 217, 0.42);
  --altcha-border-radius: 10px;
  --altcha-checkbox-border-color: rgba(122, 184, 245, 0.62);
  --altcha-color-primary: #4a90d9;
  --altcha-color-success: #22c55e;
  --altcha-max-width: 100%;
}
#chat-embed-close {
  display: none;
}

/* ── Beágyazott lebegő chatablak mód (?embed=1) ── */
html.is-embed,
html.is-embed body {
  height: 100% !important;
  min-height: 100% !important;
  overflow: hidden !important;
  background: #0b172a !important;
}
html.is-embed #navbar,
html.is-embed #chat-page-heading,
html.is-embed footer,
html.is-embed #cookie-banner {
  display: none !important;
}
html.is-embed main {
  padding: 0 !important;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}
html.is-embed main > div {
  max-width: none !important;
  padding: 0 !important;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}
html.is-embed .chat-shell {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: none;
  border-radius: 0;
  box-shadow: none;
}
html.is-embed .chat-topbar {
  padding: 10px 12px;
  gap: 8px;
  flex-shrink: 0;
}
html.is-embed .chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}
html.is-embed .chat-brand-group {
  gap: 11px;
}
html.is-embed .chat-topbar-actions {
  gap: 6px;
}
html.is-embed #chat-gate-lead {
  margin-bottom: 10px;
}
html.is-embed .chat-ctrl-btn {
  padding: 5px 8px;
  font-size: 11px;
  gap: 4px;
  border-radius: 7px;
}
html.is-embed #chat-embed-close {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
  transition: all 0.16s ease;
}
html.is-embed #chat-embed-close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}
html.is-embed .chat-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
html.is-embed #drycon-chat-mount {
  flex: 1 1 auto;
  height: 100% !important;
  min-height: 0 !important;
}
html.is-embed .chat-bot-gate {
  padding: 12px;
}
html.is-embed .chat-gate-card {
  padding: 14px 15px 13px 15px;
  border-radius: 12px;
}
html.is-embed .chat-gate-grid {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 9px;
}
@media (max-width: 350px) {
  html.is-embed .chat-gate-grid {
    grid-template-columns: 1fr;
  }
}
html.is-embed .chat-gate-label {
  font-size: 11px;
  margin-bottom: 4px;
}
html.is-embed .chat-gate-input {
  padding: 7px 9px;
  font-size: 12.5px;
  border-radius: 8px;
}
html.is-embed .chat-phone-row,
html.is-embed .chat-offline-wrap {
  margin-bottom: 9px;
}
html.is-embed .chat-gate-textarea {
  min-height: 60px;
}
html.is-embed .chat-consent-row {
  font-size: 10.8px;
  line-height: 1.38;
  margin-bottom: 10px;
  gap: 7px;
}
html.is-embed .chat-start-btn {
  margin-top: 10px;
  padding: 8.5px 14px;
  font-size: 12.5px;
  border-radius: 8px;
}
html.is-embed #chat-quick-bar {
  padding: 8px 12px !important;
  gap: 6px !important;
  flex-shrink: 0;
}
html.is-embed #chat-quick-bar > span {
  display: none;
}
html.is-embed .chat-chip {
  font-size: 11px;
  padding: 4px 9px;
}
html.is-embed #chat-legal-note {
  margin: 0 !important;
  padding: 6px 12px 7px 12px;
  font-size: 10px !important;
  line-height: 1.35 !important;
  background: rgba(6, 13, 25, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

/* CSP strict (style-src 'self') segédosztályok */
body.dc-chat-body {
  background-color: #0a1628;
}
.dc-logo-white {
  filter: brightness(0) invert(1);
}
#worker-status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background-color: #94a3b8;
  flex-shrink: 0;
}
.dc-shrink-0 {
  flex-shrink: 0;
}
.dc-consent-link {
  color: #7cc0ff;
}
footer.dc-chat-footer {
  background-color: #0a1628;
  color: rgba(255, 255, 255, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 9px 0;
  flex-shrink: 0;
}

/* Asztali / laptop 1-oldalas (görgetésmentes) illeszkedés a teljes /chat/ oldalon */
@media (min-width: 768px) and (min-height: 620px) {
  html:not(.is-embed),
  html:not(.is-embed) body.dc-chat-body {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }
  html:not(.is-embed) body.dc-chat-body {
    display: flex;
    flex-direction: column;
  }
  html:not(.is-embed) .chat-page-main {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding-top: 84px;
    padding-bottom: 8px;
  }
  html:not(.is-embed) .chat-page-inner {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  html:not(.is-embed) .chat-shell {
    flex: 1 1 auto;
    min-height: 0;
  }
  html:not(.is-embed) #drycon-chat-mount {
    height: 100%;
    min-height: 0;
  }
}
