/* ==========================================================================
   CELEBRATION — Concierge AI Widget & Drawer Styles
   Haute Couture Chat Interface
   ========================================================================== */

/* ── TRIGGER BUTTON ── */
.concierge-trigger {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  left: calc(20px + env(safe-area-inset-left, 0px));
  z-index: 95;
  background: #24211D;
  color: #F4F1EA;
  border: 1px solid #C5A059;
  padding: 0.85rem 1.6rem;
  border-radius: 50px;
  font-family: 'Raleway', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 10px 28px rgba(36, 33, 29, 0.28);
  cursor: pointer;
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.concierge-trigger:hover {
  background: #000000;
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(36, 33, 29, 0.35);
  border-color: #E2C07D;
}

.trigger-spark {
  color: #C5A059;
  font-size: 0.85rem;
}

/* ── MODAL CONTAINER & BACKDROP ── */
.concierge-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.concierge-modal.open {
  pointer-events: auto;
  opacity: 1;
}

.concierge-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(36, 33, 29, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* ── DRAWER PANEL ── */
.concierge-panel {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 100%;
  background: #FAF7F2;
  box-shadow: -10px 0 40px rgba(36, 33, 29, 0.2);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
}

.concierge-modal.open .concierge-panel {
  transform: translateX(0);
}

/* ── HEADER ── */
.concierge-header {
  padding: 1.8rem 1.6rem 1.4rem;
  background: #24211D;
  color: #F4F1EA;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid rgba(197, 160, 89, 0.3);
}

.concierge-title-box {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.concierge-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: 'Raleway', sans-serif;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #C5A059;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background: #C5A059;
  border-radius: 50%;
  animation: pulseConcierge 1.8s infinite;
}

@keyframes pulseConcierge {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.4); }
}

.concierge-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.concierge-sub {
  font-family: 'Raleway', sans-serif;
  font-size: 0.65rem;
  color: #A59D93;
  letter-spacing: 0.12em;
}

.concierge-close {
  background: transparent;
  border: none;
  color: #FAF7F2;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
}
.concierge-close:hover { color: #C5A059; }

/* ── CONTEXT BAR ── */
.concierge-context-bar {
  padding: 0.8rem 1.2rem;
  background: #EAE5DC;
  border-bottom: 1px solid rgba(158, 149, 137, 0.25);
  display: flex;
  gap: 0.6rem;
}

.concierge-context-bar input {
  flex: 1;
  padding: 0.55rem 0.9rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.78rem;
  background: #FFFFFF;
  border: 1px solid rgba(158, 149, 137, 0.4);
  border-radius: 4px;
  outline: none;
  color: #24211D;
}
.concierge-context-bar input:focus {
  border-color: #C5A059;
}

.concierge-context-bar button {
  background: #24211D;
  color: #FFFFFF;
  border: none;
  padding: 0.55rem 1rem;
  border-radius: 4px;
  font-family: 'Raleway', sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.concierge-context-bar button:hover { background: #C5A059; color: #24211D; }

/* Active Context Banner */
.concierge-active-event {
  background: #F1ECE3;
  padding: 0.55rem 1.2rem;
  border-bottom: 1px solid rgba(197, 160, 89, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Raleway', sans-serif;
  font-size: 0.66rem;
  font-weight: 600;
  color: #24211D;
  letter-spacing: 0.08em;
}

.active-dot {
  color: #C5A059;
  margin-right: 0.4rem;
}

#btnClearContext {
  background: none;
  border: none;
  font-size: 0.8rem;
  color: #756F68;
  cursor: pointer;
}

/* ── CHAT BODY ── */
.concierge-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  background: #FAF7F2;
}

.c-msg {
  max-width: 88%;
  padding: 0.95rem 1.25rem;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.55;
  word-break: break-word;
}

.c-msg.user {
  align-self: flex-end;
  background: #24211D;
  color: #FFFFFF;
  border-bottom-right-radius: 2px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 400;
}

.c-msg.bot {
  align-self: flex-start;
  background: #FFFFFF;
  color: #24211D;
  border: 1px solid rgba(158, 149, 137, 0.22);
  border-bottom-left-radius: 2px;
  box-shadow: 0 4px 12px rgba(36, 33, 29, 0.04);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.65;
}

.c-msg.bot strong { font-weight: 600; color: #111; }
.c-msg.bot em { font-style: italic; }
.c-msg.bot code {
  background: #F1ECE3;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-family: monospace;
  font-size: 0.9em;
  color: #C5A059;
  font-weight: 600;
}
.c-msg.bot a {
  color: #C5A059;
  text-decoration: underline;
  font-weight: 600;
}

/* Typing indicator */
.c-typing {
  align-self: flex-start;
  background: #FFFFFF;
  border: 1px solid rgba(158, 149, 137, 0.22);
  padding: 0.8rem 1.2rem;
  border-radius: 12px;
  display: flex;
  gap: 5px;
  align-items: center;
}
.c-typing span {
  width: 6px;
  height: 6px;
  background: #9E9589;
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out both;
}
.c-typing span:nth-child(1) { animation-delay: -0.32s; }
.c-typing span:nth-child(2) { animation-delay: -0.16s; }

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

/* ── SUGGESTION CHIPS ── */
.concierge-chips {
  padding: 0.6rem 1rem;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  background: #FAF7F2;
  border-top: 1px solid rgba(158, 149, 137, 0.15);
  scrollbar-width: none;
}
.concierge-chips::-webkit-scrollbar { display: none; }

.chip {
  background: #FFFFFF;
  border: 1px solid rgba(158, 149, 137, 0.35);
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
  font-family: 'Raleway', sans-serif;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #756F68;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}
.chip:hover {
  background: #24211D;
  color: #FFFFFF;
  border-color: #24211D;
}

/* ── INPUT FORM ── */
.concierge-form {
  padding: 0.9rem 1.2rem calc(0.9rem + env(safe-area-inset-bottom, 0px));
  background: #FFFFFF;
  border-top: 1px solid rgba(158, 149, 137, 0.25);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.concierge-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(158, 149, 137, 0.35);
  border-radius: 50px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px; /* Previene auto-zoom molesto en iPhone Safari */
  outline: none;
  color: #24211D;
  background: #FAF7F2;
  -webkit-appearance: none;
}
.concierge-form input:focus {
  border-color: #C5A059;
  background: #FFFFFF;
}

.concierge-form button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #24211D;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  flex-shrink: 0;
}
.concierge-form button:hover {
  background: #C5A059;
  transform: scale(1.05);
}
.concierge-form button svg {
  width: 16px;
  height: 16px;
  fill: #FFFFFF;
}

/* ── FOOTER NOTE ── */
.concierge-footer-note {
  padding: 0.6rem 1.2rem 0.8rem;
  background: #FAF7F2;
  text-align: center;
  font-family: 'Raleway', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: #9E9589;
  border-top: 1px solid rgba(158, 149, 137, 0.12);
}
.concierge-footer-note a {
  color: #24211D;
  font-weight: 600;
  text-decoration: underline;
}

/* Mobile full width */
@media (max-width: 480px) {
  .concierge-panel {
    max-width: 100%;
  }
  .concierge-trigger {
    left: 16px;
    bottom: 16px;
    padding: 0.75rem 1.2rem;
    font-size: 0.62rem;
  }
}
