/* quick-booking.css - Floating Helper Widget & Drawer Styles */

/* 1. Floating Badge Button */
.qb-float-badge {
  position: fixed;
  bottom: -80px; /* Hidden offscreen by default */
  right: 30px;
  z-index: 99998;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #020c3a 0%, #cf2338 100%);
  border: 2px solid #ffcc00;
  color: #ffffff !important;
  border-radius: 50px;
  padding: 14px 24px;
  font-family: 'Kanit', sans-serif;
  font-size: 14.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 8px 25px rgba(2, 12, 58, 0.35);
  cursor: pointer;
  opacity: 0;
  transition: transform 0.3s ease, bottom 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s;
  text-decoration: none !important;
}

.qb-float-badge.active {
  bottom: 30px;
  opacity: 1;
}

.qb-float-badge:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 12px 30px rgba(2, 12, 58, 0.5);
  border-color: #ffffff;
}

.qb-float-badge span.qb-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: qbPulse 1.8s infinite;
}

@keyframes qbPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

/* 2. Bottom-up Drawer Panel */
.qb-drawer-panel {
  position: fixed;
  bottom: 90px;
  right: 30px;
  width: 450px;
  height: 580px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(2, 12, 58, 0.1);
  border-top: 4px solid #ffcc00;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(120%) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
}

.qb-drawer-panel.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* 3. Header Styling */
.qb-header {
  background: #020c3a;
  color: #ffffff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  border-bottom: 2px solid rgba(255, 255, 255, 0.05);
}

.qb-logo-img {
  height: 32px;
  width: 32px;
  object-fit: contain;
}

.qb-header-info h4 {
  font-family: 'Kanit', sans-serif;
  font-weight: 800;
  font-size: 16px;
  margin: 0;
  text-transform: uppercase;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.qb-header-info p {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  margin: 2px 0 0 0;
}

.qb-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #ffffff;
  font-size: 20px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.qb-close-btn:hover {
  background: #cf2338;
  color: #ffffff;
}

/* 4. Body Scrolling & Views */
.qb-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  box-sizing: border-box;
}

.qb-event-select-wrapper {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.qb-event-select-wrapper label {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 800;
  color: #64748b;
}

.qb-select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #020c3a;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
}

.qb-select:focus {
  border-color: #020c3a;
  background: #ffffff;
  outline: none;
}

/* 5. Hotel Card Layout */
.qb-results-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qb-hotel-card {
  display: flex !important;
  flex-direction: row !important;
  height: 44px !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px !important;
  overflow: hidden !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02) !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  align-items: center !important;
}

.qb-hotel-card:hover {
  box-shadow: 0 3px 8px rgba(2, 12, 58, 0.06) !important;
  border-color: #cbd5e1 !important;
  background: #f8fafc !important;
}

.qb-card-thumb {
  width: 50px !important;
  height: 44px !important;
  flex-shrink: 0 !important;
  background: #f1f5f9 !important;
  box-sizing: border-box !important;
}

.qb-card-thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.qb-card-details {
  flex: 1 !important;
  padding: 0 12px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  height: 100% !important;
}

.qb-card-hotel-name {
  font-family: 'Kanit', sans-serif !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
  color: #020c3a !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  flex: 1 !important;
  margin-right: 8px !important;
}

.qb-card-hotel-price {
  font-family: 'Kanit', sans-serif !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
  color: #cf2338 !important;
  flex-shrink: 0 !important;
}

/* 6. Form View Layout */
.qb-form-view {
  display: none;
  flex-direction: column;
  gap: 12px;
  animation: fadeIn 0.3s ease;
}

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

.qb-form-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.qb-back-btn {
  background: #f1f5f9;
  border: none;
  color: #020c3a;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.qb-back-btn:hover {
  background: #e2e8f0;
}

.qb-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qb-form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.qb-form-group label {
  font-size: 10.5px;
  text-transform: uppercase;
  font-weight: 800;
  color: #64748b;
}

.qb-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12.5px;
  color: #020c3a;
  box-sizing: border-box;
  background: #ffffff;
}

