/**
 * TP Outdoor Pursuits Booking - Frontend Styles
 *
 * Complete widget redesign with CSS custom properties
 * Mobile responsive at 375px minimum
 *
 * @package TPOPB
 * @since 1.1.0
 */

/* Root Variables */
:root {
--tpopb-primary: #4caf50;
--tpopb-dark: #1a2e1a;
--tpopb-btn-text: #ffffff;
--tpopb-radius: 4px;
--tpopb-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
--tpopb-shadow-strong: 0 6px 24px rgba(0, 0, 0, 0.2);
}

/* Widget Shell */
.tpopb-widget {
max-width: 800px;
margin: 0 auto;
background: #fff;
border-radius: var(--tpopb-radius);
box-shadow: var(--tpopb-shadow);
position: relative;
overflow: hidden;
font-family: inherit;
}

/* Header Band */
.tpopb-widget-header {
background: linear-gradient(135deg, var(--tpopb-dark) 0%, var(--tpopb-primary) 100%);
padding: 30px 40px;
position: relative;
}

.tpopb-widget-header::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 3px;
background: var(--tpopb-primary);
}

/* Step Indicator */
.tpopb-progress {
display: flex;
justify-content: space-between;
align-items: center;
position: relative;
}

.tpopb-progress-step {
flex: 1;
text-align: center;
position: relative;
z-index: 1;
}

.tpopb-progress-step::before {
content: '';
position: absolute;
top: 18px;
left: 50%;
width: 100%;
height: 2px;
background: rgba(255, 255, 255, 0.3);
z-index: -1;
}

.tpopb-progress-step:first-child::before {
display: none;
}

.tpopb-progress-number {
display: flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
background: rgba(255, 255, 255, 0.2);
color: rgba(255, 255, 255, 0.7);
border-radius: 50%;
margin: 0 auto 8px;
font-weight: bold;
font-size: 16px;
border: 2px solid transparent;
transition: all 0.3s ease;
}

.tpopb-progress-step.active .tpopb-progress-number {
background: var(--tpopb-primary);
color: var(--tpopb-btn-text);
border-color: rgba(255, 255, 255, 0.4);
box-shadow: 0 0 12px rgba(76, 175, 80, 0.6);
}

.tpopb-progress-step.completed .tpopb-progress-number {
background: rgba(76, 175, 80, 0.7);
color: var(--tpopb-btn-text);
border-color: rgba(255, 255, 255, 0.3);
}

.tpopb-progress-step.completed .tpopb-progress-number::after {
content: '✓';
font-size: 18px;
}

.tpopb-progress-step.completed::before {
background: rgba(255, 255, 255, 0.5);
}

.tpopb-progress-label {
display: block;
font-size: 13px;
color: rgba(255, 255, 255, 0.7);
font-weight: 500;
letter-spacing: 0.5px;
}

.tpopb-progress-step.active .tpopb-progress-label {
color: rgba(255, 255, 255, 0.95);
font-weight: 600;
}

/* Widget Body - FOR THE NEW STRUCTURE WE NEED TO ADD THESE NEW ELEMENTS */
/* But to maintain backward compatibility with existing template, 
   we'll work with the existing structure for now */

/* Steps */
.tpopb-step {
display: none;
animation: fadeIn 0.3s ease;
padding: 40px;
}

.tpopb-step.active {
display: block;
}

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

.tpopb-step-title {
font-size: 28px;
font-weight: 700;
margin: 0 0 30px;
color: #222;
letter-spacing: 0.5px;
}

.tpopb-step-actions {
margin-top: 30px;
display: flex;
gap: 15px;
justify-content: flex-end;
}

/* Category Chips */
.tpopb-category-chips {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-bottom: 25px;
}

.tpopb-category-chip {
padding: 8px 18px;
background: #f0f0f0;
border: 2px solid #e0e0e0;
border-radius: 20px;
font-size: 14px;
font-weight: 600;
color: #666;
cursor: pointer;
transition: all 0.2s ease;
text-transform: uppercase;
letter-spacing: 0.5px;
}

.tpopb-category-chip:hover {
border-color: var(--tpopb-primary);
color: var(--tpopb-primary);
}

.tpopb-category-chip.active {
background: var(--tpopb-primary);
border-color: var(--tpopb-primary);
color: var(--tpopb-btn-text);
}

