/**
 * UKBPM™ AI CHAT - Styles
 * Professional, branded chat widget styling
 * 
 * Version: 1.0.0
 * Date: January 3, 2025
 */

/* ========================================
   CSS VARIABLES (Brand Colors)
   ======================================== */
:root {
  --ukbpm-chat-primary: #003366;
  --ukbpm-chat-secondary: #00559f;
  --ukbpm-chat-accent: #00a2ff;
  --ukbpm-chat-background: #ffffff;
  --ukbpm-chat-text: #0b2540;
  --ukbpm-chat-muted: #eef3f8;
  --ukbpm-chat-border: #e6eaf2;
  --ukbpm-chat-shadow: rgba(15, 35, 75, 0.15);
  --ukbpm-chat-shadow-hover: rgba(15, 35, 75, 0.25);
}

/* ========================================
   CHAT CONTAINER
   ======================================== */
#ukbpm-ai-chat-container {
  position: fixed !important;
  bottom: 20px !important;
  right: 20px !important;
  z-index: 10000 !important;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Keep chat launcher above the sticky CTA bar (conversion-optimization / cta-tools) */
body.has-sticky-cta #ukbpm-ai-chat-container {
  bottom: calc(20px + var(--sticky-cta-safe, 96px)) !important;
}

/* ========================================
   CHAT BUTTON
   ======================================== */
.ukbpm-chat-button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ukbpm-chat-primary) 0%, var(--ukbpm-chat-secondary) 100%);
  border: none;
  box-shadow: 0 4px 16px var(--ukbpm-chat-shadow);
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  outline: none;
  visibility: visible !important;
  opacity: 1 !important;
}

.ukbpm-chat-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--ukbpm-chat-shadow-hover);
  background: linear-gradient(135deg, var(--ukbpm-chat-secondary) 0%, var(--ukbpm-chat-accent) 100%);
}

.ukbpm-chat-button:active {
  transform: translateY(0);
}

.ukbpm-chat-button:focus {
  outline: 3px solid var(--ukbpm-chat-accent);
  outline-offset: 4px;
}

.ukbpm-chat-button-active {
  background: linear-gradient(135deg, var(--ukbpm-chat-secondary) 0%, var(--ukbpm-chat-accent) 100%);
}

.ukbpm-chat-button-pulse {
  animation: ukbpm-pulse 2s ease-in-out infinite;
}

@keyframes ukbpm-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Chat Badge */
.ukbpm-chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #e74c3c;
  color: #ffffff;
  border-radius: 12px;
  min-width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
  animation: ukbpm-badge-bounce 0.5s ease-out;
}

@keyframes ukbpm-badge-bounce {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* ========================================
   CHAT WINDOW
   ======================================== */
.ukbpm-chat-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 380px;
  max-width: calc(100vw - 40px);
  height: 600px;
  max-height: calc(100vh - 100px);
  background: var(--ukbpm-chat-background);
  border-radius: 16px;
  box-shadow: 0 8px 32px var(--ukbpm-chat-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Critical - prevents children from overflowing */
  animation: ukbpm-slide-up 0.3s ease-out;
  border: 1px solid var(--ukbpm-chat-border);
  /* Ensure proper height calculation */
  box-sizing: border-box;
  /* Force children to stay within bounds */
  contain: layout style;
}

/* Ensure proper flex layout for scrolling - SIMPLIFIED */
.ukbpm-chat-window {
  /* Ensure proper height calculation */
  box-sizing: border-box;
}

/* Header - fixed at top */
.ukbpm-chat-window > .ukbpm-chat-header {
  flex: 0 0 auto;
}

/* Messages - scrollable, takes remaining space */
.ukbpm-chat-window > .ukbpm-chat-messages {
  flex: 1 1 0; /* Use 0 instead of auto to prevent expansion */
  min-height: 0;
  max-height: 100%; /* Constrain to parent */
  overflow-y: auto !important;
  overflow-x: hidden;
  /* Ensure scrolling works */
  -webkit-overflow-scrolling: touch;
  pointer-events: auto !important;
  touch-action: pan-y;
  /* Force scrollable */
  position: relative;
  will-change: scroll-position;
  /* Prevent expansion beyond chat window */
  box-sizing: border-box;
}

/* Typing indicator, booking prompt - fixed size */
.ukbpm-chat-window > .ukbpm-typing-indicator,
.ukbpm-chat-window > .ukbpm-booking-prompt {
  flex: 0 0 auto;
  flex-shrink: 0; /* Prevent shrinking */
  overflow: visible !important; /* Ensure it's not clipped */
  z-index: 10; /* Ensure it's above messages */
}

/* Human handoff container - fixed size */
.ukbpm-chat-window > .ukbpm-handoff-container {
  flex: 0 0 auto;
  flex-shrink: 0;
  padding: 12px 20px;
  border-top: 1px solid var(--ukbpm-chat-border);
  background: var(--ukbpm-chat-muted);
}

/* Human handoff form container - fixed size */
.ukbpm-chat-window > .ukbpm-handoff-form-container {
  flex: 0 0 auto;
  flex-shrink: 0;
  overflow-y: auto;
  max-height: 500px;
}

/* Quick actions - fixed size */
.ukbpm-chat-window > .ukbpm-quick-actions {
  flex: 0 0 auto;
}

/* Input area - fixed at bottom, always visible */
.ukbpm-chat-window > .ukbpm-chat-input-area {
  flex: 0 0 auto;
  flex-shrink: 0;
  flex-grow: 0;
  /* Remove sticky - use flex instead */
  position: relative;
  /* Constrain height */
  max-height: 120px;
  overflow: hidden;
  /* Ensure it stays within chat window */
  align-self: flex-end;
  width: 100%;
  box-sizing: border-box;
}

@keyframes ukbpm-slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .ukbpm-chat-window {
    width: calc(100vw - 20px);
    height: calc(100vh - 20px);
    max-height: calc(100vh - 20px);
    bottom: 10px;
    right: 10px;
    border-radius: 12px;
  }

  #ukbpm-ai-chat-container {
    bottom: 10px;
    right: 10px;
  }

  body.has-sticky-cta #ukbpm-ai-chat-container {
    bottom: calc(10px + var(--sticky-cta-safe, 140px)) !important;
  }
}

