/* CSS Variables for Chat - SpaceCatWeb Theme */
:root {
  --accent: #E67E22;
  --accent-dark: #D35400;
  --accent-glow: rgba(230, 126, 34, 0.5);
  --accent-light: #F39C12;
  --glass-bg: rgba(255, 255, 255, 0.98);
  --glass-border: rgba(230, 126, 34, 0.15);
  --ease-pro: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scroll to Top Button - Matches chat trigger size */
#scroll-to-top {
  position: fixed;
  bottom: 80px;
  right: 30px;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 8001;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(255,255,255,0.15);
  transition: all .38s var(--ease-pro);
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#scroll-to-top i {
  font-size: 16px;
}

#scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
#scroll-to-top:hover {
  transform: translateY(-5px) rotate(-8deg) scale(1.05);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 0, 0, 0.3);
}
#scroll-to-top:focus {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 640px) {
  #scroll-to-top {
    right: 24px;
    bottom: 82px;
    width: 36px;
    height: 36px;
  }
  #scroll-to-top i {
    font-size: 16px;
  }
  #chat-trigger {
    right: 24px;
    bottom: 24px;
  }
  #chat-toast {
    right: 24px;
    bottom: 170px;
  }
  .chat-policy-bubble {
    margin: 0 14px 16px;
    font-size: 0.76rem;
  }
}

/* Chat Trigger - Enhanced with glassmorphism */
#chat-trigger {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 8001;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(255,255,255,0.15);
  transition: all .38s var(--ease-pro);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
#chat-trigger:hover {
  transform: translateY(-5px) rotate(8deg) scale(1.05);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 0, 0, 0.3);
}
#chat-trigger:focus {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
body.chat-open-active #chat-trigger {
  transform: translate3d(0, 90px, 0) scale(0.65) rotate(14deg);
  opacity: 0;
  pointer-events: none;
  filter: blur(1px);
}
body.chat-open-active #scroll-to-top {
  opacity: 0;
  transform: translate3d(0, 60px, 0) scale(0.9);
  pointer-events: none;
}
body.chat-open-active #scroll-to-top.visible {
  opacity: 0;
}
.notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #ff3b3b;
  color: white;
  font-size: 0.7rem;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 20px;
  border: 2px solid #1a1a1a;
  min-width: 18px;
  text-align: center;
}

/* Support Online Bubble - Text cloud notification */
.support-online-bubble {
  position: fixed;
  bottom: 45px;
  right: 95px;
  background: linear-gradient(135deg, #ffffff, #f8f8f8);
  color: #333;
  padding: 12px 18px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2), 0 0 1px rgba(0,0,0,0.1);
  border: 1px solid rgba(230, 126, 34, 0.2);
  z-index: 8001;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Poppins', 'Outfit', sans-serif;
  white-space: nowrap;
  transition: all 0.3s var(--ease-smooth);
  animation: slideInBounce 0.6s var(--ease-pro) 0.5s both, fadeOutBubble 0.5s ease-out 6s forwards;
}

/* Arrow pointing to chat button */
.support-online-bubble::after {
  content: '';
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 0 8px 8px;
  border-color: transparent transparent transparent #f8f8f8;
  filter: drop-shadow(2px 0 2px rgba(0,0,0,0.1));
}

.support-bubble-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2fae4b;
  box-shadow: 0 0 0 3px rgba(47, 174, 75, 0.2);
  animation: pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

.support-bubble-text {
  color: #333;
  font-weight: 600;
  letter-spacing: 0.3px;
}

@keyframes slideInBounce {
  0% {
    opacity: 0;
    transform: translateX(30px);
  }
  60% {
    opacity: 1;
    transform: translateX(-5px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeOutBubble {
  0% {
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    opacity: 0;
    transform: translateX(20px);
    visibility: hidden;
  }
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 3px rgba(47, 174, 75, 0.2);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(47, 174, 75, 0.4);
  }
}

/* Hide bubble when chat is open */
#uwf-chat-container:not(.chat-closed) ~ .support-online-bubble {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .support-online-bubble {
    animation: none;
  }
  .support-bubble-dot {
    animation: none;
  }
}

