/**
 * AZ Hotel Platform - Frontend Styles
 * Modern, clean, Airbnb-inspired booking UI.
 */

:root {
	--azhp-primary: #ff385c;
	--azhp-primary-hover: #e31c5f;
	--azhp-text: #222222;
	--azhp-text-soft: #717171;
	--azhp-border: #dddddd;
	--azhp-border-soft: #ebebeb;
	--azhp-bg: #ffffff;
	--azhp-bg-soft: #f7f7f7;
	--azhp-shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
	--azhp-shadow-md: 0 6px 20px rgba(0,0,0,0.08);
	--azhp-shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
	--azhp-radius: 12px;
	--azhp-radius-lg: 16px;
	--azhp-success: #008a05;
	--azhp-danger: #c13515;
}

/* Base */
.azhp-app,
.azhp-search-wrap,
.azhp-public-calendar {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--azhp-text);
	line-height: 1.5;
	box-sizing: border-box;
}

.azhp-app *,
.azhp-search-wrap *,
.azhp-public-calendar * {
	box-sizing: border-box;
}

/* ===================== SEARCH BAR ===================== */

.azhp-search-wrap {
	max-width: 920px;
	margin: 32px auto;
	padding: 0 16px;
}

.azhp-search {
	display: flex;
	align-items: stretch;
	background: var(--azhp-bg);
	border: 1px solid var(--azhp-border);
	border-radius: 48px;
	box-shadow: var(--azhp-shadow-md);
	padding: 8px;
	gap: 0;
	transition: box-shadow 0.2s ease;
}

.azhp-search:hover {
	box-shadow: var(--azhp-shadow-lg);
}

.azhp-search-field {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 10px 20px;
	border-right: 1px solid var(--azhp-border-soft);
	min-width: 0;
}

.azhp-search-field:last-of-type {
	border-right: none;
}

.azhp-search-field label {
	font-size: 12px;
	font-weight: 600;
	color: var(--azhp-text);
	margin-bottom: 2px;
	letter-spacing: 0.02em;
}

.azhp-search-field input,
.azhp-search-field select {
	border: none;
	padding: 0;
	font-size: 14px;
	color: var(--azhp-text-soft);
	background: transparent;
	outline: none;
	width: 100%;
	font-family: inherit;
}

.azhp-search-field input:focus,
.azhp-search-field select:focus {
	color: var(--azhp-text);
}

.azhp-search-btn {
	background: var(--azhp-primary);
	color: #fff;
	border: none;
	border-radius: 40px;
	padding: 0 24px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.15s ease;
	font-family: inherit;
	min-height: 48px;
	margin: auto 4px;
}

.azhp-search-btn:hover {
	background: var(--azhp-primary-hover);
	transform: scale(1.02);
}

.azhp-search-btn svg {
	stroke: #fff;
}

@media (max-width: 760px) {
	.azhp-search {
		flex-direction: column;
		border-radius: var(--azhp-radius-lg);
		padding: 12px;
	}
	.azhp-search-field {
		border-right: none;
		border-bottom: 1px solid var(--azhp-border-soft);
		padding: 12px 16px;
	}
	.azhp-search-field:last-of-type {
		border-bottom: none;
	}
	.azhp-search-btn {
		width: 100%;
		justify-content: center;
		margin-top: 8px;
	}
}

/* ===================== APP CONTAINER ===================== */

.azhp-app {
	max-width: 1200px;
	margin: 32px auto;
	padding: 0 20px;
}

.azhp-app-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 20px;
	background: var(--azhp-bg-soft);
	border-radius: var(--azhp-radius);
	margin-bottom: 24px;
	flex-wrap: wrap;
	gap: 12px;
}

.azhp-summary {
	font-size: 15px;
	color: var(--azhp-text);
}

.azhp-summary strong {
	font-weight: 600;
}

.azhp-edit-search {
	background: #fff;
	border: 1px solid var(--azhp-border);
	border-radius: 24px;
	padding: 8px 16px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	font-family: inherit;
	color: var(--azhp-text);
}

.azhp-edit-search:hover {
	border-color: var(--azhp-text);
	box-shadow: var(--azhp-shadow-sm);
}

