/**
 * HA Booking — frontend styles.
 *
 * Colours are exposed as custom properties on .ha-booking-* roots so a theme
 * can restyle the widget without overriding rules.
 */

:root {
	/* Brand palette — matches the theme's buttons and body copy. */
	--ha-gold: #d1a342;
	--ha-gold-dark: #b88a2c;
	--ha-ink: #012827;
	--ha-teal: #012827;
	--ha-muted: #5c7574;
	--ha-line: #e3e0d8;
	--ha-bg: #fbfaf7;
	--ha-radius: 10px;

	/* Theme typography. The faces are loaded by the theme; the stacks below
	   only reference them and fall back gracefully if they are unavailable. */
	--ha-font-heading: "Scaver", "Times New Roman", serif;
	--ha-font-body: "aeonik", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Everything the plugin renders inherits the theme's body font and ink. */
.ha-booking-services,
.ha-booking-grid,
.ha-booking-addons-table,
.ha-booking-modal,
.ha-booking-account,
.ha-booking-upload,
.ha-booking-area-notice {
	font-family: var(--ha-font-body);
	color: var(--ha-ink);
}

.ha-booking-card__title,
.ha-booking-modal__title,
.ha-booking-step__title,
.ha-booking-services__title,
.ha-booking-addons-table__title,
.ha-booking-breakdown__title,
.ha-booking-account h2,
.ha-booking-account__head h3,
.ha-booking-upload h3 {
	font-family: var(--ha-font-heading);
	color: var(--ha-ink);
}

/* ------------------------------------------------------------------ cards */

.ha-booking-grid {
	display: grid;
	grid-template-columns: repeat(var(--ha-columns, 3), minmax(0, 1fr));
	gap: 28px;
}

@media (max-width: 900px) {
	.ha-booking-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.ha-booking-grid {
		grid-template-columns: 1fr;
	}
}

.ha-booking-grid--single {
	max-width: 380px;
}

.ha-booking-card {
	display: flex;
	flex-direction: column;
	background: transparent;
	border: 1px solid #E0E0E070;
	border-radius: var(--ha-radius);
	overflow: hidden;
	padding: 15px;
}

.ha-booking-card .ha-booking-card__media {
    height: 350px;
	border-radius: 10px;
    overflow: hidden;
}

.ha-booking-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ha-booking-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding-top: 30px;
}

.ha-booking-card__title {
	margin: 0 0 6px;
    line-height: 1.3;
    color: #000000;
    font-family: "aeonik", Sans-serif;
    font-size: 30px;
    font-weight: 600;
}

.ha-booking-card__price {
	margin: 10px 0 20px;
    font-family: 'Scaver';
    font-weight: 600;
    font-size: 20px;
}

.ha-booking-card__suffix {
	font-size: 0.85rem;
	font-weight: 400;
	color: var(--ha-muted);
}

.ha-booking-card__excerpt {
	margin: 0 0 10px;
	color: var(--ha-muted);
	font-size: 0.92rem;
	line-height: 1.5;
}

.ha-booking-card__actions .ha-booking-card__more {
    display: none;
}

.ha-booking-card__meta {
	display: none;
	margin: 0 0 16px;
	font-size: 0.82rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ha-muted);
}

.ha-booking-card__actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
}

.ha-booking-card__more {
	font-weight: 600;
	color: var(--ha-ink);
	text-decoration: underline;
}

/* ---------------------------------------------------------------- buttons */

.ha-booking-btn {
	display: inline-flex;
    align-items: center;
    gap: 20px;
    padding: 8px 8px 8px 24px;
    border: 0;
    border-radius: 999px;
    background: var(--ha-gold) !important;
    color: #fff;
    font-family: 'aeonik';
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.09em;
    line-height: 1;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease;
}

.ha-booking-btn:hover:not(:disabled),
.ha-booking-btn:focus-visible:not(:disabled) {
	background: var(--ha-gold-dark);
	color: #fff;
}

