/* ==========================================================================
   Dial4Colleges AI Chatbot Widget Styles
   ========================================================================== */

:root {
  --d4c-primary: #f37023;
  --d4c-primary-dark: #d95810;
  --d4c-primary-gradient: linear-gradient(135deg, #ff6b1a 0%, #f37023 100%);
  --d4c-secondary: #12234e;
  --d4c-secondary-dark: #0a1532;
  --d4c-bg-light: #f8fafc;
  --d4c-card-border: #e2e8f0;
  --d4c-text-main: #1e293b;
  --d4c-text-muted: #64748b;
  --d4c-radius-lg: 20px;
  --d4c-radius-md: 14px;
  --d4c-radius-sm: 8px;
  --d4c-shadow-lg: 0 20px 45px -10px rgba(18, 35, 78, 0.25), 0 8px 18px -6px rgba(0, 0, 0, 0.12);
}

/* 1. Floating Launcher Button */
.fx-chatbot-btn {
  position: relative;
  background: var(--d4c-primary-gradient) !important;
  color: #ffffff !important;
  border: none;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 52px !important;
  height: 52px !important;
  border-radius: 50% !important;
  box-shadow: 0 8px 24px rgba(243, 112, 35, 0.42) !important;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  z-index: 10001;
}

.fx-chatbot-btn:hover {
  transform: scale(1.1) !important;
  box-shadow: 0 12px 28px rgba(243, 112, 35, 0.55) !important;
}

.fx-chatbot-btn svg {
  width: 26px;
  height: 26px;
  fill: #ffffff;
  transition: transform 0.25s ease;
}

.fx-chatbot-btn:hover svg {
  transform: rotate(5deg) scale(1.05);
}

/* Notification Pulse Badge */
.d4c-bot-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #10b981;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 12px;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: d4c-pulse-glow 2s infinite;
}

@keyframes d4c-pulse-glow {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Floating Tooltip Callout */
.d4c-bot-tooltip {
  position: absolute;
  right: 64px;
  top: 50%;
  transform: translateY(-50%);
  background: #1e293b;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.d4c-bot-tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 6px 0 6px 6px;
  border-style: solid;
  border-color: transparent transparent transparent #1e293b;
}

.fx-chatbot-btn:hover .d4c-bot-tooltip {
  opacity: 1;
  visibility: visible;
  right: 60px;
}

/* 2. Main Chatbot Popup Window */
.d4c-chat-window {
  position: fixed;
  bottom: 95px;
  right: 24px;
  width: 390px;
  max-width: calc(100vw - 32px);
  height: 600px;
  max-height: calc(100vh - 120px);
  background: #ffffff;
  border-radius: var(--d4c-radius-lg);
  box-shadow: var(--d4c-shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 10002;
  opacity: 0;
  visibility: hidden;
  transform: translateY(24px) scale(0.96);
  transform-origin: bottom right;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.3s;
  border: 1px solid rgba(226, 232, 240, 0.8);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.d4c-chat-window.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* 3. Header */
.d4c-chat-header {
  background: linear-gradient(135deg, var(--d4c-secondary) 0%, #1e3a79 100%);
  color: #ffffff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--d4c-primary);
  position: relative;
  z-index: 20;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.d4c-header-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.d4c-avatar-wrap {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ffffff;
  padding: 2px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.d4c-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.d4c-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 11px;
  height: 11px;
  background: #10b981;
  border: 2px solid #ffffff;
  border-radius: 50%;
}

.d4c-header-info {
  line-height: 1.25;
}

.d4c-bot-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.d4c-bot-status {
  font-size: 11px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
}

.d4c-bot-status-dot {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
}

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

.d4c-action-btn {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.d4c-action-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.08);
}

.d4c-action-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* 4. Messages Container */
.d4c-chat-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

.d4c-chat-body::-webkit-scrollbar {
  width: 5px;
}

.d4c-chat-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

/* Message Row */
.d4c-msg-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 88%;
}

.d4c-msg-row.bot {
  align-self: flex-start;
  max-width: 94%;
}

.d4c-msg-row.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.d4c-mini-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

/* Message Bubbles */
.d4c-bubble {
  padding: 12px 15px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.5;
  word-break: break-word;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.d4c-msg-row.bot .d4c-bubble {
  background: #ffffff;
  color: var(--d4c-text-main);
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 4px;
}

.d4c-msg-row.bot .d4c-bubble p {
  margin: 0 0 6px 0;
}

.d4c-msg-row.bot .d4c-bubble p:last-child {
  margin-bottom: 0;
}

.d4c-md-h3 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--d4c-secondary);
  margin: 3px 0 6px 0;
  line-height: 1.35;
}

.d4c-md-h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--d4c-secondary);
  margin: 3px 0 6px 0;
  line-height: 1.35;
}