/* Chat Container - Glassmorphism Style */
#uwf-chat-container {
  position: fixed;
  bottom: 95px;
  right: 25px;
  width: var(--chat-width, 360px);
  height: var(--chat-height, 520px);
  max-height: calc(var(--chat-max-height-vh, 85vh));
  max-width: calc(100vw - 40px);
  z-index: 8000;
  font-family: 'Poppins', 'Outfit', sans-serif;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 1px rgba(230, 126, 34, 0.2);
  border-radius: 20px;
  overflow: hidden;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto 1fr auto;
  transition: opacity .45s var(--ease-smooth), transform .45s var(--ease-smooth), visibility .45s;
  transform-origin: bottom right;
  visibility: visible;
  opacity: 1;
}
#uwf-chat-container.chat-closed {
  opacity: 0;
  visibility: hidden;
  transform: scale(0.95) translateY(20px);
  pointer-events: none;
}

/* Header: title on left, icons on right (same row) - Enhanced with accent bar */
.chat-header {
  background: linear-gradient(135deg, #E67E22 0%, #D35400 100%);
  padding: 12px 14px;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: default;
  border-bottom: 1px solid var(--glass-border);
  gap: 10px;
  position: relative;
  overflow: hidden;
}
/* Animated accent bar */
.chat-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #F39C12, #E67E22, #F39C12);
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 100% 0%; }
}
@media (prefers-reduced-motion: reduce) {
  .chat-header::after {
    animation: none;
  }
}
#chat-header-title {
  font-weight: 900;
  letter-spacing: 1px;
  font-size: .85rem;
  color: #ffffff;
  flex: 0 0 auto;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}
.chat-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  position: relative;
  z-index: 1;
}
.chat-controls button {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e0e0e0;
  background: rgba(248, 248, 248, 0.8);
  backdrop-filter: blur(10px);
  color: #333;
  border-radius: 10px;
  padding: 8px;
  transition: all .25s var(--ease-smooth);
  cursor: pointer;
}
.chat-controls button:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(230, 126, 34, 0.6);
  transform: translateY(-2px);
  color: var(--accent);
  box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}
.chat-controls button:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.chat-controls button:active {
  transform: translateY(0);
}
.chat-controls button i { 
  width: 18px; 
  height: 18px;
  font-size: 16px;
}

/* Rotación del chevron al minimizar */
#toggle-min i { transition: transform .25s ease; }
#uwf-chat-container.chat-closed #toggle-min i { transform: rotate(180deg); }

/* Admin status: se colapsa con clase .fade-away */
.admin-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 0.8rem;
  color: var(--accent);
  background: #f8f8f8;
  border-bottom: 1px solid rgba(230, 126, 34, 0.1);
}
.admin-status.fade-away {
  opacity: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-bottom: none;
  overflow: hidden;
  transition: all .35s ease;
}
.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2fae4b;
  box-shadow: 0 0 0 2px rgba(47, 47, 47, 0.8);
}

/* Main area en Grid */
#chat-main-area {
  display: grid;
  grid-template-rows: auto 1fr auto auto auto;
  grid-template-areas:
    "head"
    "history"
    "typing"
    "input"
    "policy";
  height: 100%;
  min-height: 0;
}
#chat-main-area .admin-status { grid-area: head; }
#chat-main-area .chat-policy-bubble { grid-area: policy; }

/* Historial - Enhanced with subtle gradient */
#chat-history {
  grid-area: history;
  padding: 20px;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 220px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-dark) transparent;
  -webkit-overflow-scrolling: touch;
}
#chat-history::-webkit-scrollbar {
  width: 6px;
}
#chat-history::-webkit-scrollbar-track {
  background: transparent;
}
#chat-history::-webkit-scrollbar-thumb {
  background: #D35400;
  border-radius: 10px;
}
#chat-history::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Typing - Enhanced animation */
#chat-status-indicator {
  grid-area: typing;
  font-size: 0.75rem;
  color: var(--accent);
  padding: 8px 12px;
  min-height: 20px;
  opacity: 0;
  transition: opacity 0.3s var(--ease-smooth);
  text-align: center;
  font-weight: 500;
}
.typing-dots span { 
  animation: blink 1.4s infinite ease-in-out; 
  display: inline-block;
  font-size: 1.2em;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 
  0%, 60%, 100% { opacity: 1; transform: translateY(0); } 
  30% { opacity: 0.3; transform: translateY(-3px); } 
}
@media (prefers-reduced-motion: reduce) {
  .typing-dots span {
    animation: none;
    opacity: 1;
  }
}

/* Burbujas - Sin sombras */
.msg-bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  box-sizing: border-box;
  margin-bottom: 6px;
  transition: transform 0.2s var(--ease-smooth);
}
@media (prefers-reduced-motion: reduce) {
  .msg-bubble {
    transition: none;
  }
  .msg-bubble:hover {
    transform: none;
  }
}
.msg-bubble:hover {
  transform: translateY(-1px);
}