/* Walk List */
.tpopb-walk-list {
display: flex;
flex-direction: column;
gap: 15px;
margin-bottom: 25px;
}

.tpopb-walk-item {
padding: 20px;
background: #f8f9fa;
border: 2px solid #e0e0e0;
border-radius: var(--tpopb-radius);
cursor: pointer;
transition: all 0.2s ease;
}

.tpopb-walk-item:hover {
border-color: var(--tpopb-primary);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tpopb-walk-name {
font-size: 20px;
font-weight: 700;
color: #222;
margin: 0 0 8px;
}

.tpopb-walk-meta {
display: flex;
gap: 20px;
align-items: center;
flex-wrap: wrap;
margin-bottom: 8px;
}

.tpopb-walk-difficulty {
display: flex;
gap: 4px;
}

.tpopb-difficulty-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: #ccc;
}

.tpopb-difficulty-dot.filled {
background: var(--tpopb-primary);
}

.tpopb-walk-distance,
.tpopb-walk-dates-count {
font-size: 13px;
color: #666;
}

.tpopb-walk-description {
font-size: 14px;
color: #555;
line-height: 1.6;
margin: 0;
}

/* Selected Walk Pill */
.tpopb-selected-walk-pill {
display: inline-flex;
align-items: center;
gap: 10px;
padding: 10px 16px;
background: #f0f0f0;
border: 2px solid var(--tpopb-primary);
border-radius: 20px;
margin-bottom: 20px;
}

.tpopb-selected-walk-name {
font-weight: 600;
color: #222;
}

.tpopb-change-walk-link {
color: var(--tpopb-primary);
text-decoration: none;
font-size: 13px;
font-weight: 600;
}

.tpopb-change-walk-link:hover {
text-decoration: underline;
}

/* Date Cards Grid */
.tpopb-date-cards {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 15px;
margin-bottom: 25px;
}

.tpopb-date-card {
padding: 20px;
background: #fff;
border: 2px solid #e0e0e0;
border-radius: var(--tpopb-radius);
cursor: pointer;
transition: all 0.2s ease;
text-align: center;
}