.ha-booking-btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.ha-booking-btn__label {
	display: inline-block;
	padding: 4px 0;
}

/* White circle with a gold arrow, as on the theme's own buttons. */
.ha-booking-btn__arrow {
	display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    color: var(--ha-gold);
    font-size: 30px;
    font-weight: 400;
    letter-spacing: 0;
    padding-bottom: 5px;
}

.ha-booking-btn--ghost {
	padding: 12px 24px;
	background: transparent;
	border: 1px solid var(--ha-line);
	color: var(--ha-ink);
}

.ha-booking-btn--ghost:hover:not(:disabled) {
	background: #f2f0ea;
	color: var(--ha-ink);
}

/* ------------------------------------------------------------ addon table */

.ha-booking-addons-table table {
	width: 100%;
	border-collapse: collapse;
	border: 1px solid var(--ha-line);
	border-radius: var(--ha-radius);
	overflow: hidden;
}

.ha-booking-addons-table thead th {
	background: var(--ha-teal);
	color: #fff;
	text-align: left;
	font-size: 0.82rem;
	letter-spacing: 0.05em;
	padding: 12px 16px;
}

.ha-booking-addons-table tbody td {
	padding: 12px 16px;
	border-top: 1px solid var(--ha-line);
	font-size: 0.92rem;
	color: var(--ha-ink);
}

.ha-booking-addons-table .ha-right {
	text-align: right;
	white-space: nowrap;
}

/* ----------------------------------------------------------------- modal */

body.ha-booking-modal-open {
	overflow: hidden;
}

.ha-booking-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.ha-booking-modal[hidden] {
	display: none;
}

.ha-booking-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(20, 20, 20, 0.55);
}

.ha-booking-modal__close:hover { background: #F44336 !important; }
.ha-booking-modal__close:hover path { stroke: white; }

.ha-booking-modal__dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(900px, 100%);
	max-height: 90vh;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
	overflow: hidden;
}

.ha-booking-modal__dialog.is-busy {
	pointer-events: none;
	opacity: 0.72;
}

.ha-booking-modal__close {
	position: absolute;
	top: 12px;
	right: 14px;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	font-size: 1.6rem;
	line-height: 1;
	color: var(--ha-muted);
	cursor: pointer;
	padding: 0;
}

.ha-booking-modal__close:hover {
	background: #f2f0ea;
}

.ha-booking-modal__header {
	padding: 26px 28px 14px;
	border-bottom: 1px solid var(--ha-line);
}

.ha-booking-modal__title {
	margin: 0 0 10px;
    font-size: 32px;
    color: var(--ha-ink);
    line-height: 29px;
    font-weight: 700;
    font-family: 'aeonik';
}

.ha-booking-modal__price {
	margin: 0;
    font-size: 26px;
    font-weight: 600;
    font-family: 'aeonik';
}

.ha-booking-modal__body {
	flex: 1;
	padding: 22px 28px;
	overflow-y: auto;
}

.ha-booking-modal__notice {
	margin: 0 28px 12px;
	padding: 11px 14px;
	border-radius: 8px;
	background: #eef6f5;
	color: var(--ha-teal);
	font-size: 0.9rem;
}

.ha-booking-modal__notice.is-error {
	background: #fdecec;
	color: #98241f;
}

.ha-booking-modal__footer {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 28px;
	border-top: 1px solid var(--ha-line);
	background: var(--ha-bg);
}

.ha-booking-total {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-right: auto;
}

.ha-booking-total__label {
	font-size: 0.8rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ha-muted);
}

.ha-booking-total__value {
	font-size: 1.25rem;
	color: var(--ha-ink);
}

/* ------------------------------------------------------------- modal steps */

.ha-booking-step__title {
	margin: 0 0 15px;
    font-size: 25px;
    font-weight: 700;
    font-family: 'aeonik';
}

.ha-booking-muted {
	margin: 0 0 14px;
	color: var(--ha-muted);
	font-size: 0.9rem;
}