/* Ambas burbujas tienen el mismo estilo base */
.msg-user,
.msg-admin { 
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  background: #f0f0f0;
  color: #333;
  border-radius: 16px;
  max-width: 85%;
}

.msg-user {
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.msg-admin {
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.msg-avatar {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 2px solid rgba(230, 126, 34, 0.2);
}

.msg-content { 
  display: flex; 
  flex-direction: column; 
  gap: 6px; 
  flex: 1 1 auto; 
  min-width: 0; 
}

.msg-text {
  color: #333;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Chip base - gris para usuario */
.sender-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.08);
  color: #333;
  border-radius: 999px;
  align-self: flex-start;
  width: fit-content;
  max-width: 100%;
  font-size: 0.7rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sender-chip .sender-name { 
  font-weight: 700; 
  letter-spacing: .2px; 
  color: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Chip de soporte - verde con círculo */
.sender-chip.sender-admin {
  background: linear-gradient(90deg, #2fae4b, #1f8a36);
  color: #ffffff;
}

.sender-chip.sender-admin .sender-name {
  color: #ffffff;
}

.sender-chip.sender-admin .sender-icon {
  width: 10px;
  height: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}

.sender-chip.sender-admin .sender-icon::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #2fae4b;
  border-radius: 50%;
  display: block;
}

/* Usuario NO tiene círculo */
.sender-chip.sender-user .sender-icon {
  display: none;
}
.sender-chip .sender-name { font-weight: 700; letter-spacing: .2px; color: #ffffff; }

.msg-bubble { position: relative; }
.msg-timestamp {
  font-size: 0.7rem;
  opacity: 0;
  transition: all 0.2s var(--ease-smooth);
  transform: translateY(6px);
  letter-spacing: 0.3px;
}
.msg-admin .msg-timestamp {
  color: rgba(51, 51, 51, 0.55);
  align-self: flex-end;
}
.msg-user .msg-timestamp {
  color: rgba(255, 255, 255, 0.7);
  display: inline-block;
  margin-top: 4px;
}
.msg-bubble:hover .msg-timestamp {
  opacity: 1;
  transform: translateY(0);
}

/* Input - Refined styling */
.chat-inputs {
  grid-area: input;
  padding: 12px 14px;
  background: linear-gradient(180deg, #1a1a1a 0%, #1f1f1f 100%);
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-input-bar {
  grid-area: input;
  padding: 12px 14px;
  background: #f8f8f8;
  border-top: 1px solid var(--glass-border);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}
.input-row { display: flex; gap: 10px; align-items: center; width: 100%; }
.chat-inputs input,
.chat-input-bar input#u-msg {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  flex: 1;
  padding: 14px 16px;
  min-height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid #ddd;
  color: #333;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  transition: all 0.2s var(--ease-smooth);
}
.chat-inputs input:focus,
.chat-input-bar input#u-msg:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.15);
  background: rgba(255, 255, 255, 0.98);
}
.chat-inputs input::placeholder,
.chat-input-bar input#u-msg::placeholder {
  color: #999;
}
.btn-send-chat,
.chat-input-bar .btn-send-chat {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  border: none;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s var(--ease-smooth);
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
  flex-shrink: 0;
}
.btn-send-chat:hover { 
  background: linear-gradient(135deg, #F39C12, var(--accent));
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(230, 126, 34, 0.4);
}
.btn-send-chat:active { 
  transform: translateY(0);
}
.btn-send-chat:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.chat-policy-bubble {
  margin: 0 20px 18px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(211, 84, 0, 0.08);
  border: 1px solid rgba(211, 84, 0, 0.15);
  border-left: 4px solid var(--accent);
  color: rgba(15, 21, 53, 0.7);
  font-size: 0.8rem;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-shadow: 0 16px 40px rgba(15, 42, 80, 0.1);
}
.chat-policy-bubble i {
  font-size: 1rem;
  color: var(--accent);
  margin-top: 2px;
}

.chat-empty-state {
  margin: auto;
  text-align: center;
  padding: 24px 20px;
  border-radius: 18px;
  border: 1px dashed rgba(211, 84, 0, 0.2);
  background: linear-gradient(145deg, rgba(211, 84, 0, 0.04), rgba(255, 255, 255, 0.92));
  max-width: 260px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 18px 38px rgba(15, 42, 80, 0.08);
}
.chat-empty-state .empty-icon {
  width: 50px;
  height: 50px;
  border-radius: 18px;
  background: rgba(211, 84, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: var(--accent);
  box-shadow: 0 10px 24px rgba(211, 84, 0, 0.15);
}
.chat-empty-state h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #0f1535;
  margin-bottom: 10px;
}
.chat-empty-state p {
  font-size: 0.85rem;
  color: rgba(15, 21, 53, 0.65);
}

/* Toast del chat (externo) */
#chat-toast {
  position: fixed;
  bottom: 90px;
  right: 20px;
  max-width: 300px;
  background: linear-gradient(135deg, #1a1a1a, #252525);
  color: white;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.4;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 1px rgba(230, 126, 34, 0.5);
  border: 1px solid rgba(230, 126, 34, 0.3);
  border-left: 4px solid var(--accent);
  z-index: 999;
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
}
#chat-toast.show { transform: translateX(0); opacity: 1; }

/* Fullscreen mode styles */
#uwf-chat-container.chat-fullscreen {
  position: fixed;
  inset: 0;
  padding-bottom: env(safe-area-inset-bottom, 0);
  width: 100vw;
  height: 100dvh;
  max-height: none;
  border-radius: 0;
  box-shadow: none;
  z-index: 99999;
  display: grid;
  grid-template-rows: auto 1fr auto;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
}

/* Fallback for browsers that don't support dvh */
@supports not (height: 100dvh) {
  #uwf-chat-container.chat-fullscreen {
    height: 100vh;
  }
}

/* iOS Safari specific fix */
@supports (-webkit-touch-callout: none) {
  #uwf-chat-container.chat-fullscreen {
    height: -webkit-fill-available;
  }
}

/* Block body scroll when chat is fullscreen */
body.no-scroll {
  overflow: hidden;
  height: 100vh;
}

/* Responsive */
@media (max-width: 480px) {
  /* Scroll to top button on mobile */
  #scroll-to-top {
    bottom: calc(95px + env(safe-area-inset-bottom, 0px));
    right: 20px;
    width: 36px;
    height: 36px;
  }
  
  #scroll-to-top i {
    font-size: 16px;
  }
  
  #uwf-chat-container {
    left: 10px;
    right: 10px;
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    width: calc(100vw - 20px);
    max-width: 100vw;
    min-height: 60vh;
    height: auto;
    max-height: min(85dvh, 600px);
    overscroll-behavior: contain;
    transform: translateZ(0);
  }
  
  /* Mobile adjustments for support bubble */
  .support-online-bubble {
    bottom: 95px;
    right: 10px;
    left: auto;
    max-width: calc(100vw - 95px);
    font-size: 0.75rem;
    padding: 10px 14px;
  }
  
  .support-online-bubble::after {
    right: -8px;
    left: auto;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    border-width: 8px 0 8px 8px;
    border-color: transparent transparent transparent #f8f8f8;
  }
}