.d4c-msg-row.bot .d4c-bubble ul {
  margin: 6px 0;
  padding-left: 18px;
}

.d4c-msg-row.bot .d4c-bubble a {
  color: var(--d4c-primary);
  font-weight: 600;
  text-decoration: underline;
}

/* ChatGPT Style Typewriter Blinking Cursor */
.d4c-typewriter-cursor {
  display: inline-block;
  width: 7px;
  height: 15px;
  background-color: var(--d4c-primary);
  margin-left: 3px;
  vertical-align: -2px;
  border-radius: 1px;
  animation: d4cBlink 0.75s infinite;
}

@keyframes d4cBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Smooth Fade In Up for Extra Content (Cards, Forms, Chips) */
.d4c-extra-content {
  transition: opacity 0.3s ease;
}

.d4c-fade-in-up {
  animation: d4cFadeInUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.d4c-msg-row.user .d4c-bubble {
  background: var(--d4c-primary-gradient);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.d4c-msg-time {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 4px;
  display: block;
}

.d4c-msg-row.user .d4c-msg-time {
  text-align: right;
  color: rgba(255, 255, 255, 0.85);
}

/* 5. Rich College Recommendation Cards (Type 2: College Logo & Details with Clickable Line) */
.d4c-colleges-deck {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  width: 100%;
}

.d4c-college-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 11px 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
  transition: all 0.2s ease;
  position: relative;
}

.d4c-college-card:hover {
  border-color: var(--d4c-primary);
  box-shadow: 0 6px 16px rgba(243, 112, 35, 0.12);
  transform: translateY(-2px);
}

.d4c-college-logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: contain;
  background: #ffffff;
  padding: 2px;
  border: 1px solid #edf2f7;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
  display: block;
}

.d4c-college-details {
  flex: 1;
  min-width: 0;
}

.d4c-college-name-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--d4c-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
  margin: 0 0 4px 0;
  text-decoration: none;
  transition: color 0.15s ease;
}

.d4c-college-name-link:hover {
  color: var(--d4c-primary);
  text-decoration: underline;
}

.d4c-college-loc {
  font-size: 11px;
  color: var(--d4c-text-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 5px 0;
}

.d4c-top-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 4px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  box-shadow: 0 1px 3px rgba(217, 119, 6, 0.3);
}

.d4c-college-course-tag {
  font-size: 10.5px;
  font-weight: 600;
  color: #0284c7;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 4px;
  padding: 1px 6px;
  display: inline-block;
  margin-bottom: 5px;
  line-height: 1.35;
}

.d4c-college-exams-tag {
  font-size: 10.5px;
  font-weight: 600;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 4px;
  padding: 1px 6px;
  display: inline-block;
  margin-bottom: 5px;
  line-height: 1.35;
}

/* Predictor Probability Chance Badges */
.d4c-chance-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1.5px 7px;
  border-radius: 4px;
  margin-bottom: 5px;
}

.d4c-chance-badge.safe {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.d4c-chance-badge.target {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.d4c-chance-badge.dream {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #7dd3fc;
}

.d4c-college-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  flex-wrap: wrap;
}

.d4c-btn-visit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--d4c-primary);
  background: #fff4ed;
  border: 1px solid #fed7aa;
  padding: 3px 8px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.d4c-btn-visit:hover {
  background: var(--d4c-primary);
  color: #ffffff;
}

.d4c-btn-load-details {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.d4c-btn-load-details:hover {
  background: #1e40af;
  color: #ffffff;
}

.d4c-btn-compare {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #9a3412;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.d4c-btn-compare:hover {
  background: #ea580c;
  color: #ffffff;
}

/* Markdown Table for Comparisons */
.d4c-md-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 10px 0;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.d4c-md-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  background: #ffffff;
}

.d4c-md-table th {
  background: #f8fafc;
  color: var(--d4c-secondary);
  font-weight: 700;
  padding: 8px 10px;
  text-align: left;
  border-bottom: 2px solid #cbd5e1;
}

.d4c-md-table td {
  padding: 7px 10px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: top;
  line-height: 1.4;
}

.d4c-md-table tr:nth-child(even) td {
  background: #fcfdfe;
}

/* In-Chat Interactive Predictor Tool */
.d4c-predictor-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
  border: 1.5px solid #86efac;
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 10px;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.08);
}

