/* ============================================
   BPM SHARED COMPONENTS
   Injected via <link> into all templates
   Colors: Navy var(--bpm-primary), Gold var(--bpm-accent), Burgundy var(--bpm-secondary), Cream var(--bpm-bg)
   ============================================ */


:root {
  --bpm-primary: var(--bpm-primary);
  --bpm-primary-rgb: 0, 0, 49;
  --bpm-accent: var(--bpm-accent);
  --bpm-accent-rgb: 222, 185, 56;
  --bpm-secondary: var(--bpm-secondary);
  --bpm-secondary-rgb: 130, 13, 13;
  --bpm-bg: var(--bpm-bg);
  --bpm-bg-rgb: 240, 236, 227;
}

/* ---- GLOWING TEMPLATE NAV BUTTON ---- */
.bpm-template-nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  background: rgba(var(--bpm-primary-rgb), 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(var(--bpm-accent-rgb), 0.25);
  border-radius: 50px;
  color: var(--bpm-accent);
  text-decoration: none;
  font-family: -apple-system, 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow:
    0 0 20px rgba(var(--bpm-accent-rgb), 0.12),
    0 0 60px rgba(var(--bpm-accent-rgb), 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: bpmGlow 3s ease-in-out infinite;
  transition: all 0.3s ease;
}
.bpm-template-nav:hover {
  border-color: rgba(var(--bpm-accent-rgb), 0.5);
  box-shadow:
    0 0 30px rgba(var(--bpm-accent-rgb), 0.25),
    0 0 80px rgba(var(--bpm-accent-rgb), 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateX(-50%) scale(1.03);
  color: var(--bpm-bg);
}
.bpm-template-nav .nav-arrow {
  font-size: 1rem;
  transition: transform 0.3s;
}
.bpm-template-nav:hover .nav-arrow {
  transform: translateX(-3px);
}
.bpm-template-nav .nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bpm-accent);
  animation: bpmPulse 2s ease-in-out infinite;
}
@keyframes bpmGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(var(--bpm-accent-rgb),0.12), 0 0 60px rgba(var(--bpm-accent-rgb),0.06); }
  50% { box-shadow: 0 0 25px rgba(var(--bpm-accent-rgb),0.2), 0 0 80px rgba(var(--bpm-accent-rgb),0.1); }
}
@keyframes bpmPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* Template badge (right side) */
.bpm-template-badge {
  position: fixed;
  top: 16px;
  right: 20px;
  z-index: 200;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--bpm-secondary), var(--bpm-secondary));
  color: var(--bpm-bg);
  font-family: -apple-system, 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  border-radius: 50px;
  box-shadow: 0 2px 12px rgba(var(--bpm-secondary-rgb), 0.3);
}

/* ---- STICKY CTA BAR ---- */
.bpm-sticky-cta {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 190;
  display: flex;
  justify-content: center;
  gap: 1px;
  background: rgba(var(--bpm-primary-rgb), 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(var(--bpm-accent-rgb), 0.15);
  transform: translateY(100%);
  transition: transform 0.4s ease;
}
.bpm-sticky-cta.visible { transform: translateY(0); }
.bpm-sticky-cta a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  color: #94A3B8;
  text-decoration: none;
  font-family: -apple-system, 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.2s;
  max-width: 140px;
}
.bpm-sticky-cta a:hover {
  color: var(--bpm-accent);
  background: rgba(var(--bpm-accent-rgb), 0.06);
}
.bpm-sticky-cta .cta-icon { font-size: 1.2rem; }
.bpm-sticky-cta .cta-primary {
  background: var(--bpm-accent);
  color: var(--bpm-primary);
  font-weight: 700;
}
.bpm-sticky-cta .cta-primary:hover { background: var(--bpm-accent); }

/* ---- INLINE CALENDAR WIDGET ---- */
.bpm-calendar-section {
  padding: 80px 24px;
  max-width: 700px;
  margin: 0 auto;
}
.bpm-cal-wrapper {
  background: rgba(var(--bpm-primary-rgb), 0.4);
  border: 1px solid rgba(var(--bpm-accent-rgb), 0.12);
  border-radius: 12px;
  padding: 32px;
  margin-top: 32px;
}
.bpm-cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.bpm-cal-header h3 {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 1px;
}
.bpm-cal-nav {
  display: flex;
  gap: 8px;
}
.bpm-cal-nav button {
  width: 36px; height: 36px;
  border: 1px solid rgba(var(--bpm-accent-rgb), 0.2);
  background: transparent;
  color: var(--bpm-accent);
  border-radius: 6px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
}
.bpm-cal-nav button:hover {
  background: rgba(var(--bpm-accent-rgb), 0.1);
  border-color: var(--bpm-accent);
}
.bpm-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.bpm-cal-day-header {
  text-align: center;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(var(--bpm-accent-rgb), 0.5);
  padding: 8px 0;
}
.bpm-cal-day {
  text-align: center;
  padding: 10px 4px;
  font-size: 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.bpm-cal-day.empty { cursor: default; }
.bpm-cal-day.open {
  color: var(--bpm-bg);
}
.bpm-cal-day.open::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #22c55e;
}
.bpm-cal-day.tentative {
  color: rgba(var(--bpm-bg-rgb), 0.6);
}
.bpm-cal-day.tentative::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--bpm-accent);
}
.bpm-cal-day.booked {
  color: rgba(var(--bpm-bg-rgb), 0.25);
  cursor: not-allowed;
  text-decoration: line-through;
}
.bpm-cal-day.open:hover,
.bpm-cal-day.tentative:hover {
  background: rgba(var(--bpm-accent-rgb), 0.1);
}
.bpm-cal-day.selected {
  background: var(--bpm-accent) !important;
  color: var(--bpm-primary) !important;
  font-weight: 700;
}
.bpm-cal-day.selected::after { display: none; }
.bpm-cal-legend {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 20px;
  font-size: 0.72rem;
  color: rgba(var(--bpm-bg-rgb), 0.5);
}
.bpm-cal-legend-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.bpm-cal-legend-dot.open { background: #22c55e; }
.bpm-cal-legend-dot.tentative { background: var(--bpm-accent); }
.bpm-cal-legend-dot.booked { background: rgba(var(--bpm-bg-rgb), 0.2); }

/* Price card popup */
.bpm-price-card {
  margin-top: 24px;
  padding: 24px;
  background: rgba(var(--bpm-accent-rgb), 0.06);
  border: 1px solid rgba(var(--bpm-accent-rgb), 0.15);
  border-radius: 8px;
  display: none;
}
.bpm-price-card.show { display: block; animation: fadeSlideUp 0.3s ease; }
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.bpm-price-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--bpm-accent);
}
.bpm-price-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.88rem;
}
.bpm-price-row span:last-child {
  font-weight: 600;
  color: var(--bpm-accent);
}
.bpm-inquiry-btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  background: var(--bpm-accent);
  color: var(--bpm-primary);
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
  text-decoration: none;
}
.bpm-inquiry-btn:hover {
  background: var(--bpm-accent);
  box-shadow: 0 4px 20px rgba(var(--bpm-accent-rgb), 0.3);
}