/* Formulario Pre-Chat: estilos completos y específicos - Enhanced */
#uwf-chat-container form#pre-chat-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  background: #ffffff;
  border-top: 1px solid var(--glass-border);
  font-family: 'Poppins', 'Outfit', sans-serif;
}

#uwf-chat-container form#pre-chat-form .chat-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#uwf-chat-container form#pre-chat-form .chat-field label {
  font-size: 0.75rem;
  color: #666;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

#uwf-chat-container form#pre-chat-form .chat-field input {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid #ddd;
  color: #333;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s var(--ease-smooth);
  font-family: 'Poppins', sans-serif;
}

#uwf-chat-container form#pre-chat-form .chat-field input::placeholder {
  color: #999;
}

#uwf-chat-container form#pre-chat-form .chat-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.15);
  background: rgba(255, 255, 255, 0.98);
}

#uwf-chat-container form#pre-chat-form .btn-start-chat {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  border: none;
  padding: 16px;
  border-radius: 12px;
  font-weight: 900;
  cursor: pointer;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  transition: all 0.3s var(--ease-smooth);
  font-family: 'Poppins', 'Outfit', sans-serif;
  box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
  font-size: 0.85rem;
}

#uwf-chat-container form#pre-chat-form .btn-start-chat:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(230, 126, 34, 0.4);
  background: linear-gradient(135deg, #F39C12, var(--accent));
}

#uwf-chat-container form#pre-chat-form .btn-start-chat:active {
  transform: translateY(0);
}

/* Ajustes móviles */
@media (max-width: 420px) {
  #uwf-chat-container form#pre-chat-form {
    padding: 14px;
    gap: 10px;
  }
  #uwf-chat-container form#pre-chat-form .chat-field input {
    padding: 12px;
    font-size: 0.9rem;
  }
  #uwf-chat-container form#pre-chat-form .btn-start-chat {
    padding: 12px;
  }
}