.tpopb-date-card:hover {
border-color: var(--tpopb-primary);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tpopb-date-card.selected {
border-color: var(--tpopb-primary);
background: rgba(76, 175, 80, 0.05);
}

.tpopb-date-day {
font-size: 36px;
font-weight: 700;
color: #222;
line-height: 1;
margin-bottom: 5px;
}

.tpopb-date-month-year {
font-size: 13px;
color: #888;
text-transform: uppercase;
letter-spacing: 0.5px;
margin-bottom: 12px;
}

.tpopb-date-time {
font-size: 14px;
color: #555;
margin-bottom: 10px;
}

.tpopb-date-walk-name {
font-size: 13px;
font-weight: 600;
color: var(--tpopb-primary);
margin-bottom: 10px;
}

.tpopb-spaces-badge {
display: inline-block;
padding: 5px 12px;
background: #4caf50;
color: #fff;
border-radius: 12px;
font-size: 12px;
font-weight: 600;
}

.tpopb-spaces-badge.amber {
background: #ff9800;
}

.tpopb-spaces-badge.red {
background: #f44336;
}

/* Buttons */
.tpopb-btn {
padding: 14px 32px;
font-size: 16px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 1px;
border: none;
border-radius: var(--tpopb-radius);
cursor: pointer;
transition: all 0.2s ease;
display: inline-block;
}

.tpopb-btn-primary {
background: var(--tpopb-dark);
color: var(--tpopb-btn-text);
}

.tpopb-btn-primary:hover:not(:disabled) {
background: var(--tpopb-primary);
box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
transform: translateY(-2px);
}

.tpopb-btn-primary:disabled {
background: #ccc;
cursor: not-allowed;
box-shadow: none;
transform: none;
}

.tpopb-btn-secondary {
background: transparent;
color: #666;
border: 2px solid #e0e0e0;
}

.tpopb-btn-secondary:hover {
border-color: #999;
color: #333;
}

.tpopb-submit-btn {
background: var(--tpopb-primary) !important;
color: var(--tpopb-btn-text) !important;
font-size: 18px;
padding: 16px 40px;
}

.tpopb-submit-btn:hover:not(:disabled) {
box-shadow: var(--tpopb-shadow-strong);
transform: translateY(-2px);
}

/* ===== STEP 3 FORM ===== */
.tpopb-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
.tpopb-form-field { display: flex; flex-direction: column; gap: 5px; }
.tpopb-form-field--full { grid-column: span 2; }
.tpopb-field-label { font-size: 11px; font-weight: 700; color: #555; text-transform: uppercase; letter-spacing: 0.07em; }
.tpopb-required { color: #e53935; }
.tpopb-optional { color: #aaa; font-weight: 400; text-transform: none; }
.tpopb-field-input {
  border: 2px solid #e0e0e0; border-radius: 3px;
  padding: 10px 12px; font-size: 14px; font-family: inherit;
  color: #1a2e1a; outline: none; width: 100%;
}
.tpopb-field-input:focus { border-color: var(--tpopb-primary, #4caf50); }
.tpopb-field-textarea {
  border: 2px solid #e0e0e0; border-radius: 3px;
  padding: 10px 12px; font-size: 14px; font-family: inherit;
  color: #1a2e1a; outline: none; width: 100%;
  min-height: 80px; resize: vertical;
}
.tpopb-field-textarea:focus { border-color: var(--tpopb-primary, #4caf50); }
.tpopb-field-error { font-size: 12px; color: #e53935; margin-top: 2px; }
.tpopb-voucher-row { display: flex; gap: 8px; }
.tpopb-voucher-row .tpopb-field-input { flex: 1; }
.tpopb-btn-voucher {
  background: #f0f0f0; border: 2px solid #e0e0e0; border-radius: 3px;
  padding: 0 16px; font-size: 12px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; white-space: nowrap;
}
.tpopb-checkbox-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0; border-top: 1px solid #f0f0f0;
}
.tpopb-checkbox-box {
  width: 20px; height: 20px; min-width: 20px;
  border: 2px solid #ccc; border-radius: 3px;
  cursor: pointer; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.tpopb-checkbox-box.checked {
  background: var(--tpopb-primary, #4caf50);
  border-color: var(--tpopb-primary, #4caf50);
}
.tpopb-checkbox-box.checked::after {
  content: '✓'; color: #fff; font-size: 12px; font-weight: 700; line-height: 1;
}
.tpopb-checkbox-label { font-size: 13px; color: #444; line-height: 1.5; }
.tpopb-checkbox-label a { color: var(--tpopb-primary, #4caf50); }

/* ===== STEP 2 PARTY & PAYMENT ===== */
.tpopb-selected-date-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--tpopb-primary-light, #f0faf0);
  border: 1px solid var(--tpopb-primary-border, #c8e6c9);
  border-radius: 3px; padding: 8px 14px; margin-bottom: 20px;
  font-size: 13px; color: var(--tpopb-dark, #1a2e1a); font-weight: 600;
}
.tpopb-counter-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0; border-bottom: 1px solid #f0f0f0; margin-bottom: 20px;
}
.tpopb-counter-label-main { font-size: 16px; font-weight: 600; color: var(--tpopb-dark, #1a2e1a); }
.tpopb-counter-label-sub { font-size: 12px; color: #888; margin-top: 2px; }
.tpopb-counter-controls { display: flex; align-items: center; gap: 14px; }
.tpopb-counter-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--tpopb-dark, #1a2e1a);
  background: #fff; font-size: 22px; font-weight: 300;
  color: var(--tpopb-dark, #1a2e1a); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  line-height: 1; padding: 0;
}
.tpopb-counter-btn:hover { background: var(--tpopb-dark, #1a2e1a); color: #fff; }
.tpopb-counter-val {
  font-size: 32px; font-weight: 700;
  color: var(--tpopb-dark, #1a2e1a); min-width: 36px; text-align: center;
}
.tpopb-payment-section-title {
  font-size: 11px; font-weight: 700; color: #aaa;
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 10px;
}
.tpopb-payment-options { display: flex; flex-direction: column; gap: 8px; }
.tpopb-payment-option {
  display: flex; align-items: center; gap: 14px;
  border: 2px solid #e8e8e8; border-radius: 4px;
  padding: 14px 16px; cursor: pointer; transition: all 0.15s;
}
.tpopb-payment-option:hover { border-color: var(--tpopb-primary, #4caf50); }
.tpopb-payment-option.selected {
  border-color: var(--tpopb-primary, #4caf50);
  background: var(--tpopb-primary-light, #f0faf0);
}
.tpopb-po-radio {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid #ccc; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.tpopb-payment-option.selected .tpopb-po-radio { border-color: var(--tpopb-primary, #4caf50); }
.tpopb-payment-option.selected .tpopb-po-radio::after {
  content: ''; width: 8px; height: 8px;
  background: var(--tpopb-primary, #4caf50); border-radius: 50%;
}
.tpopb-po-label { flex: 1; }
.tpopb-po-label-main { font-size: 14px; font-weight: 600; color: var(--tpopb-dark, #1a2e1a); }
.tpopb-po-label-sub { font-size: 12px; color: #888; margin-top: 2px; }
.tpopb-po-amount { font-size: 22px; font-weight: 700; color: var(--tpopb-dark, #1a2e1a); }
.tpopb-price-summary { font-size: 13px; color: #666; margin-top: 16px; }

/* Mobile Responsive */
@media (max-width: 768px) {
.tpopb-step {
padding: 30px 25px;
}

.tpopb-step-title {
font-size: 24px;
}

.tpopb-date-cards {
grid-template-columns: repeat(2, 1fr);
gap: 12px;
}

.tpopb-step-actions {
flex-direction: column-reverse;
}

.tpopb-btn {
width: 100%;
}
}

@media (max-width: 480px) {
.tpopb-step {
padding: 20px;
}

.tpopb-progress-label {
display: none;
}

.tpopb-progress-number {
width: 32px;
height: 32px;
font-size: 14px;
}

.tpopb-progress-step::before {
top: 16px;
}

.tpopb-step-title {
font-size: 22px;
margin-bottom: 20px;
}

.tpopb-date-cards {
grid-template-columns: repeat(2, 1fr);
gap: 10px;
}

.tpopb-date-card {
padding: 15px 10px;
}

.tpopb-date-day {
font-size: 28px;
}

.tpopb-form-grid { grid-template-columns: 1fr; }
.tpopb-form-field--full { grid-column: span 1; }
}

@media (max-width: 375px) {
.tpopb-widget {
margin: 0 10px;
}

.tpopb-step {
padding: 15px;
}

.tpopb-category-chip {
padding: 6px 14px;
font-size: 12px;
}

.tpopb-walk-item {
padding: 15px;
}
}

/* Loading, error, and other common styles remain */
.tpopb-loading {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.95);
display: flex;
align-items: center;
justify-content: center;
border-radius: var(--tpopb-radius);
z-index: 9999;
}

.tpopb-spinner {
width: 50px;
height: 50px;
border: 4px solid #e0e0e0;
border-top-color: var(--tpopb-primary);
border-radius: 50%;
animation: tpopb-spin 0.8s linear infinite;
}

@keyframes tpopb-spin {
to {
transform: rotate(360deg);
}
}

.tpopb-error,
.tpopb-error-message {
padding: 15px 20px;
background: #f8d7da;
border: 1px solid #f5c6cb;
border-radius: var(--tpopb-radius);
color: #721c24;
margin-bottom: 20px;
font-size: 14px;
line-height: 1.6;
}

/* ===================================================================
   CALENDAR SHORTCODE [tpopb_calendar]
   =================================================================== */

.tpopb-calendar {
	max-width: 100%;
	margin: 0 auto 40px;
	font-family: inherit;
}

/* Calendar Controls: Navigation + View Toggle */
.tpopb-cal-controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
	gap: 15px;
}

.tpopb-cal-nav-group {
	display: flex;
	gap: 8px;
}

.tpopb-cal-view-toggle {
	display: flex;
	gap: 4px;
	background: #f0f0f0;
	border-radius: 4px;
	padding: 2px;
}

.tpopb-cal-view-btn {
	min-width: 32px;
	height: 32px;
	border: none;
	background: transparent;
	color: #666;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	border-radius: 3px;
	transition: all 0.2s;
}

.tpopb-cal-view-btn:hover {
	background: rgba(0, 0, 0, 0.05);
}

.tpopb-cal-view-btn.active {
	background: var(--tpopb-primary);
	color: #fff;
}

/* Multi-month layout */
.tpopb-cal-months {
	display: grid;
	grid-template-columns: 1fr;
	gap: 30px;
}

.tpopb-calendar[data-view-count="2"] .tpopb-cal-months {
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
}

.tpopb-calendar[data-view-count="3"] .tpopb-cal-months {
	grid-template-columns: repeat(3, 1fr);
	gap: 15px;
}

.tpopb-cal-month {
	min-width: 0;
}

/* Loading state */
.tpopb-cal-loading .tpopb-cal-months {
	opacity: 0.5;
	pointer-events: none;
}

/* Calendar Header with Navigation */
.tpopb-cal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
	gap: 15px;
}

.tpopb-cal-title {
	margin: 0 0 15px;
	font-size: 20px;
	font-weight: 600;
	text-align: center;
}

.tpopb-calendar[data-view-count="2"] .tpopb-cal-title,
.tpopb-calendar[data-view-count="3"] .tpopb-cal-title {
	font-size: 18px;
}

.tpopb-cal-nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	background: var(--tpopb-primary);
	color: #fff;
	border: none;
	border-radius: 50%;
	text-decoration: none;
	font-size: 18px;
	font-weight: bold;
	cursor: pointer;
	transition: opacity 0.2s;
}

.tpopb-cal-nav:hover:not(:disabled) {
	opacity: 0.8;
}

.tpopb-cal-nav--disabled,
.tpopb-cal-nav:disabled {
	background: #ddd;
	color: #999;
	cursor: not-allowed;
}

/* Day Names Row */
.tpopb-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 2px;
}

.tpopb-cal-daynames {
	margin-bottom: 10px;
	gap: 0;
}

.tpopb-cal-dayname {
	text-align: center;
	font-weight: 600;
	font-size: 14px;
	color: #666;
	padding: 8px 4px;
}

/* Calendar Days Grid */
.tpopb-cal-days {
	background: #f5f5f5;
	gap: 1px;
	border: 1px solid #ddd;
	border-radius: 8px;
	overflow: hidden;
}

.tpopb-cal-grid.tpopb-cal-days {
	grid-template-columns: repeat(7, 1fr);
	height: auto;
}

.tpopb-cal-cell {
	background: #fff;
	min-height: 0;
	aspect-ratio: unset;
	padding: 8px;
	padding-bottom: 8px;
	position: relative;
	display: flex;
	flex-direction: column;
}

.tpopb-cal-empty {
	background: #f9f9f9;
}

.tpopb-cal-past {
	opacity: 0.45;
}

/* Day Number */
.tpopb-cal-day-num {
	font-size: 16px;
	font-weight: 600;
	color: #333;
	margin-bottom: 6px;
	text-align: center;
}

/* Today Highlight */
.tpopb-cal-today .tpopb-cal-day-num {
	background: var(--tpopb-primary);
	color: #fff;
	border-radius: 50%;
	width: 28px;
	height: 28px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 6px;
}

.tpopb-cal-today {
	background: #e8f5e9;
	border: 2px solid var(--tpopb-primary);
}

/* Events Container */
.tpopb-cal-events {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

/* Event Pills */
.tpopb-cal-event {
	display: block;
	height: 10px;
	border-radius: 3px;
	margin: 2px 0;
	cursor: pointer;
	font-size: 0;        /* hide text */
	overflow: hidden;
	border-left: 3px solid rgba(0,0,0,0.15);
	transition: opacity 0.15s, transform 0.1s;
	position: relative;
}

.tpopb-cal-event:hover {
	opacity: 0.8;
	transform: scaleY(1.2);
}

/* Regular Walk (default) */
.tpopb-cal-event,
.tpopb-cal-event--regular {
	background: #c8e6c9;
	color: #1b5e20;
	border-left-color: var(--tpopb-primary);
}

/* Women Only */
.tpopb-cal-event--wow {
	background: #e1bee7;
	color: #4a148c;
	border-left-color: #8e24aa;
}

/* Wild Camping */
.tpopb-cal-event--camping {
	background: #b2dfdb;
	color: #004d40;
	border-left-color: #00897b;
}

/* Sunrise/Sunset */
.tpopb-cal-event--sunrise {
	background: #fff9c4;
	color: #f57f17;
	border-left-color: #f9a825;
}

/* Full Event */
.tpopb-cal-event--full {
	opacity: 0.55;
	text-decoration: line-through;
}

/* Women Only Icon */
.tpopb-cal-wow-icon {
	font-weight: bold;
	margin-right: 2px;
}

/* Legend */
.tpopb-cal-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	justify-content: center;
	margin-top: 25px;
	padding-top: 25px;
	border-top: 1px solid #ddd;
}

.tpopb-cal-legend-item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
}

.tpopb-cal-legend-item .tpopb-cal-event {
	width: 40px;
	height: 20px;
	padding: 0;
	flex-shrink: 0;
}

/* Popup */
.tpopb-cal-popup {
	display: none;
	position: fixed;
	z-index: 9999;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 8px 32px rgba(0,0,0,0.18);
	padding: 16px 20px;
	min-width: 220px;
	max-width: 280px;
	pointer-events: auto;
}

.tpopb-cal-popup.is-visible {
	display: block;
}

.tpopb-cal-popup-close {
	position: absolute;
	top: 8px;
	right: 10px;
	background: none;
	border: none;
	font-size: 1.1rem;
	cursor: pointer;
	color: #888;
	line-height: 1;
	padding: 0;
}

.tpopb-cal-popup-close:hover {
	color: #333;
}

.tpopb-cal-popup-date {
	font-size: 0.75rem;
	color: #888;
	margin-bottom: 4px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.tpopb-cal-popup-title {
	font-size: 1rem;
	font-weight: 700;
	color: var(--tpopb-dark);
	margin-bottom: 12px;
	line-height: 1.3;
}

.tpopb-cal-popup-link {
	display: inline-block;
	padding: 7px 18px;
	background: var(--tpopb-primary);
	color: #fff;
	border-radius: 4px;
	text-decoration: none;
	font-size: 0.85rem;
	font-weight: 600;
	transition: opacity 0.15s;
}

.tpopb-cal-popup-link:hover {
	opacity: 0.85;
	color: #fff;
}

/* Responsive: Tablet (< 900px) */
@media (max-width: 900px) {
	/* 3-month view becomes 2-column on tablets */
	.tpopb-calendar[data-view-count="3"] .tpopb-cal-months {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Responsive: Mobile (< 600px) */
@media (max-width: 600px) {
	/* Force single column on mobile */
	.tpopb-calendar[data-view-count="2"] .tpopb-cal-months,
	.tpopb-calendar[data-view-count="3"] .tpopb-cal-months {
		grid-template-columns: 1fr;
		gap: 30px;
	}

	.tpopb-cal-controls {
		flex-direction: column;
		gap: 12px;
	}

	.tpopb-cal-title {
		font-size: 18px;
	}

	.tpopb-cal-nav {
		width: 32px;
		height: 32px;
		font-size: 16px;
	}

	.tpopb-cal-cell {
		min-height: 0;
		padding: 4px;
	}

	.tpopb-cal-day-num {
		font-size: 14px;
		margin-bottom: 4px;
	}

	.tpopb-cal-today .tpopb-cal-day-num {
		width: 24px;
		height: 24px;
	}

	/* Events collapse to dots */
	.tpopb-cal-events {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 3px;
	}

	.tpopb-cal-event {
		width: 8px;
		height: 8px;
		min-width: 8px;
		min-height: 8px;
		padding: 0;
		font-size: 0;
		border-radius: 50%;
		border-left: none;
		border: none;
	}

	.tpopb-cal-event:hover {
		transform: none;
	}

	.tpopb-cal-wow-icon {
		display: none;
	}

	.tpopb-cal-legend {
		gap: 10px;
	}

	.tpopb-cal-legend-item {
		font-size: 12px;
	}
}

/* =====================================================
   M24 — Month Filter, Pagination & Smart Categories
   ===================================================== */

/* Month filter row */
.tpopb-month-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 10px;
}
.tpopb-month-btn {
	padding: 4px 12px;
	border-radius: 20px;
	border: 1px solid var(--tpopb-primary);
	background: transparent;
	color: var(--tpopb-primary);
	font-size: 0.78rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
	white-space: nowrap;
}
.tpopb-month-btn:hover,
.tpopb-month-btn.active {
	background: var(--tpopb-primary);
	color: #fff;
}

/* Pagination */
.tpopb-date-pagination {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: 10px;
	padding: 6px 0;
}
.tpopb-page-btn {
	padding: 5px 14px;
	border-radius: 4px;
	border: 1px solid var(--tpopb-primary);
	background: transparent;
	color: var(--tpopb-primary);
	font-size: 0.82rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}
.tpopb-page-btn:hover:not(:disabled) {
	background: var(--tpopb-primary);
	color: #fff;
}
.tpopb-page-btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
	border-color: #ccc;
	color: #ccc;
}
.tpopb-page-info {
	font-size: 0.78rem;
	color: #666;
	white-space: nowrap;
}

/* =====================================================
   M25 - Activity Field Shortcodes
   ===================================================== */

/* Stats bar */
.tpopb-stats-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin: 16px 0;
}
.tpopb-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.tpopb-stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
    font-weight: 600;
}
.tpopb-stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--tpopb-dark);
}

/* Guide card */
.tpopb-guide-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
    margin: 20px 0;
}
.tpopb-guide-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--tpopb-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
}
.tpopb-guide-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--tpopb-dark);
}
.tpopb-guide-role {
    font-size: 0.82rem;
    color: var(--tpopb-primary);
    margin-bottom: 6px;
}
.tpopb-guide-bio {
    font-size: 0.88rem;
    line-height: 1.6;
    color: #444;
}

/* What to bring checklist */
.tpopb-bring-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.tpopb-bring-list li {
    padding: 4px 0 4px 24px;
    position: relative;
    font-size: 0.9rem;
    line-height: 1.5;
}
.tpopb-bring-list li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--tpopb-primary);
    font-weight: 700;
}

/* =====================================================
   M26 — Image Slots
   ===================================================== */

/* Images output by [tpopb_image] */
.tpopb-image-wrap {
    display: block;
    width: 100%;
    overflow: hidden;
}
.tpopb-image-wrap img,
.tpopb-image {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
}

/* =====================================================
   M29 — Gallery Shortcode
   ===================================================== */

/* ── Common ── */
.tpopb-gallery {
    margin: 0;
    padding: 0;
    list-style: none;
}
.tpopb-gallery-item {
    margin: 0;
    padding: 0;
    overflow: hidden;
}
.tpopb-gallery-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ── Strip layout ── */
.tpopb-gallery--strip {
    display: flex;
    gap: 6px;
    align-items: stretch;
}
.tpopb-gallery--strip .tpopb-gallery-item {
    flex: 1 1 0;
    min-width: 0;
    max-height: 260px;
}

/* ── Column layout ── */
.tpopb-gallery--column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tpopb-gallery--column .tpopb-gallery-item {
    width: 100%;
}
.tpopb-gallery--column .tpopb-gallery-img {
    height: auto;
    object-fit: cover;
}

/* Carousel */
.tpopb-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
}
.tpopb-carousel-track {
    display: flex;
    transition: none;
}
.tpopb-carousel-slide {
    display: none;
    width: 100%;
    flex-shrink: 0;
    cursor: pointer;
}
.tpopb-carousel-slide.active {
    display: block;
}
.tpopb-carousel-img {
    display: block;
    width: 100%;
    height: 400px;
    object-fit: cover;
}
.tpopb-carousel-prev,
.tpopb-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 1.2em;
    z-index: 10;
}
.tpopb-carousel-prev { left: 0; }
.tpopb-carousel-next { right: 0; }
.tpopb-carousel-dots {
    text-align: center;
    padding: 8px 0;
}
.tpopb-carousel-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    margin: 0 3px;
    cursor: pointer;
}
.tpopb-carousel-dot.active {
    background: #2d7a2d;
}

/* ── Strip: mobile stacks to 2-column grid ── */
@media (max-width: 640px) {
    .tpopb-gallery--strip {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4px;
    }
    .tpopb-gallery--strip .tpopb-gallery-item {
        max-height: 160px;
    }
}

/* Lightbox */
.tpopb-gallery--strip .tpopb-gallery-item {
    height: 180px;
    overflow: hidden;
    cursor: pointer;
}
.tpopb-gallery--strip .tpopb-gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.tpopb-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}
.tpopb-lightbox.active {
    display: flex;
}
.tpopb-lightbox-inner {
    position: relative;
    width: 900px;
    max-width: 95vw;
    height: 600px;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tpopb-lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}
.tpopb-lightbox-close {
    position: absolute;
    top: -44px;
    right: 0;
    color: #fff;
    font-size: 2em;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
}
.tpopb-lightbox-prev,
.tpopb-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 2em;
    cursor: pointer;
    background: rgba(0,0,0,0.5);
    border: none;
    padding: 10px 16px;
}
.tpopb-lightbox-prev { left: -60px; }
.tpopb-lightbox-next { right: -60px; }
.tpopb-lightbox-counter {
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 0.85em;
}

/* Request Form */
.tpopb-request-form-widget .tpopb-form {
    padding: 20px;
}

.tpopb-request-form-widget .tpopb-form-group {
    margin-bottom: 16px;
}