.azhp-search-inline {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 12px;
	padding: 16px;
	background: #fff;
	border: 1px solid var(--azhp-border);
	border-radius: var(--azhp-radius);
	margin-bottom: 24px;
}

.azhp-search-inline .azhp-search-field {
	border-right: none;
	padding: 4px 8px;
}

.azhp-search-inline input,
.azhp-search-inline select {
	border: 1px solid var(--azhp-border);
	border-radius: 8px;
	padding: 8px 10px;
	font-size: 14px;
	color: var(--azhp-text);
}

@media (max-width: 760px) {
	.azhp-search-inline {
		grid-template-columns: 1fr 1fr;
	}
}

/* ===================== ROOMS GRID ===================== */

.azhp-view-title {
	font-size: 22px;
	font-weight: 600;
	margin: 0 0 20px;
	color: var(--azhp-text);
}

.azhp-rooms-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 28px;
}

.azhp-room-card {
	background: #fff;
	border-radius: var(--azhp-radius-lg);
	overflow: hidden;
	cursor: pointer;
	transition: transform 0.2s ease;
	display: flex;
	flex-direction: column;
}

.azhp-room-card:hover {
	transform: translateY(-2px);
}

.azhp-room-card:hover .azhp-room-image {
	transform: scale(1.02);
}

.azhp-room-image {
	width: 100%;
	aspect-ratio: 1 / 1;
	background: var(--azhp-bg-soft);
	background-size: cover;
	background-position: center;
	border-radius: var(--azhp-radius-lg);
	transition: transform 0.3s ease;
	position: relative;
	overflow: hidden;
}

.azhp-room-image-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--azhp-text-soft);
	font-size: 13px;
	width: 100%;
	height: 100%;
}

.azhp-room-body {
	padding: 12px 4px 0;
}

.azhp-room-title {
	font-size: 16px;
	font-weight: 600;
	color: var(--azhp-text);
	margin: 0 0 2px;
}

.azhp-room-type {
	font-size: 14px;
	color: var(--azhp-text-soft);
	margin: 0 0 6px;
}

.azhp-room-capacity {
	font-size: 13px;
	color: var(--azhp-text-soft);
	margin: 0 0 8px;
}

.azhp-room-price {
	font-size: 15px;
	color: var(--azhp-text);
	margin: 4px 0 0;
}

.azhp-room-price strong {
	font-weight: 600;
}

.azhp-room-price-total {
	color: var(--azhp-text-soft);
	font-size: 13px;
	text-decoration: underline;
	margin-top: 2px;
}

/* ===================== ROOM DETAIL ===================== */

.azhp-detail {
	display: grid;
	grid-template-columns: 1.6fr 1fr;
	gap: 48px;
	margin-top: 16px;
}

@media (max-width: 900px) {
	.azhp-detail {
		grid-template-columns: 1fr;
		gap: 24px;
	}
}

.azhp-detail-back {
	background: none;
	border: none;
	font-size: 14px;
	color: var(--azhp-text);
	cursor: pointer;
	padding: 8px 0;
	margin-bottom: 16px;
	font-weight: 600;
	text-decoration: underline;
	font-family: inherit;
}

.azhp-detail-gallery {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	grid-template-rows: 1fr 1fr;
	gap: 8px;
	border-radius: var(--azhp-radius-lg);
	overflow: hidden;
	aspect-ratio: 16 / 9;
	margin-bottom: 24px;
}

.azhp-detail-gallery > div {
	background: var(--azhp-bg-soft);
	background-size: cover;
	background-position: center;
}

.azhp-detail-gallery > div:first-child {
	grid-row: 1 / 3;
}

.azhp-detail h1 {
	font-size: 26px;
	font-weight: 600;
	margin: 0 0 8px;
}

.azhp-detail-meta {
	color: var(--azhp-text-soft);
	font-size: 15px;
	margin-bottom: 24px;
}

.azhp-detail-description {
	font-size: 16px;
	color: var(--azhp-text);
	line-height: 1.6;
	padding: 24px 0;
	border-top: 1px solid var(--azhp-border-soft);
	border-bottom: 1px solid var(--azhp-border-soft);
}