.d4c-predictor-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #166534;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.d4c-predictor-desc {
  font-size: 11.5px;
  color: #4b5563;
  margin: 0 0 10px 0;
  line-height: 1.4;
}

.d4c-predictor-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.d4c-pred-row {
  display: flex;
  gap: 8px;
}

.d4c-pred-select, .d4c-pred-input {
  flex: 1;
  font-size: 12px;
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #1e293b;
  font-family: inherit;
  min-width: 0;
}

.d4c-pred-select:focus, .d4c-pred-input:focus {
  outline: none;
  border-color: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.15);
}

.d4c-pred-btn {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 2px;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.25);
  font-family: inherit;
}

.d4c-pred-btn:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(22, 163, 74, 0.35);
}

/* ChatGPT Message Footer */
.d4c-msg-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding-top: 4px;
  border-top: 1px dashed #f1f5f9;
}

.d4c-copy-btn {
  background: transparent;
  border: none;
  font-size: 10.5px;
  color: #94a3b8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
  font-family: inherit;
}

.d4c-copy-btn:hover {
  color: var(--d4c-primary);
  background: #f8fafc;
}

/* Course List Card */
.d4c-courses-deck {
  margin-top: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
}

.d4c-courses-header {
  font-size: 12px;
  font-weight: 700;
  color: var(--d4c-secondary);
  margin-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 5px;
}

.d4c-course-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px dashed #e2e8f0;
}

.d4c-course-item:last-child {
  border-bottom: none;
}

.d4c-course-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.d4c-course-name {
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
}

.d4c-course-dur {
  font-size: 10.5px;
  color: #64748b;
  margin-top: 2px;
}

.d4c-course-fee {
  font-size: 11px;
  font-weight: 700;
  color: #16a34a;
  background: #f0fdf4;
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
}

.d4c-course-fee-na {
  font-size: 10px;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 6px;
  white-space: nowrap;
}

/* 6. In-Chat Lead Form Card */
.d4c-lead-card {
  background: #ffffff;
  border: 1.5px solid #ffedd5;
  border-radius: 14px;
  padding: 14px;
  margin-top: 10px;
  box-shadow: 0 4px 12px rgba(243, 112, 35, 0.08);
}

.d4c-lead-card.d4c-lead-logged-in {
  background: #f0fdf4;
  border-color: #bbf7d0;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.08);
}

.d4c-logged-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #dcfce7;
  color: #15803d;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.d4c-lead-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--d4c-secondary);
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.d4c-lead-subtitle {
  font-size: 11.5px;
  color: var(--d4c-text-muted);
  margin: 0 0 10px 0;
}

.d4c-lead-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  width: 100%;
}

.d4c-lead-row .d4c-lead-input,
.d4c-lead-row .d4c-lead-select {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
}

.d4c-lead-input {
  width: 100%;
  padding: 8px 12px;
  font-size: 12.5px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  margin-bottom: 8px;
  background: #f8fafc;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease, background 0.2s ease;
  font-family: inherit;
  color: #1e293b;
}

.d4c-lead-input.lead-code {
  width: 58px;
  flex: 0 0 58px;
  text-align: center;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
}

.d4c-lead-input:focus {
  border-color: #6366f1;
  background: #ffffff;
}

.d4c-lead-select {
  width: 100%;
  padding: 8px 30px 8px 12px;
  font-size: 12.5px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  margin-bottom: 8px;
  background-color: #f8fafc;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px 14px;
  outline: none;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s ease, background 0.2s ease;
  font-family: inherit;
  color: #1e293b;
  cursor: pointer;
}

.d4c-lead-select:focus {
  border-color: #6366f1;
  background-color: #ffffff;
}

.d4c-lead-select:disabled {
  background-color: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.75;
}

.d4c-lead-submit {
  width: 100%;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  border: none;
  padding: 10px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.1s ease;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
  margin-top: 4px;
}

.d4c-lead-submit:hover {
  opacity: 0.94;
  transform: translateY(-1px);
}

.d4c-lead-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.d4c-lead-terms {
  font-size: 10.5px;
  color: #64748b;
  line-height: 1.45;
  text-align: center;
  margin: 9px 0 0 0;
}

.d4c-lead-terms a {
  color: #4f46e5;
  text-decoration: underline;
  font-weight: 500;
}

/* 7. Quick Chips Bar */
.d4c-chips-wrap {
  padding: 8px 14px 4px 14px;
  background: #f8fafc;
  border-top: 1px solid #edf2f7;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.d4c-chips-wrap::-webkit-scrollbar {
  display: none;
}