/* ========================================
   CHAT HEADER
   ======================================== */
.ukbpm-chat-header {
  background: linear-gradient(135deg, var(--ukbpm-chat-primary) 0%, var(--ukbpm-chat-secondary) 100%);
  color: #ffffff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.ukbpm-chat-header-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.ukbpm-chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ukbpm-chat-avatar svg {
  width: 24px;
  height: 24px;
  color: #ffffff;
}

.ukbpm-chat-header-text h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
}

.ukbpm-chat-header-text p {
  margin: 2px 0 0 0;
  font-size: 12px;
  opacity: 0.9;
  line-height: 1.2;
}

.ukbpm-chat-status {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ukbpm-chat-status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  display: inline-block;
  animation: ukbpm-status-pulse 2s ease-in-out infinite;
}

@keyframes ukbpm-status-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.ukbpm-chat-close {
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s;
  outline: none;
}

.ukbpm-chat-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.ukbpm-chat-close:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

/* ========================================
   MESSAGES CONTAINER
   ======================================== */
.ukbpm-chat-messages {
  flex: 1 1 0; /* Use 0 instead of auto to prevent expansion */
  overflow-y: auto !important;
  overflow-x: hidden;
  padding: 20px;
  padding-bottom: 20px; /* Standard padding */
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
  min-height: 0; /* Critical for flex scrolling */
  max-height: 100%; /* Constrain to available space */
  /* Ensure scrolling works */
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  /* Ensure proper scrolling */
  overscroll-behavior: contain;
  /* Force scrollable */
  pointer-events: auto !important;
  touch-action: pan-y;
  position: relative;
  will-change: scroll-position;
  /* Prevent expansion beyond parent */
  height: 0; /* Force flex to calculate height */
}

/* Custom Scrollbar */
.ukbpm-chat-messages::-webkit-scrollbar {
  width: 6px;
}

.ukbpm-chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.ukbpm-chat-messages::-webkit-scrollbar-thumb {
  background: var(--ukbpm-chat-border);
  border-radius: 3px;
}

.ukbpm-chat-messages::-webkit-scrollbar-thumb:hover {
  background: var(--ukbpm-chat-text);
}

/* ========================================
   MESSAGE BUBBLES
   ======================================== */
.ukbpm-message {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  animation: ukbpm-message-fade-in 0.3s ease-out;
}

@keyframes ukbpm-message-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ukbpm-message-user {
  flex-direction: row-reverse;
}

.ukbpm-message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ukbpm-chat-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ukbpm-message-avatar svg {
  width: 20px;
  height: 20px;
  color: var(--ukbpm-chat-secondary);
}

.ukbpm-message-content {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 16px;
  line-height: 1.5;
  font-size: 14px;
}