.ha-booking-loading {
	padding: 30px 0;
	text-align: center;
	color: var(--ha-muted);
}

.ha-booking-addon-list {
	margin: 0 0 16px;
    padding: 0;
    list-style: none;
    overflow: hidden;
}

.ha-booking-addon-list li + li {
	border-top: 1px solid var(--ha-line);
}

.ha-booking-addon {
	display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 16px;
    cursor: pointer;
}

.ha-booking-addon input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #0b3838;
}

.ha-booking-addon:hover {
	background: var(--ha-bg);
}

.ha-booking-addon__name {
	flex: 1;
    font-size: 16px;
    font-family: 'aeonik';
    font-weight: 400;
}

.ha-booking-addon__price {
	font-weight: 400;
	color: var(--ha-ink);
	white-space: nowrap;
}

/* --------------------------------------------------------------- calendar */

.ha-booking-schedule {
	display: grid;
	grid-template-columns: 1fr 190px;
	gap: 24px;
	align-items: start;
}

@media (max-width: 640px) {
	.ha-booking-schedule {
		grid-template-columns: 1fr;
	}
}

.ha-booking-calendar__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.ha-booking-calendar__label {
	font-weight: 400;
	color: var(--ha-ink);
}

.ha-booking-calendar__nav {
	width: 32px;
    height: 32px;
    border: 1px solid var(--ha-line);
    border-radius: 50%;
    background: #fff;
    font-size: 17px;
    line-height: 1;
    color: var(--ha-ink);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 3px;
    border: 1px solid #d1a342;
    color: #d1a342;
}

.ha-booking-calendar__nav:disabled {
	opacity: 0.35;
	cursor: not-allowed;
	border: 1px solid #000;
    color: #000;
}

.ha-booking-calendar__grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
	text-align: center;
}

.ha-booking-calendar__dow {
	padding: 6px 0;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #000000;
    font-weight: 600;
}

.ha-booking-addon input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #0b3838;
}

.ha-booking-calendar__grid button {
    height: 55px;
    width: 55px;
    margin: auto;
}

.ha-booking-calendar__grid button:hover {
    background: #d1a342;
}

.ha-booking-calendar__pad {
	display: block;
}

.ha-booking-calendar__day {
	padding: 9px 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	font-size: 0.9rem;
	color: var(--ha-ink);
	cursor: pointer;
}

.ha-booking-calendar__day:hover:not(:disabled) {
	background: #f2ede1;
}

.ha-booking-calendar__day.is-disabled {
	color: #c9c9c9;
	text-decoration: line-through;
	cursor: not-allowed;
}

.ha-booking-calendar__day.is-today {
	box-shadow: inset 0 0 0 1px var(--ha-gold);
}

.ha-booking-calendar__day.is-selected {
	background: var(--ha-gold);
	color: #fff;
}

/* ------------------------------------------------------------------ slots */

.ha-booking-slots__title {
	margin: 0 0 10px;
	font-size: 0.8rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ha-muted);
	text-align: center;
}

.ha-booking-slots__list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 338px;
	overflow-y: auto;
	padding-right: 4px;
}

.ha-booking-slot {
	padding: 9px 14px;
	border: 1px solid var(--ha-line);
	border-radius: 999px;
	background: #fff;
	font-size: 0.88rem;
	color: var(--ha-ink);
	cursor: pointer;
}

.ha-booking-slot:hover {
	border-color: var(--ha-gold);
}

.ha-booking-slot.is-selected {
	background: var(--ha-gold);
	border-color: var(--ha-gold);
	color: #fff;
}
/* WooCommerce field description - normal helper text */
.woocommerce form .form-row .woocommerce-input-wrapper .description {
    display: block !important;
    position: static !important;
    width: 100%;
    background: transparent !important;
    color: #555 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 8px 0 0 !important;
    font-size: 13px;
    line-height: 1.5;
    box-shadow: none !important;
}

