:root {
  --sc-red: #E30613;
  --sc-yellow: #FFCC00;
  --sc-charcoal: #111111;
  --sc-white: #FFFFFF;
}

#sc-chat-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border: 0;
  border-radius: 40px;
  background: var(--sc-red);
  color: var(--sc-white);
  font: 700 15px Arial, sans-serif;
  cursor: pointer;
  box-shadow: 0 8px 28px #0003;
}
#sc-chat-launcher:hover { background: #bd0010; }
#sc-chat-launcher .sc-chat-icon { color: var(--sc-yellow); font-size: 23px; }

#sc-chat-panel {
  position: fixed;
  right: 24px;
  bottom: 88px;
  z-index: 9999;
  display: none;
  flex-direction: column;
  width: min(390px, calc(100vw - 28px));
  height: min(570px, calc(100dvh - 120px));
  min-height: 360px;
  overflow: hidden;
  border: 1px solid #ddd;
  border-radius: 18px;
  background: var(--sc-white);
  box-shadow: 0 14px 45px #0003;
  font-family: Arial, sans-serif;
  color: var(--sc-charcoal);
}
#sc-chat-panel.sc-open { display: flex; }

.sc-chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--sc-charcoal);
  color: var(--sc-white);
}
.sc-chat-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  background: var(--sc-red);
  color: var(--sc-yellow);
  font-weight: 900;
  font-size: 19px;
}
.sc-chat-heading { flex: 1; }
.sc-chat-heading strong { display: block; font-size: 15px; }
.sc-chat-heading small { display: block; margin-top: 4px; color: #ddd; font-size: 12px; }
#sc-chat-close {
  border: 0;
  background: transparent;
  color: white;
  font-size: 27px;
  cursor: pointer;
}

.sc-chat-messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 11px;
  padding: 16px;
  overflow-y: auto;
  background: #f7f7f7;
}
.sc-chat-message {
  max-width: 88%;
  padding: 11px 13px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.sc-chat-message.sc-bot {
  align-self: flex-start;
  border: 1px solid #e5e5e5;
  border-bottom-left-radius: 4px;
  background: white;
}
.sc-chat-message.sc-user {
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  background: var(--sc-red);
  color: white;
}
.sc-chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 14px 12px;
  background: #f7f7f7;
}
.sc-chat-quick button {
  padding: 8px 10px;
  border: 1px solid var(--sc-red);
  border-radius: 18px;
  background: white;
  color: var(--sc-charcoal);
  font-size: 12px;
  cursor: pointer;
}
.sc-chat-quick button:hover {
  background: var(--sc-yellow);
  border-color: var(--sc-yellow);
}
.sc-chat-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #e5e5e5;
  background: white;
}
#sc-chat-input {
  min-width: 0;
  flex: 1;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 22px;
  font: 14px Arial, sans-serif;
}
#sc-chat-input:focus { outline: 2px solid var(--sc-yellow); }
#sc-chat-send {
  width: 44px;
  flex: 0 0 44px;
  border: 0;
  border-radius: 50%;
  background: var(--sc-red);
  color: white;
  font-size: 20px;
  cursor: pointer;
}
#sc-chat-send:disabled { opacity: .5; cursor: wait; }
.sc-chat-footer {
  padding: 0 12px 10px;
  background: white;
  color: #666;
  font-size: 11px;
  text-align: center;
}
.sc-chat-footer a { color: var(--sc-red); }

@media (max-width: 480px) {
  #sc-chat-launcher { right: 14px; bottom: 14px; }
  #sc-chat-panel {
    right: 10px;
    bottom: 76px;
    width: calc(100vw - 20px);
    height: min(600px, calc(100dvh - 95px));
  }
}
@media (prefers-reduced-motion: reduce) {
  #sc-chat-panel, #sc-chat-launcher { scroll-behavior: auto; }
}

/* Premium compact service selector */
.sc-chat-quick {
  display: flex;
  flex-wrap: nowrap;
  gap: 7px;
  padding: 9px 12px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: #d2d2d2 transparent;
  background: #f7f7f7;
  border-top: 1px solid #ededed;
  -webkit-overflow-scrolling: touch;
}

.sc-chat-quick button {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid #dedede;
  border-radius: 999px;
  background: #fff;
  color: #252525;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 1px 3px #0000000a;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.sc-chat-quick button:hover,
.sc-chat-quick button:focus-visible {
  background: #fff8d6;
  border-color: #e0b500;
  outline: none;
}

.sc-chat-quick button:active {
  transform: scale(.98);
}

/* Give conversation replies more room */
.sc-chat-messages {
  min-height: 0;
  padding: 13px;
  gap: 9px;
}

.sc-chat-message {
  max-width: 92%;
  padding: 10px 12px;
  line-height: 1.48;
}

@media (max-width: 480px) {
  .sc-chat-quick {
    padding: 8px 10px;
    gap: 6px;
  }

  .sc-chat-quick button {
    padding: 7px 10px;
    font-size: 11px;
  }

  .sc-chat-messages {
    padding: 11px;
  }
}

/* Premium service dropdown */
.sc-chat-quick {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 9px 12px 11px;
  background: #f7f7f7;
  border-top: 1px solid #ededed;
}

.sc-chat-quick label {
  color: #666;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

#sc-chat-service {
  width: 100%;
  min-width: 0;
  padding: 10px 36px 10px 12px;
  border: 1px solid #dedede;
  border-radius: 10px;
  background: #fff;
  color: #222;
  font: 600 12px Arial, sans-serif;
  cursor: pointer;
}

#sc-chat-service:focus {
  outline: 2px solid #FFCC00;
  border-color: #E30613;
}

@media (max-width: 480px) {
  .sc-chat-quick {
    padding: 7px 10px 9px;
  }
}
