.sef-chat-toggle,
.sef-chat-panel,
.sef-chat-prompt {
  position: fixed;
  right: 24px;
  z-index: 2147482000;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.sef-cal-close {
  position: fixed;
  z-index: 2147483000;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(127, 239, 255, 0.28);
  border-radius: 999px;
  background: rgba(5, 12, 16, 0.92);
  color: #ffffff;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.38), 0 0 22px rgba(0, 229, 255, 0.18);
  cursor: pointer;
  font: 700 26px/1 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.sef-cal-close:hover,
.sef-cal-close:focus-visible {
  border-color: rgba(0, 229, 255, 0.62);
  outline: none;
  background: rgba(8, 25, 30, 0.96);
}

.sef-chat-toggle {
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid rgba(0, 229, 255, 0.32);
  border-radius: 999px;
  background: linear-gradient(135deg, #081116, #102027 64%, #102d35);
  color: #f4fbff;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.36), 0 0 28px rgba(0, 229, 255, 0.18);
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
}

.sef-chat-toggle span:first-child {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.14);
  color: #00e5ff;
}

.sef-chat-prompt {
  right: 24px;
  bottom: 88px;
  display: grid;
  max-width: min(300px, calc(100vw - 32px));
  gap: 3px;
  padding: 13px 15px;
  border: 1px solid rgba(127, 239, 255, 0.2);
  border-radius: 16px;
  background: rgba(7, 12, 16, 0.96);
  color: #eef8fb;
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  text-align: left;
}

.sef-chat-prompt[hidden] {
  display: none;
}

.sef-chat-prompt strong {
  font-size: 14px;
}

.sef-chat-prompt span {
  color: rgba(238, 248, 251, 0.72);
  font-size: 13px;
  line-height: 1.35;
}

.sef-chat-panel {
  bottom: 92px;
  display: grid;
  width: min(410px, calc(100vw - 32px));
  max-height: min(650px, calc(100vh - 120px));
  overflow: hidden;
  border: 1px solid rgba(127, 239, 255, 0.18);
  border-radius: 20px;
  background: rgba(7, 12, 16, 0.97);
  color: #eef8fb;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.sef-chat-panel[data-open="true"] {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.sef-chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.12), rgba(255, 255, 255, 0.03));
}

.sef-chat-header strong {
  display: block;
  color: #ffffff;
}

.sef-chat-header span {
  display: block;
  margin-top: 4px;
  color: rgba(238, 248, 251, 0.72);
  font-size: 13px;
  line-height: 1.45;
}

.sef-chat-close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.sef-chat-body {
  display: grid;
  min-height: 0;
  padding: 16px;
}

.sef-chat-log {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 220px;
  max-height: min(380px, calc(100vh - 330px));
  overflow: auto;
  padding: 2px 2px 12px;
  scroll-behavior: smooth;
}

.sef-chat-bubble {
  max-width: 88%;
  padding: 11px 13px;
  border-radius: 15px;
  font-size: 14px;
  line-height: 1.5;
}

.sef-chat-bubble p {
  margin: 0;
}

.sef-chat-bubble-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.sef-chat-bubble-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  background: #00e5ff;
  color: #041014;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.sef-chat-bubble-actions a:hover,
.sef-chat-bubble-actions a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.22);
}

.sef-chat-bubble-bot {
  justify-self: start;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom-left-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(238, 248, 251, 0.86);
}

.sef-chat-bubble-user {
  justify-self: end;
  border-bottom-right-radius: 5px;
  background: #00e5ff;
  color: #041014;
  font-weight: 700;
}

.sef-chat-typing {
  margin: 0 0 12px 2px;
  color: rgba(238, 248, 251, 0.6);
  font-size: 13px;
}

.sef-chat-form {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.sef-chat-input {
  min-width: 0;
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  padding: 12px;
  font: inherit;
  font-size: 14px;
}

.sef-chat-input::placeholder {
  color: rgba(238, 248, 251, 0.5);
}

.sef-chat-send {
  border: 0;
  border-radius: 12px;
  background: #00e5ff;
  color: #041014;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0 14px;
}

.sef-chat-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sef-chat-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 12px;
  color: #041014;
  background: #00e5ff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.sef-chat-actions a:nth-child(2),
.sef-chat-actions a:nth-child(3) {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #effcff;
}

.sef-chat-actions a:nth-child(3) {
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .sef-chat-toggle,
  .sef-chat-panel,
  .sef-chat-prompt {
    right: 16px;
  }

  .sef-chat-toggle {
    bottom: 16px;
  }

  .sef-chat-prompt {
    bottom: 80px;
  }

  .sef-chat-panel {
    bottom: 82px;
    max-height: calc(100vh - 108px);
  }

  .sef-chat-log {
    max-height: calc(100vh - 330px);
  }

  .sef-chat-bubble {
    max-width: 94%;
  }

  .sef-cal-close {
    top: 14px !important;
    right: 14px;
    left: auto !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sef-chat-panel {
    transition: none;
  }
}

.sef-chat-prompt:focus-visible,
.sef-chat-toggle:focus-visible,
.sef-chat-close:focus-visible,
.sef-chat-input:focus-visible,
.sef-chat-send:focus-visible,
.sef-chat-actions a:focus-visible,
.sef-chat-bubble-actions a:focus-visible {
  outline: 3px solid #31e5ee;
  outline-offset: 3px;
}

.sef-chat-close,
.sef-chat-send {
  min-width: 44px;
  min-height: 44px;
}

.sef-chat-send:disabled {
  opacity: 0.65;
  cursor: wait;
}