/* Remove WooCommerce tooltip arrow */
.woocommerce form .form-row .woocommerce-input-wrapper .description::before {
    display: none !important;
    content: none !important;
}

.ha-booking-addons-table .ha-booking-addons-table__title {
    font-size: 32px;
    line-height: 29px;
    font-weight: 700;
    font-family: 'aeonik';
    margin-bottom: 24px;
}

.ha-booking-addons-table table thead th {
    background: #016364;
    font-size: 20px;
    font-weight: 500;
    font-family: 'aeonik';
}

.ha-booking-addons-table table tbody td {
    border: 0;
    background: white !important;
    font-size: 16px;
    font-weight: 400;
    font-family: 'aeonik';
    padding-block: 15px;
}
/* --------------------------------------------------------- timezone/policy */

.ha-booking-tz {
	margin: 18px 0 0;
    padding: 10px 14px;
    border-radius: 8px;
    background: #fbfaf700;
    font-size: 0.85rem;
    color: var(--ha-muted);
    border: 1px solid #ccc;
}

.ha-booking-slot:hover {
    background: #d1a342;
}

.ha-booking-policy {
	margin-top: 14px;
}

.ha-booking-policy__label {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-size: 0.84rem;
	line-height: 1.55;
	color: var(--ha-muted);
	cursor: pointer;
}

.ha-booking-policy__label input {
	margin-top: 3px;
	flex-shrink: 0;
}

.ha-booking-policy__link {
	color: var(--ha-teal);
	text-decoration: underline;
}

/* ------------------------------------------------------------- my account */

.ha-booking-account {
	margin-top: 34px;
}

.ha-booking-account__tz {
	color: var(--ha-muted);
	font-size: 0.9rem;
}

.ha-booking-account__item {
	padding: 18px 20px;
	margin-bottom: 16px;
	border: 1px solid var(--ha-line);
	border-left: 4px solid var(--ha-teal);
	border-radius: var(--ha-radius);
	background: #fff;
}

.ha-booking-account__item.ha-booking-status--cancelled {
	border-left-color: #b23b36;
	opacity: 0.82;
}

.ha-booking-account__item.ha-booking-status--pending {
	border-left-color: var(--ha-gold);
}

.ha-booking-account__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}

.ha-booking-account__head h3 {
	margin: 0;
	font-size: 1.05rem;
}

.ha-booking-badge {
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--ha-bg);
	border: 1px solid var(--ha-line);
	font-size: 0.75rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ha-muted);
	white-space: nowrap;
}

.ha-booking-account__when {
	margin: 8px 0 4px;
	font-size: 1rem;
	font-weight: 600;
	color: var(--ha-ink);
}

.ha-booking-account__addons,
.ha-booking-account__note {
	margin: 4px 0 0;
	font-size: 0.88rem;
	color: var(--ha-muted);
}

.ha-booking-cancel-form {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px dashed var(--ha-line);
}

.ha-booking-cancel-form__label {
	display: block;
	margin-bottom: 4px;
	font-size: 0.82rem;
	color: var(--ha-muted);
}

.ha-booking-cancel-form textarea {
	width: 100%;
	max-width: 460px;
	margin-bottom: 10px;
}

.ha-booking-cancel-btn {
	background: #b23b36;
	border-color: #b23b36;
	color: #fff;
}

.ha-booking-cancel-btn:hover {
	background: #8f2e2a;
	color: #fff;
}

.ha-booking-account__document {
	margin-top: 12px;
	font-size: 0.9rem;
}

/* -------------------------------------------------------------- ZIP field */

.ha-booking-zip {
	margin-top: 18px;
	padding: 16px;
	border: 1px solid var(--ha-line);
	border-radius: var(--ha-radius);
	background: #fff;
}

.ha-booking-zip__label {
	display: block;
	margin-bottom: 6px;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--ha-ink);
}

