/* ==========================================================
   Travel AI Platform — LUXURY EDITION
   Responsive + Visual Polish + Print/PDF Layer

   Loads LAST so every rule here is the final word.

   PADDING SPEC (as requested):
     - Desktop + Tablet: page sections get a tight
       10px top/bottom rhythm — content breathes through
       card padding, not through huge outer whitespace.
     - Mobile: near edge-to-edge, native-app feel.
       Side padding is just 1-2px so content gets maximum
       width; vertical rhythm stays a comfortable 10px.
     - Internal card/element padding is untouched — this
       only trims the OUTER page gutters.

   Breakpoints:
     1200px -> small desktop
      992px -> tablet
      768px -> mobile
      480px -> small mobile
   ========================================================== */


/* ---------- Global overflow + box-sizing guards ---------- */

.tap-hotel-single,
.tap-favorites-page,
.tap-public-profile,
.tap-public-trip,
.tap-dashboard,
.tap-my-trips,
.tap-trip-page,
.tap-booking-page,
.tap-planner-section {
	box-sizing: border-box;
	max-width: 100%;
	overflow-x: clip;
}

.tap-hotel-single *,
.tap-favorites-page *,
.tap-public-profile *,
.tap-public-trip *,
.tap-dashboard *,
.tap-my-trips *,
.tap-trip-page *,
.tap-booking-page * {
	box-sizing: border-box;
}

.tap-booking-card h3,
.tap-hotel-title,
.tap-hotel-location,
.tap-trip-card h3,
.tap-card h3,
.tap-booking-location {
	overflow-wrap: anywhere;
	word-break: break-word;
	hyphens: auto;
}

.tap-hotel-single img,
.tap-booking-card img,
.tap-card img,
.tap-trip-card img {
	max-width: 100%;
	height: auto;
	display: block;
}


/* ---------- Fluid typography ---------- */

.tap-hero h1 {
	font-family: var(--tap-font-heading);
	font-size: clamp(1.75rem, 5vw + 0.5rem, 3.25rem);
	line-height: 1.15;
	letter-spacing: -0.01em;
}

.tap-hero p {
	font-size: clamp(0.95rem, 1.4vw + 0.5rem, 1.15rem);
	line-height: 1.7;
}

.tap-page-header h2,
.tap-hotel-title {
	font-family: var(--tap-font-heading);
	font-size: clamp(1.4rem, 3vw + 0.5rem, 2.25rem);
	line-height: 1.2;
	letter-spacing: -0.01em;
}

.tap-booking-card h3,
.tap-card h3 {
	font-size: clamp(1rem, 1vw + 0.75rem, 1.2rem);
	line-height: 1.35;
}


/* ---------- Tap targets + iOS zoom fix ---------- */

.tap-btn,
.tap-book-btn,
.tap-hotel-book-btn,
.tap-submit button {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.tap-btn:hover,
.tap-hotel-book-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(14, 42, 82, 0.2);
}

.tap-btn:active {
	transform: translateY(0);
}

.tap-btn:focus-visible,
.tap-field input:focus-visible,
.tap-field select:focus-visible,
a:focus-visible {
	outline: 2px solid var(--tap-gold);
	outline-offset: 2px;
	border-radius: 4px;
}


/* ---------- Card polish ---------- */

.tap-booking-card,
.tap-card,
.tap-trip-card,
.tap-summary-card {
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
	max-width: 100%;
}

@media (hover: hover) {

	.tap-booking-card:hover,
	.tap-trip-card:hover {
		transform: translateY(-3px);
		box-shadow: 0 12px 28px rgba(14, 42, 82, 0.14);
		border-color: var(--tap-gold-light);
	}
}

.tap-booking-image {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--tap-bg-alt);
}

.tap-booking-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tap-booking-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	font-size: 2.5rem;
	opacity: 0.35;
}


/* ---------- Hotel single page ---------- */

.tap-hotel-single {
	max-width: 1100px;
	margin: 0 auto;
}

.tap-hotel-breadcrumb {
	font-size: 0.875rem;
	opacity: 0.75;
	margin-bottom: 20px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
}

.tap-hotel-breadcrumb .tap-sep {
	opacity: 0.4;
}

.tap-hotel-hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 32px;
	align-items: start;
	margin-bottom: 40px;
}

.tap-hotel-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 16px;
}

.tap-hotel-chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 6px 12px;
	border-radius: 999px;
	font-size: 0.8125rem;
	font-weight: 600;
	white-space: nowrap;
}

.tap-hotel-booking-box {
	position: sticky;
	top: 24px;
}

.tap-hotel-price-block {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 16px;
}

.tap-hotel-price-label {
	font-size: 0.8125rem;
	opacity: 0.65;
}

.tap-hotel-price {
	font-size: clamp(1.5rem, 2.5vw, 2rem);
	line-height: 1;
}

