@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

.pcw-root {
  font-family: 'Montserrat', sans-serif;
  --pcw-primary: #4f0c26;        /* maroon — button bg, header, user bubble */
  --pcw-secondary: #B0854D;      /* gold — accents, borders, sub-text */
  --pcw-on-primary: #ffffff;     /* text on primary buttons */
  --pcw-bg: #ffffff;
  --pcw-bubble-bot: #f5f1ea;
  --pcw-text: #1a1a1a;
  box-sizing: border-box;
}
.pcw-root * { box-sizing: border-box; font-family: inherit; }

/* Floating launcher bubble */
.pcw-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  height: 56px;
  border-radius: 28px;
  background: var(--pcw-primary);
  border: 2px solid var(--pcw-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 18px 6px 6px;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 4px 14px rgba(79, 12, 38, 0.35);
}
.pcw-launcher-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pcw-launcher-badge img { width: 24px; height: 24px; object-fit: contain; display: block; }
.pcw-launcher-text {
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.pcw-launcher svg { width: 28px; height: 28px; fill: var(--pcw-secondary); }
.pcw-launcher.pcw-hidden { display: none; }

/* Bubble mode panel */
.pcw-panel.pcw-bubble-mode {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 380px;
  max-height: 72vh;
  z-index: 9999;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(79, 12, 38, 0.25);
  display: none;
  flex-direction: column;
  overflow: hidden;
  background: var(--pcw-bg);
}
.pcw-panel.pcw-bubble-mode.pcw-open { display: flex; }

/* Inline mode panel */
.pcw-panel.pcw-inline-mode {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(79, 12, 38, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--pcw-bg);
  border: 1px solid #ece3d6;
}

.pcw-header {
  background: var(--pcw-primary);
  color: var(--pcw-on-primary);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pcw-header-title { font-weight: 700; font-size: 15px; letter-spacing: 0.2px; }
.pcw-header-sub { font-size: 12px; color: var(--pcw-secondary); margin-top: 2px; font-weight: 500; }
.pcw-close {
  cursor: pointer;
  color: #ffffff !important;
  font-size: 20px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 6px;
  padding: 2px 8px;
}
.pcw-close:hover { background: rgba(255, 255, 255, 0.22); }

.pcw-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 320px;
  max-height: 460px;
}

.pcw-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}
.pcw-msg.bot {
  background: var(--pcw-bubble-bot);
  color: var(--pcw-text);
  align-self: flex-start;
  border: 1px solid #ece3d6;
}
.pcw-msg.user {
  background: var(--pcw-primary);
  color: var(--pcw-on-primary);
  align-self: flex-end;
}