.ukbpm-message-user .ukbpm-message-content {
  background: linear-gradient(135deg, var(--ukbpm-chat-accent) 0%, var(--ukbpm-chat-secondary) 100%);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.ukbpm-message-ai .ukbpm-message-content {
  background: var(--ukbpm-chat-muted);
  color: var(--ukbpm-chat-text);
  border-bottom-left-radius: 4px;
}

.ukbpm-message-content p {
  margin: 0;
  word-wrap: break-word;
}

.ukbpm-message-content strong {
  font-weight: 600;
}

.ukbpm-message-content em {
  font-style: italic;
}

.ukbpm-message-time {
  font-size: 11px;
  opacity: 0.6;
  margin-top: 4px;
  line-height: 1;
}

.ukbpm-message-user .ukbpm-message-time {
  text-align: right;
}

/* ========================================
   TYPING INDICATOR
   ======================================== */
.ukbpm-typing-indicator {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.ukbpm-typing-dots {
  display: flex;
  gap: 4px;
}

.ukbpm-typing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ukbpm-chat-text);
  opacity: 0.4;
  animation: ukbpm-typing-dot 1.4s ease-in-out infinite;
}

.ukbpm-typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.ukbpm-typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes ukbpm-typing-dot {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

.ukbpm-typing-indicator p {
  margin: 0;
  font-size: 12px;
  color: var(--ukbpm-chat-text);
  opacity: 0.7;
}

/* ========================================
   QUICK ACTIONS
   ======================================== */
.ukbpm-quick-actions {
  padding: 12px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
  border-top: 1px solid var(--ukbpm-chat-border);
  background: var(--ukbpm-chat-muted);
}

.ukbpm-quick-action {
  padding: 8px 12px;
  background: var(--ukbpm-chat-background);
  border: 1px solid var(--ukbpm-chat-border);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ukbpm-chat-text);
  cursor: pointer;
  transition: all 0.2s;
  outline: none;
  white-space: nowrap;
}

.ukbpm-quick-action:hover {
  background: var(--ukbpm-chat-primary);
  color: #ffffff;
  border-color: var(--ukbpm-chat-primary);
  transform: translateY(-1px);
}

.ukbpm-quick-action:active {
  transform: translateY(0);
}

.ukbpm-quick-action:focus {
  outline: 2px solid var(--ukbpm-chat-accent);
  outline-offset: 2px;
}

/* ========================================
   BOOKING PROMPT CARD
   ======================================== */
.ukbpm-booking-prompt {
  margin: 12px 20px;
  padding: 0;
  flex-shrink: 0;
  animation: ukbpm-booking-prompt-slide-in 0.4s ease-out;
  position: relative; /* Ensure proper positioning */
  overflow: visible !important; /* Prevent clipping */
  z-index: 10; /* Above messages */
  min-height: auto; /* Allow natural height */
}

.ukbpm-booking-prompt-content {
  background: linear-gradient(135deg, var(--ukbpm-chat-primary) 0%, var(--ukbpm-chat-secondary) 100%);
  color: #ffffff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 51, 102, 0.2);
  text-align: center;
  position: relative; /* Ensure proper positioning */
  z-index: 10; /* Above other elements */
  overflow: visible; /* Prevent content clipping */
  box-sizing: border-box; /* Include padding in height */
}

.ukbpm-booking-prompt-icon {
  font-size: 32px;
  margin-bottom: 8px;
  animation: ukbpm-booking-prompt-bounce 1s ease-in-out infinite;
}

.ukbpm-booking-prompt-content h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
}

.ukbpm-booking-prompt-content p {
  margin: 0 0 16px 0;
  font-size: 13px;
  line-height: 1.5;
  opacity: 0.95;
  color: #ffffff;
}

.ukbpm-booking-prompt-button {
  background: #ffffff;
  color: var(--ukbpm-chat-primary);
  border: none;
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 8px;
  width: 100%;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ukbpm-booking-prompt-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: #f0f0f0;
}

.ukbpm-booking-prompt-button:active {
  transform: translateY(0);
}

.ukbpm-booking-prompt-dismiss {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
}

.ukbpm-booking-prompt-dismiss:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

@keyframes ukbpm-booking-prompt-slide-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ukbpm-booking-prompt-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.ukbpm-booking-prompt-flash {
  animation: ukbpm-booking-prompt-flash 1s ease-in-out;
}

@keyframes ukbpm-booking-prompt-flash {
  0%, 100% {
    box-shadow: 0 4px 16px rgba(0, 51, 102, 0.2);
  }
  25%, 75% {
    box-shadow: 0 4px 24px rgba(0, 162, 255, 0.6);
  }
  50% {
    box-shadow: 0 4px 32px rgba(0, 162, 255, 0.8);
    transform: scale(1.02);
  }
}

/* ========================================
   HUMAN HANDOFF BUTTON
   ======================================== */
.ukbpm-handoff-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--ukbpm-chat-primary) 0%, var(--ukbpm-chat-secondary) 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 51, 102, 0.15);
}

.ukbpm-handoff-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 51, 102, 0.25);
  background: linear-gradient(135deg, var(--ukbpm-chat-secondary) 0%, var(--ukbpm-chat-primary) 100%);
}

