/* ============================================================
   DENTAL GROUP, Programmatic Triage Chatbot Styles
   Theme: Shared dental-group blue (brand-primary #0470c8 / brand-primary-dark #035496)
   Matches assets/css/theme.css brand tokens used across the practice site.
   ============================================================ */

.dtc-chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #161A2E;
  -webkit-font-smoothing: antialiased;
}

/* Floating Launcher Button */
.dtc-chat-launcher {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #035496;
  color: #FFFFFF;
  border: 2px solid #0470c8;
  border-radius: 30px;
  padding: 10px 18px 10px 14px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(3, 84, 150, 0.35);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.dtc-chat-launcher:hover {
  background: #04619f;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(3, 84, 150, 0.45);
}

.dtc-chat-launcher:active {
  transform: translateY(0);
}

.dtc-chat-launcher:focus-visible {
  outline: 2px solid #1d7bd6;
  outline-offset: 2px;
}

.dtc-launcher-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0470c8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  flex-shrink: 0;
  position: relative;
}

.dtc-launcher-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.dtc-launcher-pulse {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  background: #00C853;
  border: 2px solid #035496;
  border-radius: 50%;
}

.dtc-launcher-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.dtc-launcher-title {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  line-height: 1.15;
  color: #FFFFFF;
}

.dtc-launcher-sub {
  font-size: 0.72rem;
  color: #CFE0F2;
  line-height: 1.2;
}

/* Chat Window Box */
.dtc-chat-box {
  position: fixed;
  bottom: 86px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 580px;
  max-height: calc(100vh - 110px);
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(3, 84, 150, 0.22), 0 0 0 1px rgba(3, 84, 150, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10000;
}

.dtc-chat-box.dtc-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Header */
.dtc-chat-header {
  background: #035496;
  color: #FFFFFF;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid #0470c8;
}

.dtc-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dtc-header-avatar {
  width: 36px;
  height: 36px;
  background: #0470c8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #FFFFFF;
  flex-shrink: 0;
}

.dtc-header-titles h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1px;
  color: #FFFFFF;
  line-height: 1.15;
}

.dtc-header-status {
  font-size: 0.72rem;
  color: #CFE0F2;
  display: flex;
  align-items: center;
  gap: 5px;
}

.dtc-status-dot {
  width: 6px;
  height: 6px;
  background: #00C853;
  border-radius: 50%;
  display: inline-block;
}

.dtc-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dtc-btn-icon {
  background: transparent;
  border: none;
  color: #CFE0F2;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}

.dtc-btn-icon:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.12);
}

.dtc-btn-icon:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 1px;
}

.dtc-btn-back {
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

/* Chat Body (Messages Stream) */
.dtc-chat-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: #F2F6FB;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.dtc-msg {
  display: flex;
  flex-direction: column;
  max-width: 86%;
  animation: dtcFadeIn 0.25s ease-out;
}

@keyframes dtcFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.dtc-msg.dtc-bot {
  align-self: flex-start;
}

.dtc-msg.dtc-user {
  align-self: flex-end;
}

.dtc-msg-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.45;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dtc-msg.dtc-bot .dtc-msg-bubble {
  background: #FFFFFF;
  color: #161A2E;
  border-bottom-left-radius: 2px;
  border: 1px solid #DCE6F2;
}

.dtc-msg.dtc-user .dtc-msg-bubble {
  background: #035496;
  color: #FFFFFF;
  border-bottom-right-radius: 2px;
}

/* Quick Options Grid */
.dtc-options-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  animation: dtcFadeIn 0.25s ease-out;
}

.dtc-option-btn {
  background: #FFFFFF;
  border: 1.5px solid #DCE6F2;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #035496;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.dtc-option-btn:hover,
.dtc-option-btn:focus-visible {
  border-color: #0470c8;
  background: #F0F7FD;
  color: #023a69;
  transform: translateX(3px);
}

.dtc-option-btn:focus-visible {
  outline: 2px solid #1d7bd6;
  outline-offset: 1px;
}

.dtc-option-btn.dtc-urgent {
  border-color: #D92D20;
  background: #FEF2F1;
  color: #B42318;
}

.dtc-option-btn.dtc-urgent:hover,
.dtc-option-btn.dtc-urgent:focus-visible {
  background: #D92D20;
  color: #FFFFFF;
}

.dtc-option-btn.dtc-book-now {
  text-decoration: none;
  border-color: #0470c8;
  background: #F0F7FD;
}

/* Emergency Call Banner in Chat */
.dtc-call-card {
  background: #FEF2F1;
  border: 1.5px solid #D92D20;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 6px 0;
  text-align: center;
}

.dtc-call-card h5 {
  margin: 0 0 4px;
  color: #B42318;
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.dtc-call-card p {
  margin: 0 0 10px;
  font-size: 0.8rem;
  color: #555C7C;
}

.dtc-call-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: #D92D20;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 10px 14px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s ease;
  box-sizing: border-box;
}

.dtc-call-btn:hover,
.dtc-call-btn:focus-visible {
  background: #B42318;
}

/* Form Container inside Chat */
.dtc-form-card {
  background: #FFFFFF;
  border: 1px solid #DCE6F2;
  border-radius: 10px;
  padding: 14px;
}

.dtc-form-card form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dtc-input-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dtc-input-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #555C7C;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.dtc-input-field input,
.dtc-input-field select,
.dtc-input-field textarea {
  width: 100%;
  border: 1.5px solid #DCE6F2;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.86rem;
  font-family: inherit;
  color: #161A2E;
  background: #FFFFFF;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
}

.dtc-input-field input:focus,
.dtc-input-field select:focus,
.dtc-input-field textarea:focus {
  outline: none;
  border-color: #0470c8;
  box-shadow: 0 0 0 3px rgba(4, 112, 200, 0.15);
}

.dtc-submit-btn {
  background: #035496;
  color: #FFFFFF;
  border: none;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: background 0.15s ease;
  margin-top: 4px;
}

.dtc-submit-btn:hover {
  background: #0470c8;
}

.dtc-submit-btn:focus-visible {
  outline: 2px solid #1d7bd6;
  outline-offset: 2px;
}

.dtc-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Success / Confirmation State */
.dtc-success-card {
  background: #E8F8F0;
  border: 1.5px solid #00C853;
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}

.dtc-success-icon {
  width: 38px;
  height: 38px;
  background: #00C853;
  color: #FFFFFF;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  font-weight: 700;
}

.dtc-success-card h5 {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
  color: #0E6238;
}

.dtc-success-card p {
  margin: 0;
  font-size: 0.82rem;
  color: #1C4D35;
  line-height: 1.4;
}

/* Footer / Branding Note */
.dtc-chat-footer {
  padding: 8px 14px;
  background: #FFFFFF;
  border-top: 1px solid #DCE6F2;
  text-align: center;
  font-size: 0.72rem;
  color: #6B7489;
}

.dtc-chat-footer a {
  color: #0470c8;
  text-decoration: none;
  font-weight: 600;
}

/* Mobile Responsive: full-screen sheet, no horizontal overflow */
@media (max-width: 480px) {
  .dtc-chat-widget {
    bottom: 16px;
    right: 16px;
  }

  .dtc-chat-box {
    bottom: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }

  .dtc-chat-launcher {
    padding: 10px;
    border-radius: 50%;
  }

  .dtc-launcher-text {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dtc-chat-launcher,
  .dtc-chat-box,
  .dtc-msg,
  .dtc-options-container {
    transition: none;
    animation: none;
  }
}