.tap-hotel-book-btn {
	width: 100%;
}

.tap-hotel-synced {
	font-size: 0.75rem;
	opacity: 0.6;
	margin: 12px 0 0;
	text-align: center;
}

.tap-hotel-body {
	line-height: 1.75;
	max-width: 70ch;
}


/* ==========================================================
   OUTER PAGE PADDING — 10px top/bottom on desktop + tablet
   ========================================================== */

.tap-planner-section,
.tap-hotel-single,
.tap-hotel-archive,
.tap-favorites-page,
.tap-public-profile,
.tap-public-trip,
.tap-dashboard,
.tap-my-trips,
.tap-trip-page,
.tap-booking-page {
	padding-top: 10px;
	padding-bottom: 10px;
}


/* ---------- Small desktop (<=1200px) ---------- */

@media (max-width: 1200px) {

	.tap-container {
		padding: 0 20px;
	}

	.tap-booking-page,
	.tap-my-trips,
	.tap-trip-page {
		padding-left: 20px;
		padding-right: 20px;
	}
}


/* ---------- Tablet (<=991px) ---------- */

@media (max-width: 991px) {

	.tap-grid {
		grid-template-columns: 1fr;
	}

	.tap-hotel-hero {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.tap-hotel-booking-box {
		position: static;
	}

	.tap-trip-header,
	.tap-page-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}

	.tap-hero {
		margin-bottom: 50px;
	}

	.tap-profile-header,
	.tap-trip-hero {
		flex-direction: column;
		text-align: center;
	}

	.tap-booking-grid,
	.tap-card-grid,
	.tap-trip-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	/* Tablet still respects the 10px top/bottom rhythm; sides
	   get a small practical gutter, not the desktop's full one. */
	.tap-planner-section,
	.tap-hotel-single,
	.tap-hotel-archive,
	.tap-favorites-page,
	.tap-public-profile,
	.tap-public-trip,
	.tap-dashboard,
	.tap-my-trips,
	.tap-trip-page,
	.tap-booking-page {
		padding-top: 10px;
		padding-bottom: 10px;
		padding-left: 10px;
		padding-right: 10px;
	}
}


/* ---------- Mobile (<=768px) — native-app feel ---------- */

@media (max-width: 768px) {

	.tap-planner-section {
		padding: 10px 2px;
	}

	.tap-container {
		padding: 0 2px;
	}

	.tap-hotel-single,
	.tap-hotel-archive,
	.tap-favorites-page,
	.tap-public-profile,
	.tap-public-trip,
	.tap-dashboard,
	.tap-my-trips,
	.tap-trip-page,
	.tap-booking-page {
		padding-top: 10px;
		padding-bottom: 10px;
		padding-left: 2px;
		padding-right: 2px;
		margin-top: 10px;
		margin-bottom: 10px;
	}

	/* Cards keep their own internal padding so content never
	   touches the screen edge even though the page gutter is
	   nearly gone — this is what makes it read as "app-like"
	   rather than just cramped. */
	.tap-card,
	.tap-summary-card,
	.tap-booking-card,
	.tap-trip-card,
	.tap-day-card,
	.tap-info-card,
	.tap-schedule-card,
	.tap-section,
	.tap-summary,
	#tap-planner-form .tap-card,
	.tap-auth-box,
	.tap-hotel-booking-box {
		margin-left: 2px;
		margin-right: 2px;
	}

	.tap-badge {
		font-size: 0.75rem;
		padding: 8px 14px;
	}

	.tap-hero {
		margin-bottom: 36px;
	}

	#tap-planner-form .tap-card {
		padding: 22px;
	}

	.tap-submit {
		margin-top: 28px;
	}

	.tap-submit .tap-btn,
	.tap-submit button {
		width: 100%;
	}

	.tap-field-row,
	.tap-grid {
		grid-template-columns: 1fr !important;
		gap: 16px;
	}

	.tap-field input,
	.tap-field select,
	.tap-field textarea {
		min-height: 48px;
		font-size: 16px;
		width: 100%;
	}

	.tap-booking-grid,
	.tap-card-grid,
	.tap-trip-grid,
	.tap-itinerary .tap-hotels,
	.tap-itinerary .tap-flights,
	.tap-itinerary .tap-restaurants,
	.tap-itinerary .tap-shopping,
	.tap-itinerary .tap-attractions,
	.tap-itinerary .tap-map {
		grid-template-columns: 1fr !important;
		gap: 16px;
	}

	.tap-page-header {
		margin-bottom: 20px;
	}

	.tap-dashboard-actions,
	.tap-trip-actions,
	.tap-empty-actions,
	.tap-booking-footer-inner {
		flex-direction: column;
		align-items: stretch;
	}

	.tap-dashboard-actions .tap-btn,
	.tap-trip-actions .tap-btn,
	.tap-trip-actions a,
	.tap-empty-actions .tap-btn,
	.tap-btn {
		min-width: 0;
		width: 100%;
	}

	.tap-summary-grid,
	.tap-day-grid,
	.tap-grid-2 {
		grid-template-columns: 1fr;
	}

	.tap-booking-summary {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.tap-auth-wrapper {
		padding: 10px 2px;
	}

	.tap-auth-box {
		padding: 28px 20px;
	}

	.tap-timeline {
		padding-left: 20px;
	}

	.tap-booking-tabs,
	.tap-filter-row {
		display: flex;
		overflow-x: auto;
		gap: 8px;
		padding-bottom: 6px;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	.tap-booking-tabs::-webkit-scrollbar,
	.tap-filter-row::-webkit-scrollbar {
		display: none;
	}

	.tap-booking-tabs > * ,
	.tap-filter-row > * {
		flex: 0 0 auto;
	}
}


/* ---------- Small mobile (<=480px) ---------- */

@media (max-width: 480px) {

	.tap-hotel-single,
	.tap-hotel-archive,
	.tap-favorites-page,
	.tap-public-profile,
	.tap-public-trip,
	.tap-dashboard,
	.tap-my-trips,
	.tap-trip-page,
	.tap-booking-page {
		padding-top: 10px;
		padding-bottom: 10px;
		padding-left: 1px;
		padding-right: 1px;
	}

	.tap-container,
	.tap-planner-section {
		padding-left: 1px;
		padding-right: 1px;
	}

	.tap-card,
	.tap-summary-card,
	.tap-booking-card,
	.tap-trip-card,
	.tap-day-card,
	.tap-info-card,
	.tap-schedule-card,
	.tap-section,
	.tap-summary,
	#tap-planner-form .tap-card,
	.tap-auth-box,
	.tap-hotel-booking-box {
		margin-left: 1px;
		margin-right: 1px;
	}

	#tap-planner-form .tap-card {
		padding: 18px;
	}

	.tap-booking-summary {
		grid-template-columns: 1fr;
	}

	.tap-auth-box {
		padding: 24px 16px;
	}

	.tap-card,
	.tap-day-card,
	.tap-summary-card,
	.tap-booking-card {
		padding: 18px;
	}

	.tap-hotel-booking-box {
		padding: 20px;
	}

	.tap-btn {
		font-size: 0.9375rem;
		padding: 14px 20px;
	}
}