.ukbpm-handoff-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 51, 102, 0.2);
}

.ukbpm-handoff-button svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ========================================
   HUMAN HANDOFF FORM
   ======================================== */
.ukbpm-handoff-form-container {
  flex: 0 0 auto;
  flex-shrink: 0;
  padding: 20px;
  border-top: 1px solid var(--ukbpm-chat-border);
  background: var(--ukbpm-chat-background);
  max-height: 500px;
  overflow-y: auto;
}

.ukbpm-handoff-form-content {
  background: var(--ukbpm-chat-muted);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--ukbpm-chat-border);
}

.ukbpm-handoff-form-content h4 {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--ukbpm-chat-primary);
}

.ukbpm-handoff-form-content > p {
  margin: 0 0 20px 0;
  font-size: 14px;
  color: var(--ukbpm-chat-text);
  line-height: 1.5;
}

.ukbpm-form-group {
  margin-bottom: 16px;
}

.ukbpm-form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ukbpm-chat-text);
}

.ukbpm-form-group input,
.ukbpm-form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--ukbpm-chat-border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ukbpm-chat-text);
  background: #ffffff;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.ukbpm-form-group input:focus,
.ukbpm-form-group textarea:focus {
  outline: none;
  border-color: var(--ukbpm-chat-primary);
  box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.ukbpm-form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.ukbpm-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.ukbpm-handoff-submit {
  flex: 1;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--ukbpm-chat-primary) 0%, var(--ukbpm-chat-secondary) 100%);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.ukbpm-handoff-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 51, 102, 0.25);
}

.ukbpm-handoff-submit:active:not(:disabled) {
  transform: translateY(0);
}

.ukbpm-handoff-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ukbpm-handoff-cancel {
  padding: 12px 20px;
  background: transparent;
  color: var(--ukbpm-chat-text);
  border: 1px solid var(--ukbpm-chat-border);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.ukbpm-handoff-cancel:hover {
  background: var(--ukbpm-chat-muted);
  border-color: var(--ukbpm-chat-text);
}

/* ========================================
   INPUT AREA
   ======================================== */
.ukbpm-chat-input-area {
  padding: 16px 20px;
  background: var(--ukbpm-chat-background);
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex: 0 0 auto; /* Fixed size, don't shrink or grow */
  flex-shrink: 0;
  flex-grow: 0;
  position: relative; /* Not sticky - use flex layout */
  z-index: 10;
  min-height: 60px;
  max-height: 120px; /* Prevent it from growing too large */
  height: auto; /* Let it size based on content, but max 120px */
  width: 100%;
  box-sizing: border-box;
  /* Add subtle shadow to separate from messages */
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
  border-top: 1px solid var(--ukbpm-chat-border);
  /* Ensure input is always visible */
  visibility: visible !important;
  opacity: 1 !important;
  /* Prevent overflow */
  overflow: hidden;
}

.ukbpm-chat-input {
  flex: 1;
  border: 1px solid var(--ukbpm-chat-border);
  border-radius: 24px;
  padding: 10px 16px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ukbpm-chat-text);
  background: var(--ukbpm-chat-muted);
  resize: none;
  outline: none;
  transition: all 0.2s;
  max-height: 120px;
  line-height: 1.5;
  min-height: 44px; /* Ensure minimum visible height */
  box-sizing: border-box;
}

.ukbpm-chat-input:focus {
  border-color: var(--ukbpm-chat-accent);
  background: var(--ukbpm-chat-background);
  box-shadow: 0 0 0 3px rgba(0, 162, 255, 0.1);
}

.ukbpm-chat-input::placeholder {
  color: var(--ukbpm-chat-text);
  opacity: 0.5;
}

.ukbpm-chat-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ukbpm-chat-primary) 0%, var(--ukbpm-chat-secondary) 100%);
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  outline: none;
}

.ukbpm-chat-send:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px var(--ukbpm-chat-shadow);
}

.ukbpm-chat-send:active {
  transform: scale(0.95);
}

.ukbpm-chat-send:focus {
  outline: 3px solid var(--ukbpm-chat-accent);
  outline-offset: 2px;
}

.ukbpm-chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  .ukbpm-chat-button,
  .ukbpm-chat-window,
  .ukbpm-message,
  .ukbpm-typing-dots span {
    animation: none;
    transition: none;
  }
}

/* Screen Reader Only */
.ukbpm-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
  #ukbpm-ai-chat-container {
    display: none;
  }
}

/* ========================================
   DARK MODE SUPPORT (Future)
   ======================================== */
@media (prefers-color-scheme: dark) {
  /* Dark mode styles can be added here if needed */
  /* Currently using light theme as per brand guidelines */
}

