/* ==========================================================================
   TULIP HOSPITAL BAGNAN - COMPONENTS & AI RECEPTIONIST CHATBOT STYLES
   ========================================================================== */

/* ==========================================================================
   1. 24/7 AI Smart Receptionist Chatbot Widget ("সুপ্রিয়া")
   ========================================================================== */
.tulip-receptionist-widget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  font-family: var(--font-body);
}

/* Floating Trigger Button */
.tulip-bot-trigger {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: #ffffff;
  padding: 0.6rem 1.25rem 0.6rem 0.6rem;
  border-radius: var(--radius-full);
  box-shadow: 0 10px 30px rgba(0, 150, 136, 0.35), 0 4px 12px rgba(9, 44, 72, 0.15);
  border: 2px solid var(--teal-primary);
  transition: var(--transition-smooth);
}

.tulip-bot-trigger:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 14px 38px rgba(0, 150, 136, 0.45);
}

.tulip-bot-trigger.hide {
  display: none;
}

.bot-avatar-badge {
  position: relative;
  width: 46px;
  height: 46px;
}

.bot-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--teal-primary);
}

.online-pulse {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 12px;
  height: 12px;
  background: var(--emerald-green);
  border: 2px solid #fff;
  border-radius: var(--radius-full);
  animation: onlineGlow 1.8s infinite;
}

@keyframes onlineGlow {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.bot-trigger-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.trigger-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.trigger-sub {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--primary-navy);
}

.bot-open-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--teal-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  margin-left: 0.25rem;
}

/* Chat Window Modal / Drawer */
.tulip-bot-window {
  display: none;
  width: 380px;
  height: 580px;
  max-height: 85vh;
  background: #ffffff;
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 50px rgba(9, 44, 72, 0.25), 0 0 1px rgba(0,0,0,0.1);
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--border-color);
  animation: slideUpFade 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.tulip-bot-window.active {
  display: flex;
}

@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Bot Header */
.tulip-bot-header {
  background: linear-gradient(135deg, var(--primary-navy) 0%, #0c3e66 100%);
  color: #fff;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bot-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.bot-header-avatar {
  position: relative;
  width: 42px;
  height: 42px;
}

.bot-header-avatar img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--cyan-accent);
}

.status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: var(--emerald-green);
  border: 2px solid var(--primary-navy);
  border-radius: var(--radius-full);
}

.bot-header-info h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}

.bot-header-info p {
  font-size: 0.72rem;
  color: var(--cyan-accent);
}

.bot-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-call-btn, .header-close-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: var(--transition-fast);
}

.header-call-btn:hover {
  background: var(--emerald-green);
}

.header-close-btn:hover {
  background: var(--red-emergency);
}

.tulip-bot-notice {
  background: #f0fdfa;
  color: var(--teal-dark);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.45rem 1rem;
  text-align: center;
  border-bottom: 1px solid rgba(0, 150, 136, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

/* Chat Messages Body */
.tulip-bot-messages {
  flex: 1;
  padding: 1.25rem;
  overflow-y: auto;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bot-message {
  display: flex;
  gap: 0.65rem;
  max-width: 90%;
  animation: fadeInMsg 0.3s ease;
}

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

.bot-message.user-message {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.msg-avatar img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.msg-bubble-wrap {
  display: flex;
  flex-direction: column;
}

.user-bubble-wrap {
  align-items: flex-end;
}

.msg-bubble {
  padding: 0.75rem 1rem;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.48;
}

.bot-message .msg-bubble {
  background: #ffffff;
  color: var(--text-main);
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(9, 44, 72, 0.06);
  border: 1px solid var(--border-color);
}

.user-message .msg-bubble {
  background: linear-gradient(135deg, var(--teal-primary) 0%, #00796b 100%);
  color: #ffffff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 150, 136, 0.25);
}

.msg-time {
  font-size: 0.68rem;
  color: var(--text-light);
  margin-top: 0.25rem;
  padding: 0 0.25rem;
}

.bot-link {
  color: var(--teal-primary);
  font-weight: 700;
  text-decoration: underline;
}

.bot-btn-call {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--red-emergency);
  color: #fff;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  margin: 0.3rem 0;
}

.bot-action-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--teal-primary);
  color: #fff;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  margin-top: 0.5rem;
}

/* Typing indicator */
.typing-dots {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.85rem 1.1rem;
}

.typing-dots span {
  width: 7px;
  height: 7px;
  background: var(--text-light);
  border-radius: var(--radius-full);
  animation: wave 1.2s infinite ease-in-out;
}

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

@keyframes wave {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}

/* Quick Action Chips */
.tulip-bot-chips {
  display: flex;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  overflow-x: auto;
  scrollbar-width: none;
}

.tulip-bot-chips::-webkit-scrollbar {
  display: none;
}

.bot-chip {
  flex-shrink: 0;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--primary-navy);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
}

.bot-chip:hover {
  background: var(--teal-primary);
  color: #fff;
  border-color: var(--teal-primary);
}

/* Form Input Area */
.tulip-bot-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
}

.tulip-bot-form input {
  flex: 1;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  outline: none;
  font-family: inherit;
  transition: var(--transition-fast);
}

.tulip-bot-form input:focus {
  border-color: var(--teal-primary);
}