/* ---------- Notched phones ---------- */

@supports (padding: max(0px)) {

	@media (max-width: 768px) {

		.tap-hotel-single,
		.tap-booking-page,
		.tap-my-trips,
		.tap-dashboard {
			padding-left: max(2px, env(safe-area-inset-left));
			padding-right: max(2px, env(safe-area-inset-right));
		}
	}
}


/* ---------- Accessibility: reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {

	.tap-btn,
	.tap-booking-card,
	.tap-trip-card,
	.tap-card {
		transition: none !important;
	}

	.tap-btn:hover,
	.tap-booking-card:hover,
	.tap-trip-card:hover {
		transform: none !important;
	}
}


/* ==========================================================
   PRINT / PDF — ULTRA LUXURY, FULL COLOUR
   This is what the "Download / Print Itinerary" button
   produces. Everything below only applies when printing or
   exporting to PDF via the browser's print engine.
   ========================================================== */

@media print {

	@page {
		size: A4;
		margin: 14mm 12mm;
	}

	/* Force every browser to actually print backgrounds and
	   gradients instead of silently stripping them to white —
	   this is the single most common reason a "colourful" PDF
	   design prints out flat and grey. */
	*{
		-webkit-print-color-adjust: exact !important;
		print-color-adjust: exact !important;
		color-adjust: exact !important;
	}

	html, body {
		background: #fff !important;
	}

	/* Kill anything that only makes sense on-screen */
	.tap-hotel-booking-box,
	.tap-btn,
	.tap-book-btn,
	.tap-hotel-book-btn,
	.tap-book-link,
	.tap-booking-tabs,
	.tap-filter-row,
	.tap-loading,
	.tap-trip-right,
	.tap-dashboard-actions,
	.tap-trip-actions,
	.tap-map iframe,
	.tap-map canvas,
	nav, header.site-header, footer.site-footer{
		display: none !important;
	}

	.tap-hotel-single,
	.tap-itinerary,
	.tap-trip-page{
		padding: 0 !important;
		margin: 0 !important;
		max-width: 100% !important;
	}

	/* ---- Cover / hero: deep navy-to-gold, printed in full ---- */

	.tap-trip-hero,
	.tap-trip-header,
	.tap-budget-summary{
		background: linear-gradient(120deg,#0b1f3d 0%,#173963 45%,#a3801f 100%) !important;
		color: #f6efd9 !important;
		border-radius: 18px !important;
		border: 2px solid #c9a227 !important;
		box-shadow: none !important;
		padding: 28px !important;
		page-break-inside: avoid;
		break-inside: avoid;
	}

	.tap-trip-hero *,
	.tap-budget-summary *{
		color: #f6efd9 !important;
	}

	.tap-trip-left h1,
	.tap-trip-hero h1{
		font-family: 'Playfair Display', Georgia, serif !important;
		font-size: 30pt !important;
		border-bottom: 1px solid rgba(246,239,217,.4);
		padding-bottom: 10px;
	}

	/* ---- Section cards: crisp gold-framed panels ---- */

	.tap-section,
	.tap-summary,
	.tap-info-card,
	.tap-day-card,
	.tap-schedule-card,
	.tap-summary-card,
	.tap-card{
		background: #fffdf9 !important;
		border: 1.5px solid #c9a227 !important;
		border-radius: 12px !important;
		box-shadow: none !important;
		page-break-inside: avoid;
		break-inside: avoid;
		margin-bottom: 14px !important;
	}

	.tap-section-title,
	.tap-day-title,
	.tap-schedule-title,
	.tap-summary-title{
		font-family: 'Playfair Display', Georgia, serif !important;
		color: #0e2a52 !important;
	}

	/* ---- Colour-coded section accents so a printed itinerary
	   reads at a glance — each travel category gets its own
	   jewel tone, like a boutique travel-agency dossier. ---- */

	.tap-hotels, .tap-hotels *{ --tap-print-accent: #7c3aed; }
	.tap-flights, .tap-flights *{ --tap-print-accent: #0e2a52; }
	.tap-restaurants, .tap-restaurants *{ --tap-print-accent: #d6552c; }
	.tap-budget, .tap-budget *{ --tap-print-accent: #147a5f; }
	.tap-weather, .tap-weather *{ --tap-print-accent: #0b7285; }
	.tap-shopping, .tap-shopping *{ --tap-print-accent: #c2255c; }
	.tap-safety, .tap-safety *,
	.tap-emergency, .tap-emergency *{ --tap-print-accent: #9c2f22; }
	.tap-packing-list, .tap-packing-list *,
	.tap-local-tips, .tap-local-tips *,
	.tap-transportation, .tap-transportation *,
	.tap-visa, .tap-visa *{ --tap-print-accent: #0f766e; }

	.tap-hotels .tap-info-card,
	.tap-flights .tap-info-card,
	.tap-restaurants .tap-info-card,
	.tap-weather .tap-info-card,
	.tap-shopping .tap-info-card{
		border-left: 6px solid var(--tap-print-accent) !important;
	}

	.tap-day::before{
		background: #0e2a52 !important;
		border-color: #e8c766 !important;
		box-shadow: none !important;
	}

	.tap-day::after{
		background: #c9a227 !important;
	}

	/* Chips / badges / activity pills print as solid colour
	   tags instead of pale, barely-visible backgrounds. */
	.tap-chip,
	.tap-activity,
	.tap-hotel-chip,
	.tap-provider-badge{
		background: #f4e8c8 !important;
		color: #0e2a52 !important;
		border: 1px solid #c9a227 !important;
	}

	.tap-cost{
		background: #eaf6f0 !important;
		border: 1px solid #147a5f !important;
	}

	.tap-notes .tap-card{
		background: #fbf3df !important;
		border: 1px solid #a3801f !important;
	}

	/* Prices/values in the brand gold so the eye jumps to
	   the numbers that matter. */
	.tap-price,
	.tap-flight-price,
	.tap-cost-value,
	.tap-summary-value,
	.tap-budget-total{
		color: #a3801f !important;
	}

	/* Two-column grids collapse to one clean printed column. */
	.tap-hotels, .tap-flights, .tap-weather, .tap-restaurants,
	.tap-shopping, .tap-attractions,
	.tap-summary-grid, .tap-schedule{
		display: block !important;
	}

	.tap-info-card, .tap-schedule-card, .tap-summary-card{
		margin-bottom: 14px !important;
		width: 100% !important;
	}

	a{
		color: #0e2a52 !important;
		text-decoration: none !important;
	}

	/* Gold hairline divider between major sections, drawn with
	   a page-safe border rather than a background gradient. */
	.tap-section + .tap-section,
	.tap-hotels + .tap-flights,
	.tap-budget + .tap-weather{
		border-top: 2px dashed #c9a227;
		padding-top: 16px;
	}

	/* Running page footer with page numbers, boutique-agency style */
	@page{
		@bottom-center{
			content: "— " counter(page) " of " counter(pages) " —";
			font-family: 'Playfair Display', Georgia, serif;
			color: #a3801f;
			font-size: 9pt;
		}
	}
}