.qb-input:focus {
  border-color: #020c3a;
  outline: none;
}

.qb-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.qb-submit-btn {
  background: #020c3a;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(2, 12, 58, 0.2);
  transition: all 0.2s ease;
  margin-top: 8px;
}

.qb-submit-btn:hover {
  background: #cf2338;
}

/* 7. General States */
.qb-loading {
  text-align: center;
  padding: 30px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.qb-empty {
  text-align: center;
  padding: 30px;
  color: #64748b;
  font-size: 12.5px;
}

/* 8. Mobile Responsiveness */
@media (max-width: 500px) {
  .qb-drawer-panel {
    bottom: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    border-top: none;
  }
  .qb-float-badge {
    right: 20px;
    bottom: 20px;
  }
}

/* 2027 FAST BOOKING FIX */
.qb-list-view {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 15px;
}

.qb-results-list {
  flex: 1;
  min-height: 0;
  max-height: 430px;
  overflow-y: auto;
  padding: 2px 5px 2px 1px;
  gap: 10px;
}

.qb-hotel-card {
  appearance: none !important;
  width: 100% !important;
  min-height: 72px !important;
  height: auto !important;
  display: grid !important;
  grid-template-columns: 72px minmax(0, 1fr) 20px !important;
  align-items: stretch !important;
  padding: 0 !important;
  margin: 0 !important;
  color: #020c3a !important;
  text-align: left !important;
  background: #ffffff !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  box-shadow: 0 2px 8px rgba(2, 12, 58, 0.06) !important;
  cursor: pointer !important;
}

.qb-hotel-card:hover,
.qb-hotel-card:focus-visible {
  background: #f8fafc !important;
  border-color: #041562 !important;
  box-shadow: 0 6px 16px rgba(2, 12, 58, 0.12) !important;
  outline: none !important;
  transform: translateY(-1px);
}

.qb-card-thumb {
  display: block !important;
  width: 72px !important;
  height: 100% !important;
  min-height: 72px !important;
  background: #eef2f7 !important;
}

.qb-card-thumb img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 72px !important;
  object-fit: cover !important;
}

.qb-card-details {
  min-width: 0 !important;
  height: auto !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 10px 8px 10px 12px !important;
  color: #020c3a !important;
}

.qb-card-copy {
  display: flex !important;
  min-width: 0 !important;
  flex-direction: column !important;
  gap: 3px !important;
}

.qb-card-hotel-name {
  display: block !important;
  margin: 0 !important;
  color: #020c3a !important;
  font-family: 'Kanit', sans-serif !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  text-transform: uppercase !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

.qb-card-room-count {
  display: block !important;
  color: #64748b !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}

.qb-card-price-wrap {
  display: flex !important;
  flex-shrink: 0 !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  color: #cf2338 !important;
}

.qb-card-price-wrap small {
  color: #64748b !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
}

.qb-card-price-wrap strong {
  color: #cf2338 !important;
  font-family: 'Kanit', sans-serif !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

.qb-card-arrow {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding-right: 7px !important;
  color: #041562 !important;
  font-size: 24px !important;
  font-weight: 700 !important;
}

.qb-form-hotel-title {
  min-width: 0;
  overflow: hidden;
  color: #020c3a;
  font-size: 13.5px;
  font-weight: 800;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.qb-textarea {
  min-height: 92px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.45;
}

.qb-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.qb-form-status {
  display: none;
  border-radius: 7px;
  padding: 10px 12px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.4;
}

.qb-form-status.is-success,
.qb-form-status.is-error {
  display: block;
}

.qb-form-status.is-success {
  border: 1px solid #86efac;
  background: #f0fdf4;
  color: #166534;
}

.qb-form-status.is-error {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.qb-submit-btn:disabled {
  cursor: wait;
  opacity: 0.68;
}

.qb-error-text {
  color: #991b1b !important;
}

@media (max-width: 500px) {
  .qb-results-list {
    max-height: none;
  }

  .qb-hotel-card {
    grid-template-columns: 64px minmax(0, 1fr) 18px !important;
  }

  .qb-card-thumb {
    width: 64px !important;
  }

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