.azhp-services-title {
	font-size: 20px;
	font-weight: 600;
	margin: 24px 0 16px;
}

.azhp-services-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 12px;
}

.azhp-service-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 0;
	font-size: 14px;
	color: var(--azhp-text);
}

.azhp-service-icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	color: var(--azhp-text-soft);
}

/* Booking card (sidebar) */

.azhp-booking-card {
	position: sticky;
	top: 24px;
	background: #fff;
	border: 1px solid var(--azhp-border);
	border-radius: var(--azhp-radius-lg);
	padding: 24px;
	box-shadow: var(--azhp-shadow-md);
}

.azhp-booking-card-price {
	font-size: 22px;
	font-weight: 600;
	margin-bottom: 16px;
}

.azhp-booking-card-price span {
	font-weight: 400;
	font-size: 16px;
	color: var(--azhp-text-soft);
}

.azhp-booking-card-dates {
	border: 1px solid var(--azhp-border);
	border-radius: 10px;
	overflow: hidden;
	margin-bottom: 12px;
}

.azhp-booking-card-dates-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
}

.azhp-booking-card-dates-row > div {
	padding: 10px 12px;
	border-right: 1px solid var(--azhp-border);
}

.azhp-booking-card-dates-row > div:last-child {
	border-right: none;
}

.azhp-booking-card-dates-row small {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--azhp-text);
	display: block;
	margin-bottom: 2px;
}

.azhp-booking-card-dates-row strong {
	font-size: 14px;
	font-weight: 500;
	color: var(--azhp-text);
}

.azhp-booking-card-guests {
	border: 1px solid var(--azhp-border);
	border-top: none;
	border-radius: 0 0 10px 10px;
	padding: 10px 12px;
}

.azhp-booking-card-guests small {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--azhp-text);
	display: block;
	margin-bottom: 2px;
}

.azhp-cta {
	width: 100%;
	background: var(--azhp-primary);
	color: #fff;
	border: none;
	border-radius: 10px;
	padding: 14px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	margin-top: 16px;
	transition: background 0.15s ease, transform 0.15s ease;
	font-family: inherit;
}

.azhp-cta:hover {
	background: var(--azhp-primary-hover);
	transform: translateY(-1px);
}

.azhp-cta:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.azhp-price-breakdown {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid var(--azhp-border-soft);
	font-size: 15px;
	color: var(--azhp-text);
}

.azhp-price-row {
	display: flex;
	justify-content: space-between;
	padding: 6px 0;
}

.azhp-price-total {
	font-weight: 600;
	padding-top: 14px;
	margin-top: 6px;
	border-top: 1px solid var(--azhp-border-soft);
	font-size: 16px;
}

/* ===================== BOOKING FORM ===================== */

.azhp-booking-form {
	max-width: 720px;
	margin: 0 auto;
	background: #fff;
	border: 1px solid var(--azhp-border);
	border-radius: var(--azhp-radius-lg);
	padding: 32px;
}

.azhp-booking-form h2 {
	font-size: 22px;
	font-weight: 600;
	margin: 0 0 6px;
}

.azhp-booking-form .azhp-subtitle {
	color: var(--azhp-text-soft);
	margin: 0 0 24px;
}

.azhp-field {
	margin-bottom: 16px;
}

.azhp-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--azhp-text);
	margin-bottom: 6px;
}

.azhp-field input,
.azhp-field textarea,
.azhp-field select {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--azhp-border);
	border-radius: 10px;
	font-size: 15px;
	font-family: inherit;
	color: var(--azhp-text);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	background: #fff;
}

.azhp-field input:focus,
.azhp-field textarea:focus,
.azhp-field select:focus {
	outline: none;
	border-color: var(--azhp-text);
	box-shadow: 0 0 0 2px rgba(0,0,0,0.05);
}

.azhp-grid-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

@media (max-width: 520px) {
	.azhp-grid-2 {
		grid-template-columns: 1fr;
	}
}

.azhp-payment-options {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-bottom: 16px;
}

@media (max-width: 520px) {
	.azhp-payment-options {
		grid-template-columns: 1fr;
	}
}