/* Option buttons (pills) */
.pcw-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-self: flex-start;
  max-width: 100%;
}
.pcw-option-btn {
  background: var(--pcw-primary);
  border: 1.5px solid var(--pcw-primary);
  color: var(--pcw-on-primary);
  padding: 9px 16px;
  border-radius: 22px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.pcw-option-btn:hover { background: #66112f; border-color: var(--pcw-secondary); }
.pcw-option-btn:disabled { opacity: 0.45; cursor: default; }

/* Venue cards */
.pcw-venues {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-self: stretch;
  width: 100%;
}
.pcw-venue-card {
  border: 1px solid #ece3d6;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(79, 12, 38, 0.08);
}
.pcw-venue-cover {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  background: #f0ebe2;
  cursor: pointer;
}
.pcw-venue-cover.pcw-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pcw-secondary);
  font-size: 13px;
  font-weight: 600;
}
.pcw-venue-body { padding: 12px 14px; }
.pcw-venue-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--pcw-primary);
  margin-bottom: 10px;
}
.pcw-venue-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pcw-venue-actions button {
  flex: 1;
  min-width: 110px;
  padding: 9px 12px;
  border-radius: 22px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.pcw-btn-photos {
  background: var(--pcw-secondary);
  color: var(--pcw-on-primary);
  border: 1.5px solid var(--pcw-secondary);
}
.pcw-btn-photos:hover { background: #9c743f; border-color: #9c743f; }
.pcw-btn-book {
  background: var(--pcw-primary);
  color: var(--pcw-on-primary);
  border: 1.5px solid var(--pcw-primary);
}
.pcw-btn-book:hover { background: #66112f; }
.pcw-venue-card.pcw-disabled { opacity: 0.5; pointer-events: none; }

/* Date groups (per-date venue selection) */
.pcw-date-groups {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-self: stretch;
  width: 100%;
}
.pcw-date-group {
  border: 1px solid #ece3d6;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}
.pcw-date-heading {
  font-weight: 700;
  font-size: 13px;
  color: var(--pcw-primary);
  margin-bottom: 8px;
}
.pcw-date-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.pcw-date-buttons button {
  background: var(--pcw-primary);
  color: var(--pcw-on-primary);
  border: 1.5px solid var(--pcw-primary);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.pcw-date-buttons button:hover { background: #66112f; border-color: var(--pcw-secondary); }
.pcw-date-groups.pcw-disabled { opacity: 0.5; pointer-events: none; }

/* Calendar date picker */
.pcw-datepicker {
  display: flex;
  gap: 8px;
  align-self: stretch;
  width: 100%;
  flex-wrap: wrap;
}
.pcw-date-input {
  flex: 1;
  min-width: 150px;
  border: 1.5px solid var(--pcw-secondary);
  border-radius: 22px;
  padding: 9px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--pcw-text);
  outline: none;
  background: #fff;
}
.pcw-date-input:focus { border-color: var(--pcw-primary); }
.pcw-date-confirm {
  background: var(--pcw-primary);
  color: var(--pcw-on-primary);
  border: 1.5px solid var(--pcw-primary);
  border-radius: 22px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.pcw-date-confirm:hover { background: #66112f; border-color: var(--pcw-secondary); }
.pcw-datepicker.pcw-disabled { opacity: 0.5; pointer-events: none; }

/* Date + time + duration picker */
.pcw-dtpicker {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-self: stretch;
  width: 100%;
  border: 1px solid #ece3d6;
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
}
.pcw-dt-label { font-size: 12px; font-weight: 600; color: var(--pcw-secondary); }
.pcw-dt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pcw-dt-chip {
  background: #faf5ec;
  color: var(--pcw-primary);
  border: 1.5px solid var(--pcw-secondary);
  border-radius: 16px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.pcw-dt-chip.pcw-chip-active { background: var(--pcw-secondary); color: #fff; }
.pcw-dt-row { display: flex; flex-direction: column; gap: 12px; }
.pcw-dt-field { display: flex; flex-direction: column; gap: 5px; width: 100%; }
.pcw-dt-cap {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pcw-secondary);
}
.pcw-dt-timegroup { display: flex; gap: 8px; }
.pcw-dt-timegroup .pcw-dt-time { flex: 1; }
.pcw-dt-timegroup .pcw-dt-time:last-child { flex: 0 0 84px; }
.pcw-dt-date,
.pcw-dt-time,
.pcw-dt-dur {
  height: 44px;
  border: 1.5px solid #e2d8c8;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--pcw-text);
  background: #fff;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
select.pcw-dt-time,
select.pcw-dt-dur {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 34px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234f0c26' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.pcw-dt-date:focus,
.pcw-dt-time:focus,
.pcw-dt-dur:focus {
  border-color: var(--pcw-primary);
  box-shadow: 0 0 0 3px rgba(176, 133, 77, 0.18);
}
.pcw-dt-confirm {
  background: var(--pcw-primary);
  color: var(--pcw-on-primary);
  border: none;
  border-radius: 12px;
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-top: 2px;
  transition: background 0.15s;
}
.pcw-dt-confirm:hover { background: #66112f; }
.pcw-dtpicker.pcw-disabled { opacity: 0.5; pointer-events: none; }

/* All action buttons keep white text regardless of theme styles */
.pcw-root .pcw-option-btn,
.pcw-root .pcw-venue-actions button,
.pcw-root .pcw-date-buttons button,
.pcw-root .pcw-date-confirm,
.pcw-root .pcw-dt-confirm,
.pcw-root .pcw-send-btn,
.pcw-root .pcw-lb-nav button,
.pcw-root .pcw-lb-close,
.pcw-root .pcw-close { color: #ffffff !important; }

/* Lightbox */
.pcw-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 4, 11, 0.85);
  z-index: 100000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.pcw-lightbox img {
  max-width: 92vw;
  max-height: 74vh;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}
.pcw-lb-close {
  position: absolute;
  top: 18px;
  right: 22px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 22px;
  line-height: 1;
  padding: 6px 12px;
  cursor: pointer;
}
.pcw-lb-nav {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  align-items: center;
}
.pcw-lb-nav button {
  background: var(--pcw-secondary);
  color: #fff;
  border: none;
  border-radius: 22px;
  padding: 8px 18px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.pcw-lb-nav button:disabled { opacity: 0.4; cursor: default; }
.pcw-lb-count { color: #fff; font-size: 13px; font-weight: 500; }

.pcw-input-row {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #ece3d6;
  background: #fff;
}
.pcw-input-row input {
  flex: 1;
  border: 1.5px solid #ddd2c2;
  border-radius: 22px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.pcw-input-row input:focus { border-color: var(--pcw-secondary); }
.pcw-send-btn {
  background: var(--pcw-primary);
  color: var(--pcw-on-primary);
  border: none;
  border-radius: 22px;
  padding: 0 20px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.pcw-send-btn:hover { background: #66112f; }
.pcw-send-btn:disabled { opacity: 0.5; cursor: default; }

.pcw-typing {
  align-self: flex-start;
  font-size: 13px;
  color: #998;
  font-style: italic;
}

@media (max-width: 480px) {
  .pcw-panel.pcw-bubble-mode {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 84px;
  }
  .pcw-launcher { right: 16px; bottom: 16px; }
}