.tulip-bot-form button {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--teal-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.tulip-bot-form button:hover {
  background: var(--teal-dark);
}

.bot-footer-credit {
  background: #ffffff;
  padding: 0.3rem 1rem 0.6rem;
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-light);
}

.bot-footer-credit a {
  color: var(--red-emergency);
  font-weight: 700;
}

/* ==========================================================================
   2. Modals (Appointment, Ambulance, Reports)
   ========================================================================== */
.tulip-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 27, 46, 0.75);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.tulip-modal-overlay.active {
  display: flex;
}

.tulip-modal-card {
  background: #ffffff;
  width: 100%;
  max-width: 580px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  position: relative;
  animation: zoomInModal 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes zoomInModal {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header-banner {
  background: linear-gradient(135deg, var(--primary-navy) 0%, #0c3e66 100%);
  color: #fff;
  padding: 1.5rem 2rem;
  position: relative;
}

.modal-header-banner.urgent-banner {
  background: linear-gradient(135deg, var(--red-emergency) 0%, var(--red-dark) 100%);
}

.modal-header-banner h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.3rem;
}

.modal-header-banner p {
  font-size: 0.85rem;
  color: #e2e8f0;
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

.modal-form-body {
  padding: 2rem;
}

.form-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 0.4rem;
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition-fast);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--teal-primary);
  box-shadow: 0 0 0 3px rgba(0, 150, 136, 0.12);
}

/* Lab Report Search Card */
.report-card-found {
  background: #f0fdfa;
  border: 1.5px solid var(--teal-primary);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.report-found-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 150, 136, 0.2);
  padding-bottom: 0.85rem;
}

.report-badge-status {
  background: var(--emerald-green);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.report-found-header h4 {
  font-size: 1.15rem;
  color: var(--primary-navy);
  margin-top: 0.25rem;
}

.report-big-icon {
  font-size: 2.5rem;
  color: var(--teal-primary);
}

.report-details-list {
  font-size: 0.85rem;
  color: var(--text-main);
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.report-download-actions {
  display: flex;
  gap: 0.75rem;
}

.report-loading {
  text-align: center;
  padding: 2rem;
  color: var(--teal-primary);
  font-weight: 700;
}

/* ==========================================================================
   3. Toast Notification
   ========================================================================== */
.tulip-toast {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 100000;
  max-width: 420px;
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(9, 44, 72, 0.2);
  padding: 1.2rem 1.5rem;
  border-left: 5px solid var(--emerald-green);
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.tulip-toast.show {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.toast-success {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  color: var(--text-main);
  font-size: 0.88rem;
}

.toast-success i {
  color: var(--emerald-green);
  font-size: 1.6rem;
  margin-top: 0.1rem;
}

.toast-urgent {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  color: var(--text-main);
  font-size: 0.88rem;
}

.toast-urgent i {
  color: var(--red-emergency);
  font-size: 1.6rem;
  margin-top: 0.1rem;
}

/* ==========================================================================
   4. Gallery Lightbox
   ========================================================================== */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 27, 46, 0.94);
  z-index: 100001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  flex-direction: column;
}

.gallery-lightbox.active {
  display: flex;
}

.lightbox-content-box {
  max-width: 900px;
  max-height: 80vh;
  position: relative;
}

.lightbox-content-box img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-caption {
  color: #fff;
  text-align: center;
  margin-top: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.lightbox-close-btn {
  position: absolute;
  top: 2rem;
  right: 2rem;
  color: #fff;
  font-size: 2rem;
  background: transparent;
}

/* Responsive adjustment for Mobile Chatbot & Sticky Bar */
@media (max-width: 480px) {
  .tulip-receptionist-widget {
    bottom: 4.5rem;
    right: 1rem;
  }

  .tulip-bot-trigger {
    padding: 0.6rem 1rem;
  }

  .tulip-bot-window {
    width: 100%;
    height: 85vh;
    max-height: 85vh;
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }

  .form-group-row {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   5. Interactive Booking & Payment Wizard Styles
   ========================================================================== */
.booking-step-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 150, 136, 0.12);
  color: var(--teal-primary);
  font-weight: 800;
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 9999px;
  margin-bottom: 12px;
}

.upi-app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.btn-upi-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.82rem;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-upi-app:hover, .btn-upi-app.active {
  border-color: #059669;
  background: #ecfdf5;
  color: #065f46;
}

.qr-code-box {
  background: #ffffff;
  border: 2px dashed #059669;
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  margin: 14px 0;
}

/* ==========================================================================
   6. Mobile Sticky Emergency Action Bar
   ========================================================================== */
.mobile-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #092c48;
  border-top: 1.5px solid rgba(255, 255, 255, 0.15);
  padding: 8px 12px;
  z-index: 9999;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  .mobile-sticky-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 6px;
  }
  
  body {
    padding-bottom: 60px;
  }
}

.mobile-bar-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
  padding: 6px 4px;
  border-radius: 6px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-bar-btn i {
  font-size: 1.05rem;
}

.mobile-bar-btn.btn-emergency-call {
  background: #e63946;
  color: #ffffff;
}

.mobile-bar-btn.btn-book-token {
  background: #009688;
  color: #ffffff;
}