.azhp-payment-option {
	display: block;
	cursor: pointer;
}

.azhp-payment-option input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.azhp-payment-option-box {
	padding: 16px;
	border: 1px solid var(--azhp-border);
	border-radius: 10px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	text-align: center;
}

.azhp-payment-option input:checked + .azhp-payment-option-box {
	border-color: var(--azhp-text);
	border-width: 2px;
	padding: 15px;
	background: var(--azhp-bg-soft);
}

.azhp-payment-option-title {
	font-weight: 600;
	margin-bottom: 4px;
}

.azhp-payment-option-desc {
	font-size: 13px;
	color: var(--azhp-text-soft);
}

/* ===================== SUCCESS ===================== */

.azhp-success {
	max-width: 560px;
	margin: 32px auto;
	text-align: center;
	background: #fff;
	border: 1px solid var(--azhp-border);
	border-radius: var(--azhp-radius-lg);
	padding: 48px 32px;
}

.azhp-success-icon {
	width: 64px;
	height: 64px;
	background: var(--azhp-success);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 16px;
	color: #fff;
}

.azhp-success h2 {
	font-size: 24px;
	font-weight: 600;
	margin: 0 0 8px;
}

.azhp-success p {
	color: var(--azhp-text-soft);
	margin: 4px 0;
}

.azhp-success-reference {
	display: inline-block;
	background: var(--azhp-bg-soft);
	border: 1px solid var(--azhp-border);
	border-radius: 8px;
	padding: 12px 20px;
	font-family: monospace;
	font-size: 16px;
	margin: 16px 0;
	font-weight: 600;
}

/* ===================== UTILS / MISC ===================== */

.azhp-loading {
	padding: 40px;
	text-align: center;
	color: var(--azhp-text-soft);
	grid-column: 1 / -1;
}

.azhp-empty {
	padding: 48px 24px;
	text-align: center;
	color: var(--azhp-text-soft);
	background: var(--azhp-bg-soft);
	border-radius: var(--azhp-radius);
	grid-column: 1 / -1;
}

.azhp-error {
	background: #fff0ee;
	color: var(--azhp-danger);
	border: 1px solid #f9c7bf;
	padding: 12px 14px;
	border-radius: 8px;
	margin-bottom: 12px;
	font-size: 14px;
}

/* ===================== PUBLIC CALENDAR ===================== */

.azhp-public-calendar {
	max-width: 520px;
	margin: 24px auto;
	background: #fff;
	border: 1px solid var(--azhp-border);
	border-radius: var(--azhp-radius);
	padding: 20px;
}

.azhp-cal-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
}

.azhp-cal-nav {
	background: none;
	border: 1px solid var(--azhp-border);
	border-radius: 50%;
	width: 36px;
	height: 36px;
	cursor: pointer;
	font-size: 18px;
	font-family: inherit;
}

.azhp-cal-nav:hover {
	background: var(--azhp-bg-soft);
}

.azhp-cal-title {
	font-weight: 600;
	font-size: 16px;
}

.azhp-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}

.azhp-cal-dow {
	text-align: center;
	font-size: 11px;
	font-weight: 700;
	color: var(--azhp-text-soft);
	text-transform: uppercase;
	padding: 8px 0;
}

.azhp-cal-cell {
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	border-radius: 50%;
	color: var(--azhp-text);
}

.azhp-cal-cell.azhp-cal-empty {
	visibility: hidden;
}

.azhp-cal-cell.azhp-cal-blocked {
	color: #ccc;
	text-decoration: line-through;
	background: var(--azhp-bg-soft);
}

.azhp-cal-cell.azhp-cal-past {
	color: #ccc;
}

.azhp-legend {
	display: flex;
	gap: 16px;
	justify-content: center;
	margin-top: 16px;
	font-size: 12px;
	color: var(--azhp-text-soft);
}

.azhp-legend-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.azhp-dot {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
}

.azhp-dot-available { background: #d4f5d4; border: 1px solid #8ece8e; }
.azhp-dot-booked { background: #ffd4d4; border: 1px solid #e89090; }
.azhp-dot-blocked { background: #e0e0e0; border: 1px solid #aaa; }