.d4c-chip-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--d4c-secondary);
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.d4c-chip-btn:hover {
  background: #fff4ed;
  border-color: var(--d4c-primary);
  color: var(--d4c-primary);
  transform: translateY(-1px);
}

/* 8. Chat Input Area */
.d4c-chat-footer {
  padding: 10px 14px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
}

.d4c-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  border-radius: 24px;
  padding: 4px 6px 4px 14px;
  border: 1.5px solid transparent;
  transition: all 0.2s ease;
}

.d4c-input-row:focus-within {
  border-color: var(--d4c-primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(243, 112, 35, 0.12);
}

.d4c-chat-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13px;
  outline: none;
  color: var(--d4c-text-main);
}

.d4c-chat-input::placeholder {
  color: #94a3b8;
}

.d4c-send-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--d4c-primary-gradient);
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.d4c-send-btn:hover {
  transform: scale(1.08);
}

.d4c-send-btn svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  margin-left: 2px;
}

.d4c-footer-note {
  font-size: 10px;
  color: #94a3b8;
  text-align: center;
  margin-top: 6px;
}

/* 9. Typing Indicator */
.d4c-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}

.d4c-dot {
  width: 6px;
  height: 6px;
  background: #94a3b8;
  border-radius: 50%;
  animation: d4c-bounce 1.4s infinite ease-in-out both;
}

.d4c-dot:nth-child(1) { animation-delay: -0.32s; }
.d4c-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes d4c-bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* 10. Extra Features: Voice, Expand Mode, Speech, Filter Tabs, WhatsApp Button */
.d4c-voice-btn {
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  border-radius: 50% !important;
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  outline: none !important;
  box-sizing: border-box !important;
  transition: all 0.2s ease !important;
}

.d4c-voice-btn:hover {
  background: #e2e8f0 !important;
  color: var(--d4c-primary) !important;
  transform: scale(1.05) !important;
}

.d4c-voice-btn.recording {
  background: #ef4444 !important;
  color: #ffffff !important;
  border-color: #dc2626 !important;
  animation: d4c-pulse-red 1.2s infinite !important;
}

@keyframes d4c-pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.d4c-voice-btn svg {
  width: 16px !important;
  height: 16px !important;
  fill: currentColor !important;
  display: block !important;
  margin: auto !important;
}

/* Chatbot Expand / Fullscreen Mode */
.d4c-chat-window.expanded {
  width: 820px !important;
  max-width: calc(100vw - 32px) !important;
  height: 86vh !important;
  max-height: calc(100vh - 80px) !important;
  bottom: 85px !important;
  right: 20px !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.d4c-chat-window.expanded .d4c-colleges-deck {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 12px !important;
}

@media (max-width: 768px) {
  .d4c-chat-window.expanded .d4c-colleges-deck {
    grid-template-columns: 1fr;
  }
}

/* Audio Listen / Text-to-Speech Button */
.d4c-speak-btn {
  background: none;
  border: none;
  color: #64748b;
  font-size: 11px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.d4c-speak-btn:hover {
  background: #f1f5f9;
  color: var(--d4c-primary);
}

.d4c-speak-btn.speaking {
  color: #ef4444;
  font-weight: 700;
  animation: d4c-pulse-audio 1s infinite alternate;
}

@keyframes d4c-pulse-audio {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

/* Direct WhatsApp Inquiry Button on College Cards */
.d4c-btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 3px 8px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.d4c-btn-whatsapp:hover {
  background: #22c55e;
  color: #ffffff;
  border-color: #16a34a;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(34, 197, 94, 0.3);
}

/* Interactive Filter Tabs above Colleges Deck */
.d4c-deck-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  overflow-x: auto;
  padding-bottom: 3px;
  scrollbar-width: none;
}

.d4c-deck-filters::-webkit-scrollbar {
  display: none;
}

.d4c-filter-tab {
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.d4c-filter-tab:hover,
.d4c-filter-tab.active {
  background: var(--d4c-primary-gradient);
  color: #ffffff;
  border-color: var(--d4c-primary);
  box-shadow: 0 2px 6px rgba(243, 112, 35, 0.25);
}

/* 11. Mobile Responsive Layout */
@media (max-width: 576px) {
  .d4c-chat-window {
    bottom: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    height: 85vh;
    max-height: 85vh;
    border-radius: 20px 20px 0 0;
    border: none;
  }

  .d4c-bot-tooltip {
    display: none;
  }
}

