:root {
  --skylink-teal: #17afc0;
  --skylink-teal-dark: #0b6f83;
  --skylink-teal-soft: #e9fafc;
  --skylink-orange: #f47c47;
  --skylink-orange-dark: #d96533;
  --skylink-border: #cfe8ec;
  --skylink-text: #15353e;
  --skylink-muted: #587179;
  --skylink-panel: #ffffff;
  --skylink-bot: #f5fbfc;
  --skylink-shadow: 0 18px 50px rgba(11, 111, 131, 0.2);
  --skylink-widget-vh: 100vh;
}

#skylink-widget-root {
  font-family: "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  touch-action: manipulation;
}

#skylink-widget-launcher,
.sk-close,
#skylink-widget-send {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body.skylink-widget-lock {
  overflow: hidden;
  overscroll-behavior: contain;
}

#skylink-widget-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--skylink-teal-dark), var(--skylink-teal));
  color: #fff;
  cursor: pointer;
  box-shadow: 0 16px 30px rgba(11, 111, 131, 0.34);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99998;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

#skylink-widget-launcher:hover,
#skylink-widget-launcher:focus-visible {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 20px 34px rgba(11, 111, 131, 0.4);
}

#skylink-widget-root.sk-open #skylink-widget-launcher {
  opacity: 0;
  pointer-events: none;
}

#skylink-widget-panel {
  position: fixed;
  right: 24px;
  bottom: 100px;
  width: 360px;
  height: 520px;
  max-width: calc(100vw - 24px);
  max-height: calc(var(--skylink-widget-vh) - 120px);
  background: var(--skylink-panel);
  border: 1px solid var(--skylink-border);
  border-radius: 24px;
  box-shadow: var(--skylink-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 99999;
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  overscroll-behavior: contain;
}

#skylink-widget-panel.sk-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.sk-header {
  padding: 18px 18px 16px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 36%),
    linear-gradient(135deg, var(--skylink-teal-dark), var(--skylink-teal));
  color: #fff;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.sk-header-badge {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
}

.sk-header-copy {
  flex: 1;
  min-width: 0;
}

.sk-header-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.sk-header-subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.84);
}

.sk-close {
  flex: 0 0 auto;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}

.sk-close:hover,
.sk-close:focus-visible {
  background: rgba(255, 255, 255, 0.16);
}

.sk-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px 8px;
  background:
    radial-gradient(circle at top, rgba(233, 250, 252, 0.9), transparent 32%),
    #ffffff;
  display: flex;
  flex-direction: column;
  gap: 10px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.sk-message {
  display: flex;
  flex-direction: column;
  max-width: 86%;
  animation: sk-fade-in 0.18s ease;
}

.sk-message.sk-bot {
  align-self: flex-start;
}

.sk-message.sk-user {
  align-self: flex-end;
}

.sk-bubble {
  padding: 11px 14px;
  border-radius: 18px;
  line-height: 1.5;
  font-size: 14px;
  word-break: break-word;
}

.sk-bot .sk-bubble {
  background: var(--skylink-bot);
  color: var(--skylink-text);
  border-bottom-left-radius: 6px;
}

.sk-user .sk-bubble {
  background: linear-gradient(135deg, var(--skylink-teal-dark), var(--skylink-teal));
  color: #fff;
  border-bottom-right-radius: 6px;
}

.sk-time {
  margin-top: 4px;
  padding: 0 6px;
  font-size: 11px;
  color: var(--skylink-muted);
}

.sk-user .sk-time {
  text-align: right;
}

.sk-bubble a {
  color: inherit;
}

.sk-bubble code {
  font-family: Consolas, monospace;
  font-size: 0.93em;
}

.sk-calendly-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 11px 14px;
  width: 100%;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--skylink-orange), var(--skylink-orange-dark));
  color: #fff !important;
  font-weight: 600;
  text-decoration: none;
}

.sk-typing {
  align-self: flex-start;
  display: inline-flex;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 18px;
  border-bottom-left-radius: 6px;
  background: var(--skylink-bot);
}

.sk-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8894b9;
  animation: sk-bounce 1s infinite ease-in-out;
}

.sk-dot:nth-child(2) {
  animation-delay: 0.12s;
}

.sk-dot:nth-child(3) {
  animation-delay: 0.24s;
}

.sk-input-wrap {
  border-top: 1px solid var(--skylink-border);
  padding: 14px;
  background: #fff;
}

.sk-input-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

#skylink-widget-input {
  flex: 1;
  resize: none;
  min-height: 46px;
  max-height: 120px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--skylink-border);
  background: #fff;
  color: var(--skylink-text);
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

#skylink-widget-input:focus {
  border-color: rgba(23, 175, 192, 0.45);
  box-shadow: 0 0 0 4px rgba(23, 175, 192, 0.1);
}

#skylink-widget-input::placeholder {
  color: #8590b0;
}

#skylink-widget-send {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--skylink-orange), var(--skylink-orange-dark));
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(244, 124, 71, 0.3);
}

#skylink-widget-send:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
}

.sk-helper {
  margin-top: 10px;
  font-size: 12px;
  color: var(--skylink-muted);
}

@supports (height: 100dvh) {
  :root {
    --skylink-widget-vh: 100dvh;
  }
}

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

@keyframes sk-bounce {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }
  40% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

@media (max-width: 820px) {
  #skylink-widget-launcher {
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    width: 60px;
    height: 60px;
  }

  #skylink-widget-panel {
    right: max(10px, env(safe-area-inset-right));
    left: max(10px, env(safe-area-inset-left));
    bottom: max(12px, env(safe-area-inset-bottom));
    width: auto;
    height: min(620px, calc(var(--skylink-widget-vh) - max(20px, env(safe-area-inset-top)) - max(20px, env(safe-area-inset-bottom))));
    max-width: none;
    border-radius: 22px;
    transform: translateY(18px) scale(0.985);
  }

  .sk-header {
    padding-top: max(18px, env(safe-area-inset-top));
  }

  .sk-input-wrap {
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }

  .sk-messages {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 520px) {
  #skylink-widget-panel {
    right: 0;
    left: 0;
    bottom: 0;
    height: min(100%, calc(var(--skylink-widget-vh) - env(safe-area-inset-top)));
    max-height: none;
    border-radius: 20px 20px 0 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .sk-message {
    max-width: 92%;
  }

  .sk-header-title {
    font-size: 15px;
  }

  .sk-bubble {
    font-size: 15px;
  }
}
