/**
 * Package Frontend Styles
 *
 * Matches existing PH Bookings interface styling exactly.
 *
 * @package BookingFlow_Packages
 */

/* ==========================================================================
   RESET - Override Elementor/Theme list styles
   ========================================================================== */
.ph-package-booking-wrapper,
.ph-package-booking-wrapper * {
	list-style: none !important;
	list-style-type: none !important;
}

.ph-package-booking-wrapper ul,
.ph-package-booking-wrapper ol,
.ph-package-booking-wrapper li {
	list-style: none !important;
	list-style-type: none !important;
	margin: 0;
	padding: 0;
}

/* Booking Wrapper */
.ph-package-booking-wrapper {
	max-width: 100%;
	margin: 0;
	padding: 0;
	background: #fff;
}

.ph-package-booking-wrapper h2 {
	font-family: "Overpass", Sans-serif;
	font-size: 24px;
	font-weight: 500;
	margin-bottom: 20px;
	margin-top: 30px;
	color: #333;
}

.ph-package-booking-wrapper h3 {
	font-size: 18px;
	font-weight: 600;
	margin-bottom: 15px;
	margin-top: 0;
	color: #333;
}

/* Membership Section - AT TOP */
.ph-membership-section {
	background: #fff;
	padding: 0px 0px 20px 0;
	margin-bottom: 20px;
	border-bottom: 1px solid #000000;
}

.ph-membership-toggle {
	display: flex;
	gap: 20px;
}

.ph-membership-toggle label {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 15px;
	cursor: pointer;
}

.ph-membership-toggle input[type="radio"] {
	width: 18px;
	height: 18px;
	cursor: pointer;
}

.ph-membership-question {
	font-weight: 600;
	font-size: 16px;
	margin: 0 0 10px 0;
	color: #333;
}

.ph-membership-note {
	font-size: 13px;
	color: #666;
	font-style: italic;
}

/* Calendar Section */
.ph-package-calendar-section {
	background: #f3f3f3;
	padding: 30px;
	border-radius: 20px;
	margin-bottom: 20px;
}

.ph-calendar-wrapper {
	max-width: 100%;
}

.ph-calendar-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding: 10px;
}

.ph-calendar-month-year {
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	color: #333;
}

.ph-calendar-nav {
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	padding: 5px 15px;
	color: #333;
	transition: all 0.2s;
}

.ph-calendar-nav:hover,
.ph-calendar-nav:focus {
	background: #008ad2 !important;
	color: #fff !important;
	border-radius: 4px;
	outline: none;
}

.ph-calendar-grid {
	display: grid !important;
	grid-template-columns: repeat(7, 1fr) !important;
	gap: 10px !important;
	margin-bottom: 20px;
	list-style: none !important;
	padding: 0 !important;
}

/* Prevent layout jump while calendar loads */
.ph-calendar-grid {
	min-height: 420px;
}

/* Calendar day headers and days - ensure no list styling */
.ph-calendar-day-header,
.ph-calendar-day {
	list-style: none !important;
	display: block;
}

/* Loading state - pulsing "..." in day number area */
.ph-calendar-day-number .loading {
	display: inline-block;
	color: #999;
	letter-spacing: 2px;
	animation: ph-pulse 1.2s ease-in-out infinite;
}

@keyframes ph-pulse {
	0%, 100% { opacity: 0.2; transform: scale(0.9); }
	50% { opacity: 1; transform: scale(1.1); }
}


