/* Pocket Austin — Track 3.5: Guided Cinematic Postcard Tours
 * Editorial ligne claire parchment tour picker & floating story card
 */

#pa-tours-btn.tour-running {
  border-color: #4c8e88;
  background: rgba(226, 242, 239, 0.96);
  color: #1f4441;
}

#pa-tours-btn.is-open {
  background: #4c8e88;
  color: #fbf6ea;
  border-color: #4a3b2c;
}

#pa-tours-btn .pa-tour-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c45735;
  display: none;
  box-shadow: 0 0 0 2px rgba(196, 87, 53, 0.25);
  animation: paTourPulse 1.6s ease-in-out infinite;
}

#pa-tours-btn.tour-running .pa-tour-live-dot {
  display: inline-block;
}

@keyframes paTourPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.65; }
}

/* Tours picker popover */
#pa-tours-popover {
  position: fixed;
  top: 148px;
  right: 14px;
  z-index: 36;
  width: 332px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 200px);
  display: none;
  flex-direction: column;
  background: rgba(251, 246, 234, 0.96);
  border: 1.5px solid #4a3b2c;
  border-radius: 11px;
  box-shadow: 0 10px 30px rgba(20, 15, 10, 0.30);
  backdrop-filter: blur(10px);
  color: #2c221a;
  overflow: hidden;
}

#pa-tours-popover.open {
  display: flex;
  animation: paTourPopIn 0.16s ease-out;
}

@keyframes paTourPopIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.pa-tours-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 13px 9px;
  border-bottom: 1px solid rgba(74, 59, 44, 0.18);
  background: linear-gradient(180deg, rgba(255, 252, 244, 0.9), rgba(244, 237, 222, 0.55));
}

.pa-tours-head h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 700;
  color: #2c221a;
  line-height: 1.15;
}

.pa-tours-head-sub {
  margin-top: 2px;
  font-size: 11px;
  color: #665848;
}

.pa-tours-list {
  overflow-y: auto;
  padding: 9px 11px 11px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pa-tour-option {
  appearance: none;
  width: 100%;
  text-align: left;
  border: 1.2px solid rgba(74, 59, 44, 0.32);
  border-left-width: 4px;
  border-radius: 8px;
  background: rgba(255, 252, 245, 0.84);
  color: #2c221a;
  padding: 9px 10px;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background 0.14s ease, transform 0.12s ease, border-color 0.14s ease;
}

.pa-tour-option:hover {
  background: #f5ebd5;
  transform: translateY(-1px);
  border-color: #4a3b2c;
}

.pa-tour-option.active {
  background: rgba(226, 242, 239, 0.65);
  border-color: #4c8e88;
}

.pa-tour-opt-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.pa-tour-opt-badge {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 999px;
  color: #fbf6ea;
  background: #4c8e88;
}

.pa-tour-opt-stops {
  font-size: 10.5px;
  font-weight: 700;
  color: #665848;
}

.pa-tour-opt-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-weight: 700;
  color: #2c221a;
  line-height: 1.2;
}

.pa-tour-opt-summary {
  font-size: 11.2px;
  color: #5b4d3e;
  line-height: 1.35;
}

.pa-tour-opt-cta {
  margin-top: 2px;
  font-size: 10.8px;
  font-weight: 700;
  color: #c45735;
}

/* Floating Editorial Story Card (bottom-center) */
#pa-tour-card {
  position: fixed;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%) translateY(14px);
  z-index: 35;
  width: min(468px, calc(100vw - 24px));
  background: rgba(251, 246, 234, 0.96);
  border: 1.5px solid #4a3b2c;
  border-radius: 12px;
  box-shadow: 0 12px 34px rgba(20, 15, 10, 0.34);
  backdrop-filter: blur(10px);
  color: #2c221a;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.22s ease;
}

#pa-tour-card.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.pa-tc-accent-bar {
  height: 4px;
  width: 100%;
  background: #c45735;
}

.pa-tc-inner {
  padding: 11px 14px 12px;
}

.pa-tc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.pa-tc-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.pa-tc-badge {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 999px;
  color: #fbf6ea;
  background: #4c8e88;
  flex-shrink: 0;
}

.pa-tc-tour-name {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #665848;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pa-tc-header-right {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.pa-tc-counter {
  font-size: 11px;
  font-weight: 700;
  color: #4a3b2c;
  background: rgba(74, 59, 44, 0.09);
  border: 1px solid rgba(74, 59, 44, 0.20);
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}

.pa-tc-close {
  appearance: none;
  border: 1px solid rgba(74, 59, 44, 0.34);
  background: rgba(255, 251, 242, 0.9);
  color: #4a3b2c;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pa-tc-close:hover {
  background: #efe4cc;
  color: #2c221a;
}

.pa-tc-stop-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 700;
  color: #2c221a;
  line-height: 1.2;
}

.pa-tc-stop-sub {
  margin-top: 2px;
  font-size: 11.4px;
  font-weight: 600;
  color: #7c6953;
}

.pa-tc-caption {
  margin: 7px 0 10px;
  font-size: 12.6px;
  line-height: 1.45;
  color: #2c221a;
}

/* Auto-advance progress bar */
.pa-tc-progress-track {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(74, 59, 44, 0.14);
  overflow: hidden;
  margin-bottom: 10px;
}

.pa-tc-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: #c45735;
  transition: width 0.08s linear;
}

.pa-tc-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pa-tc-nav-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pa-tc-btn {
  appearance: none;
  border: 1.2px solid #4a3b2c;
  background: rgba(255, 252, 245, 0.92);
  color: #2c221a;
  border-radius: 999px;
  padding: 5px 11px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.pa-tc-btn:hover {
  background: #efe3c8;
}

.pa-tc-btn.primary {
  background: #c45735;
  color: #fbf6ea;
  border-color: #4a3b2c;
  min-width: 82px;
  justify-content: center;
}

.pa-tc-btn.primary:hover {
  background: #af4929;
}

.pa-tc-btn.primary.paused {
  background: #4c8e88;
}

.pa-tc-btn.primary.paused:hover {
  background: #3d7973;
}

.pa-tc-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pa-tc-dot {
  appearance: none;
  border: 1.2px solid #4a3b2c;
  background: rgba(251, 246, 234, 0.9);
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.14s ease;
}

.pa-tc-dot:hover {
  transform: scale(1.25);
  background: #e2c8a2;
}

.pa-tc-dot.active {
  background: #c45735;
  transform: scale(1.28);
}

.pa-tc-dot.visited {
  background: rgba(74, 59, 44, 0.45);
}

@media (max-width: 760px) {
  #pa-tours-popover {
    top: 98px;
    right: 10px;
    left: 10px;
    width: auto;
    max-width: none;
    max-height: calc(100vh - 230px);
  }
  /* Positioned cleanly above #bookmarks on mobile */
  #pa-tour-card {
    bottom: 128px;
    width: calc(100vw - 20px);
  }
  .pa-tc-inner {
    padding: 10px 12px 10px;
  }
  .pa-tc-stop-title {
    font-size: 16px;
  }
  .pa-tc-caption {
    font-size: 12px;
    margin: 5px 0 8px;
  }
  .pa-tc-dots {
    display: none;
  }
}
