/* ============================================================
   PLYMOUTH 360 BUBBLE MAP - STYLES
   ============================================================ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #050c1a;
  color: #fff;
  user-select: none;
}

/* Master CloudPano Viewer Container & Iframe */
#viewer-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  overflow: hidden;
}

#pano-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Top Header & Navigation Bar */
#top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  background: linear-gradient(180deg, rgba(5,12,26,0.95) 0%, rgba(5,12,26,0.85) 75%, rgba(5,12,26,0) 100%);
  padding: 8px 12px 10px 12px;
  pointer-events: none;
}

#top-bar > * {
  pointer-events: auto;
}

/* Brand Row: Title Left, Actions Right */
.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  gap: 8px;
}

.brand-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #d4af37;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-title span {
  color: #8fa3c0;
  font-weight: 500;
}

.btn-group-top {
  display: flex;
  gap: 6px;
  align-items: center;
}

.btn-town-view {
  background: #0d1e38;
  border: 1px solid #24416b;
  color: #d4af37;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}

.btn-town-view:hover {
  background: #162f55;
  border-color: #d4af37;
}

/* Deep Scene Mode: Yellow Back Button */
.btn-back-deep {
  display: none;
  background: #d4af37;
  color: #050c1a;
  border: none;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.btn-back-deep:hover {
  background: #e5c358;
}

/* Deep Scene State: Hides Top Bar & Frees The Background */
body.deep-scene #top-bar {
  background: linear-gradient(180deg, rgba(5,12,26,0.7) 0%, transparent 100%);
}

body.deep-scene .btn-back-deep {
  display: inline-block;
}

/* KILLS THE BLUR IN DEEP SCENES: Keeps bubbles and aerial 100% crisp */
body.deep-scene #drawer-backdrop {
  display: none !important;
  pointer-events: none !important;
}

/* Search Box */
.search-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 6px;
}

.search-input {
  width: 100%;
  height: 28px;
  background: rgba(13, 30, 56, 0.85);
  border: 1px solid #24416b;
  border-radius: 14px;
  padding: 0 30px 0 10px;
  color: #fff;
  font-size: 11px;
  outline: none;
}

.search-input:focus {
  border-color: #d4af37;
  background: rgba(13, 30, 56, 0.95);
}

.search-input::placeholder {
  color: #6a82a6;
}

.search-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: #8fa3c0;
  pointer-events: none;
}

/* Horizontal Chip Rail */
.chips-bar {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
}

.chips-bar::-webkit-scrollbar {
  display: none;
}

.chip {
  background: rgba(13, 30, 56, 0.85);
  border: 1px solid #24416b;
  color: #cfe0f5;
  font-size: 10px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 12px;
  cursor: pointer;
  flex-shrink: 0;
}

.chip:hover {
  background: #162f55;
  border-color: #d4af37;
  color: #fff;
}

.chip.active {
  background: #d4af37;
  color: #050c1a;
  border-color: #d4af37;
  font-weight: 700;
}

/* FROSTED BACKDROP - Blurs ONLY choice menus (Waterfront / Downtown Forks & Cravings) */
#drawer-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 12, 26, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 35;
  display: none;
}

#drawer-backdrop.visible {
  display: block;
}

/* Bottom Drawer */
#drawer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: linear-gradient(180deg, #0d1e38 0%, #050c1a 100%);
  border-top: 2px solid #d4af37;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.6);
  transform: translateY(105%);
  transition: transform 0.28s ease-out;
  display: flex;
  flex-direction: column;
  max-height: 62vh;
}

#drawer.open {
  transform: translateY(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 6px 12px;
  border-bottom: 1px solid #1a3359;
  flex-shrink: 0;
}

.drawer-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #d4af37;
  text-transform: uppercase;
}

.btn-back {
  background: #162f55;
  border: 1px solid #24416b;
  color: #cfe0f5;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-close {
  background: none;
  border: none;
  color: #8fa3c0;
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

#cardsContainer {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 10px 14px 10px;
}

/* Cravings / Categories Grid */
.cravings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.craving-btn {
  background: #0d1e38;
  border: 1px solid #24416b;
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.craving-btn:hover {
  background: #162f55;
  border-color: #d4af37;
}

.craving-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

.craving-label {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.craving-sub {
  font-size: 8px;
  color: #8fa3c0;
  margin-top: 1px;
}

/* Venue Cards List */
.cards-scroll {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.venue-card {
  background: #0d1e38;
  border: 1px solid #1a3359;
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.venue-card.featured {
  border-color: #d4af37;
  background: linear-gradient(90deg, #162f55 0%, #0d1e38 100%);
}

.venue-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.venue-badge-row {
  display: flex;
  gap: 4px;
  margin-bottom: 2px;
}

.venue-area-pill, .venue-cat-pill {
  font-size: 7px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1px 4px;
  border-radius: 3px;
}

.venue-area-pill {
  background: #162f55;
  color: #8fa3c0;
}

.venue-cat-pill {
  background: rgba(212, 175, 55, 0.2);
  color: #d4af37;
}

.venue-name {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.venue-card.featured .venue-name {
  color: #d4af37;
}

.venue-sub {
  font-size: 9px;
  font-weight: 700;
  color: #f5a623;
  letter-spacing: 0.3px;
}

.venue-meta {
  font-size: 9px;
  color: #8fa3c0;
}

.venue-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.btn-tour, .btn-site {
  font-size: 9px;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  display: inline-block;
}

.btn-tour {
  background: #d4af37;
  color: #050c1a;
}

.btn-tour:hover {
  background: #e5c358;
}

.btn-site {
  background: #162f55;
  border: 1px solid #24416b;
  color: #cfe0f5;
}

.btn-site:hover {
  background: #203f6f;
  color: #fff;
}