.ha-booking-zip__input {
	width: 180px;
	max-width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--ha-line);
	border-radius: 8px;
	font-family: var(--ha-font-body);
	font-size: 1rem;
	color: var(--ha-ink);
	background: #fff;
}

.ha-booking-zip__input:focus {
	outline: none;
	border-color: var(--ha-gold);
	box-shadow: 0 0 0 3px rgba(209, 163, 66, 0.18);
}

.ha-booking-zip__feedback {
	margin: 10px 0 0;
	padding: 9px 13px;
	border-radius: 8px;
	font-size: 0.87rem;
	line-height: 1.45;
	background: #f1f2f2;
	color: var(--ha-muted);
}

.ha-booking-zip__feedback.is-ok {
	background: #e6f2ec;
	color: #14603f;
}

.ha-booking-zip__feedback.is-warning {
	background: #fbf2df;
	color: #7d5c11;
}

.ha-booking-zip__feedback.is-error {
	background: #fdecec;
	color: #98241f;
}

.ha-booking-zip__notice {
	margin: 10px 0 0;
	font-size: 0.8rem;
	line-height: 1.5;
	color: var(--ha-muted);
}

/* ------------------------------------------------------------- breakdown */

.ha-booking-breakdown {
	margin-top: 18px;
	padding: 16px;
	border-radius: var(--ha-radius);
	background: var(--ha-bg);
}

.ha-booking-breakdown__title {
	margin: 0 0 10px;
	font-size: 0.95rem;
}

.ha-booking-breakdown__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding: 5px 0;
	font-size: 0.9rem;
	color: var(--ha-muted);
}

.ha-booking-breakdown__amount {
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.ha-booking-breakdown__row--total {
	margin-top: 6px;
	padding-top: 10px;
	border-top: 1px solid var(--ha-line);
	font-size: 1.02rem;
	font-weight: 700;
	color: var(--ha-ink);
}

/* ------------------------------------------------------- checkout upload */

.ha-booking-area-notice {
	margin: 0 0 20px;
	padding: 12px 16px;
	border-left: 3px solid var(--ha-gold);
	border-radius: 6px;
	background: var(--ha-bg);
	font-size: 0.88rem;
	line-height: 1.55;
	color: var(--ha-muted);
}

.ha-booking-area-notice p {
	margin: 0;
}

.ha-booking-upload {
	margin: 24px 0;
	padding: 20px;
	border: 1px solid var(--ha-line);
	border-radius: var(--ha-radius);
	background: #fff;
}

.ha-booking-upload h3 {
	margin: 0 0 6px;
	font-size: 1.05rem;
}

.ha-booking-upload__description {
	margin: 0 0 12px;
	font-size: 0.9rem;
	line-height: 1.55;
	color: var(--ha-muted);
}

.ha-booking-upload input[type="file"] {
	display: block;
	width: 100%;
	max-width: 420px;
	padding: 10px;
	border: 1px dashed var(--ha-line);
	border-radius: 8px;
	background: var(--ha-bg);
	font-family: var(--ha-font-body);
	font-size: 0.88rem;
	color: var(--ha-ink);
}

.ha-booking-upload__formats {
	margin: 8px 0 0;
	font-size: 0.78rem;
	color: var(--ha-muted);
}

.ha-booking-upload__status {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 12px;
	padding: 10px 14px;
	border-radius: 8px;
	background: #f1f2f2;
	font-size: 0.88rem;
	color: var(--ha-muted);
}

.ha-booking-upload__status.is-ok {
	background: #e6f2ec;
	color: #14603f;
}

.ha-booking-upload__status.is-error {
	background: #fdecec;
	color: #98241f;
}

.ha-booking-upload__file {
	flex: 1;
	word-break: break-all;
}

.ha-booking-upload__remove {
	border: 0;
	background: none;
	padding: 0;
	color: #98241f;
	font-family: var(--ha-font-body);
	font-size: 0.82rem;
	text-decoration: underline;
	cursor: pointer;
}