/* HTML: <div class="loader"></div> */
.loader {
  width: 60px;
  aspect-ratio: 4;
  background: radial-gradient(circle closest-side,#000 90%,#0000) 0/calc(100%/3) 100% space;
  clip-path: inset(0 100% 0 0);
  animation: l1 1s steps(4) infinite;
}




.ph-calendar-day-header {
	text-align: center;
	font-weight: 400;
	padding: 10px;
	color: #666;
	font-size: 13px;
}

.ph-calendar-day {
	text-align: center;
	padding: 0px 0px;
	cursor: pointer;
	transition: all 0.2s;
	background: transparent;
	border: none;
	min-height: 60px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	border-radius: 8px;
	position: relative;
}

.ph-calendar-day:hover:not(.disabled):not(.past):not(.hover-sequence):not(.selected):not(.in-range) {
	background: #e8e8e8;
	border-radius: 8px;
}

/* Keep selected dates dark blue even when hovering */
.ph-calendar-day.selected:hover,
.ph-calendar-day.in-range:hover {
	background: #008ad2 !important;
	color: #fff;
}

/* Out of season - gray background */
.ph-calendar-day.disabled.out-of-season,
.ph-calendar-day.past {
	cursor: not-allowed;
	background: #d1d1d1;
}

.ph-calendar-day.disabled.out-of-season .ph-calendar-day-number,
.ph-calendar-day.disabled.out-of-season .ph-calendar-day-availability,
.ph-calendar-day.past .ph-calendar-day-number,
.ph-calendar-day.past .ph-calendar-day-availability {
	color: #b6afaf;
}

/* Fullbókað (no availability) - entire date becomes red */
.ph-calendar-day.disabled.no-availability {
	background: #ef5350 !important;
	border-radius: 8px;
}

.ph-calendar-day.disabled.no-availability .ph-calendar-day-number {
	color: #000;
}

.ph-calendar-day.disabled.no-availability .ph-calendar-day-availability {
	color: rgba(0, 0, 0, 0.16);
}

.ph-calendar-day.selected {
	background: #008ad2 !important;
	border-radius: 8px;
	color: #fff;
}

.ph-calendar-day.in-range {
	background: #008ad2 !important;
	border-radius: 8px;
	color: #fff;
}

.ph-calendar-day-number {
	font-size: 15px;
	font-weight: 600;
	margin-bottom: 3px;
}

.ph-calendar-day-availability {
	font-size: 10px;
	min-height: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: absolute;
	bottom: 2px;
	color: rgba(0, 0, 0, 0.16);
	font-weight: 600;
}

/* Availability backgrounds applied to calendar day - Gradient style matching PH Bookings */
/* High availability (>10) - solid green background */
.ph-calendar-day.availability-high:not(.selected):not(.in-range) {
	background: #dae4d8;
}

/* Medium availability (6-10) - green to yellow gradient */
.ph-calendar-day.availability-medium:not(.selected):not(.in-range) {
	background: linear-gradient(180deg, #dae4d8 70%, #ffdf00 10%);
}

/* Low availability (1-5) - green to pink gradient */
.ph-calendar-day.availability-low:not(.selected):not(.in-range) {
	background: linear-gradient(180deg, #dae4d8 30%, #fba405 10%);
}

.ph-calendar-day.selected .ph-calendar-day-availability,
.ph-calendar-day.in-range .ph-calendar-day-availability {
	color: transparent;
}

/* Override red "Fullbókað" styling when day is part of selected range */
/* Higher specificity (4 classes) beats .disabled.no-availability (3 classes) */
.ph-calendar-day.disabled.no-availability.selected,
.ph-calendar-day.disabled.no-availability.in-range,
.ph-calendar-day.availability-high.selected,
.ph-calendar-day.availability-high.in-range,
.ph-calendar-day.availability-medium.selected,
.ph-calendar-day.availability-medium.in-range,
.ph-calendar-day.availability-low.selected,
.ph-calendar-day.availability-low.in-range {
	background: #008ad2 !important;
	color: #fff;
}

.ph-calendar-day.disabled.no-availability.selected .ph-calendar-day-availability,
.ph-calendar-day.disabled.no-availability.in-range .ph-calendar-day-availability,
.ph-calendar-day.availability-high.selected .ph-calendar-day-availability,
.ph-calendar-day.availability-high.in-range .ph-calendar-day-availability,
.ph-calendar-day.availability-medium.selected .ph-calendar-day-availability,
.ph-calendar-day.availability-medium.in-range .ph-calendar-day-availability,
.ph-calendar-day.availability-low.selected .ph-calendar-day-availability,
.ph-calendar-day.availability-low.in-range .ph-calendar-day-availability {
	color: transparent;
}

/* CRITICAL: Ensure white text on ALL selected/in-range date numbers */
/* This overrides any specific color rules on .ph-calendar-day-number */
.ph-calendar-day.selected .ph-calendar-day-number,
.ph-calendar-day.in-range .ph-calendar-day-number {
	color: #fff !important;
}

/* Override Closed (out-of-season) styling when selected */
.ph-calendar-day.disabled.out-of-season.selected,
.ph-calendar-day.disabled.out-of-season.in-range {
	background: #008ad2 !important;
	color: #fff;
}

.ph-calendar-day.disabled.out-of-season.selected .ph-calendar-day-number,
.ph-calendar-day.disabled.out-of-season.in-range .ph-calendar-day-number {
	color: #fff !important;
}

.ph-calendar-day.disabled.out-of-season.selected .ph-calendar-day-availability,
.ph-calendar-day.disabled.out-of-season.in-range .ph-calendar-day-availability {
	color: transparent;
}

/* Hover sequence highlight - higher specificity to override default hover */
.ph-calendar-day.hover-sequence,
.ph-calendar-day.hover-sequence:hover {
	box-shadow: 0px 0px 5px 3px #c0d0bc;
	border-radius: 8px;
}

.ph-calendar-day.hover-sequence .ph-calendar-day-availability,
.ph-calendar-day.hover-sequence:hover .ph-calendar-day-availability {
	/* Keep availability visible during hover */
}

.ph-calendar-day.empty {
	background: transparent;
	cursor: default;
}

.ph-date-selection-instructions {
	text-align: center;
}

.ph-date-selection-note {
	margin: 0 0 10px 0;
	font-size: 13px;
	color: #333;
	border-radius: 0;
}

/* Availability Legend */
.ph-availability-legend {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 15px;
	margin-bottom: 10px;
}

.ph-legend-title {
	font-size: 11px;
    color: #00000052;
    font-weight: 500;
    margin-right: 5px;
    text-transform: uppercase;
}

.ph-legend-item {
	display: flex;
	align-items: center;
	gap: 5px;
}

.ph-legend-box {
	width: 20px;
	height: 20px;
	border-radius: 3px;
	display: inline-block;
}

.ph-legend-box.availability-high {
	background: #dae4d8;
}

.ph-legend-box.availability-medium {
	background: linear-gradient(180deg, #dae4d8 70%, #ffdf00 10%);
}

.ph-legend-box.availability-low {
	background: linear-gradient(180deg, #dae4d8 30%, #fba405 10%);
}

.ph-legend-box.availability-none {
	background: #ef5350;
}

.ph-legend-label {
	font-size: 12px;
	color: #00000052;
	font-weight: 400;
}

.ph-date-selection-summary {
	text-align: center;
	padding: 15px;
	background: #ececec;
	margin: 0;
	font-size: 13px;
	color: #333;
	border-radius: 0;
	font-weight: 400;
}

.ph-date-selection-summary strong {
	font-weight: 600;
	text-transform: uppercase;
}

/* Participants Section */
.ph-participants-section {
	background: #fff;
	padding: 0;
	margin-bottom: 20px;
}

.ph-participant-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 15px 0;
	border-bottom: 1px solid #eee;
}

.ph-participant-row:last-child {
	border-bottom: none;
}

.ph-participant-row label {
	font-size: 15px;
	color: #333;
	margin: 0;
	font-weight: 400;
}

.ph-quantity-control {
	display: flex;
	align-items: center;
	gap: 0px;
}

.ph-qty-btn {
	width: 30px;
	height: 30px;
	border: none;
	background: none;
	color: #008ad2;
	font-size: 24px;
	cursor: pointer;
	transition: all 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	font-weight: 300;
	border-radius: 4px;
}

.ph-qty-btn:hover:not(:disabled),
.ph-qty-btn:focus:not(:disabled) {
	background: #008ad2 !important;
	color: #fff !important;
	outline: none;
}

.ph-qty-btn:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.ph-quantity-control input[type="number"] {
	width: 50px;
	text-align: right;
	font-size: 16px;
	font-weight: 400;
	border: 0px solid #ddd;
	border-radius: 0;
	padding: 5px;
	background: #fff;
}

/* Guest Info Section */
.ph-guest-info-section {
	background: #fff;
	padding: 0;
	margin-bottom: 30px;
}

.ph-guest-block {
	margin-bottom: 30px;
	padding: 20px 0; /* Remove left/right padding */
	background: #fff; /* White background */
	border-radius: 0;
	border-left: none;
}

.ph-guest-block h4 {
	margin-top: 0;
	margin-bottom: 15px;
	color: #333;
	font-size: 15px;
	font-weight: 600;
}

.ph-guest-fields {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 15px;
}

.ph-guest-field {
	display: flex;
	flex-direction: column;
}

.ph-guest-field label {
	font-size: 14px;
	color: #666;
	margin-bottom: 5px;
	font-weight: 400;
}

.ph-guest-field label .required {
	color: #d63638;
}

.ph-guest-field input,
.ph-guest-field select {
	padding: 8px;
	border: 1px solid #ddd;
	border-radius: 0;
	font-size: 14px;
	background: #fff;
}

.ph-guest-field input:focus,
.ph-guest-field select:focus {
	outline: none;
	border-color: #008ad2;
}

/* Price is now displayed in the summary text below calendar */
/* (Removed redundant .ph-price-display section) */

.ph-price-row-total td {
	padding-top: 15px;
	font-size: 16px;
	color: #333;
	font-weight: 600;
}

.ph-price-row-discount td {
	color: #28a745;
}

/* Book Button */
.ph-btn-book {
	width: 100%;
	padding: 18px 30px !important;
	font-size: 16px !important;
	font-weight: 400 !important;
	background: #008ad2 !important;
	background-color: #008ad2 !important;
	color: #fff !important;
	border: none !important;
	border-radius: 100px !important;
	cursor: pointer !important;
	transition: all 0.2s;
	margin-bottom: 30px !important;
	text-transform: none !important;
}

.ph-btn-book:hover:not(:disabled) {
	background: #006ba6 !important;
	background-color: #006ba6 !important;
	color: #fff !important;
}

.ph-btn-book:disabled {
	background: #ccc !important;
	background-color: #ccc !important;
	color: #fff !important;
	cursor: not-allowed !important;
}

/* Package Details */
.ph-package-details {
	background: #fff;
	padding: 0;
	margin-top: 30px;
}

.ph-package-details h4 {
	margin-top: 0;
	margin-bottom: 15px;
	color: #333;
	font-size: 16px;
}

.ph-package-items-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.ph-package-items-list li {
	padding: 0px 0;
	margin-bottom: 5px;
	background: transparent;
	border-radius: 0;
	font-size: 16px;
	color: #333;
}

.ph-package-items-list .day-label {
	font-weight: 600;
	color: #008ad2;
	margin-right: 10px;
}

/* Loading Overlay */
.ph-booking-loading {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(255, 255, 255, 0.85);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	z-index: 9999;
}

.ph-spinner {
	width: 50px;
	height: 50px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid #008ad2;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.ph-loading-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 20px;
}

.ph-loading-message {
	margin-top: 20px;
	font-size: 16px;
	color: #333;
	font-weight: 400;
}

/* Progress Dots */
.ph-progress-dots {
	display: flex;
	gap: 10px;
	margin-top: 15px;
}

.ph-progress-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #ddd;
	transition: all 0.3s ease;
}

.ph-progress-dot.active {
	background: #008ad2;
	transform: scale(1.2);
}

/* Booking Error Message */
.ph-booking-error {
	display: flex;
	align-items: center;
	gap: 12px;
	background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
	border: 1px solid #f5c6cb;
	border-left: 4px solid #dc3545;
	border-radius: 8px;
	padding: 15px 20px;
	margin-bottom: 20px;
	animation: slideIn 0.3s ease-out;
}

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

.ph-error-icon {
	font-size: 20px;
	flex-shrink: 0;
}

.ph-error-text {
	flex-grow: 1;
	color: #721c24;
	font-size: 14px;
	line-height: 1.4;
}

.ph-error-close {
	background: none;
	border: none;
	font-size: 24px;
	color: #999;
	cursor: pointer;
	padding: 0;
	line-height: 1;
	flex-shrink: 0;
	transition: color 0.2s;
}

.ph-error-close:hover {
	color: #333;
}

/* Validation Errors */
.ph-validation-error {
	background: #f8d7da;
	border-left: 4px solid #d63638;
	padding: 15px;
	margin-bottom: 20px;
	border-radius: 0;
	color: #721c24;
	font-size: 14px;
}

.ph-field-error {
	border-color: #d63638 !important;
}

.ph-error-message {
	color: #d63638;
	font-size: 12px;
	margin-top: 5px;
}

/* Responsive */
@media (max-width: 1024px) {
	.ph-guest-fields {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.ph-calendar-grid {
		gap: 2px;
	}

	.ph-calendar-day {
		min-height: 55px;
		padding: 10px 0px;
		border-radius: 8px;
	}

	.ph-calendar-day-number {
		font-size: 13px;
	}

	.ph-calendar-day-availability {
		font-size: 9px;
	}

	.ph-guest-fields {
		grid-template-columns: 1fr;
	}

	.ph-membership-toggle {
		flex-direction: column;
	}

	.ph-availability-legend {
		gap: 10px;
		flex-wrap: wrap;
	}

	.ph-legend-item {
		gap: 3px;
	}

	.ph-legend-box {
		width: 18px;
		height: 18px;
	}

	.ph-legend-label {
		font-size: 11px;
	}
	
	.ph-package-calendar-section {
		background: #f3f3f3;
		padding: 10px;
		border-radius: 8px;
		margin-bottom: 20px;
	}
}

