/* Palazzo Haven checkout: delivery tabs, agent finder, payment block. */

:root {
	--pc-ink: #1d1d1b;
	--pc-muted: #6b6b66;
	--pc-line: #e3e0d8;
	--pc-accent: #1d1d1b;
	--pc-wa: #25d366;
	--pc-warn: #8a6100;
}

/* Once JS is up, WooCommerce's own radio row is replaced by the tabs. */
.pc-has-tabs tr.woocommerce-shipping-totals.shipping > th,
.pc-has-tabs tr.woocommerce-shipping-totals.shipping > td {
	display: none;
}

/* The order table's second column is right-aligned for prices; this row is text. */
.pc-delivery-row > td {
	padding: 0 !important;
	text-align: left !important;
}

.pc-delivery {
	padding: 18px 0 6px;
}

.pc-delivery__heading {
	margin: 0 0 12px;
	font-weight: 600;
	font-size: 15px;
	color: var(--pc-ink);
}

/* ---- Tabs ---- */

.pc-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 14px;
}

.pc-tab {
	flex: 1 1 140px;
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding: 11px 12px;
	background: #fff;
	border: 1px solid var(--pc-line);
	border-radius: 8px;
	cursor: pointer;
	text-align: left;
	font: inherit;
	line-height: 1.3;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.pc-tab:hover {
	border-color: #bdb9ad;
}

.pc-tab.is-active {
	border-color: var(--pc-accent);
	box-shadow: inset 0 0 0 1px var(--pc-accent);
}

.pc-tab__name {
	font-weight: 600;
	font-size: 13.5px;
	color: var(--pc-ink);
}

.pc-tab__price {
	font-size: 12px;
	color: var(--pc-muted);
}

/* Astra paints every <button> in its dark theme colour on hover and focus,
   in spaced capitals. On the tabs and the agent list that left dark text on a
   dark fill, and a tap on a phone leaves the button in that state. */
.pc-delivery .pc-tab,
.pc-delivery .pc-agent {
	text-transform: none;
	letter-spacing: normal;
	color: var(--pc-ink);
}

.pc-delivery .pc-tab:hover,
.pc-delivery .pc-tab:focus,
.pc-delivery .pc-tab:active {
	background: #fff;
	color: var(--pc-ink);
}

.pc-delivery .pc-agent:hover,
.pc-delivery .pc-agent:focus,
.pc-delivery .pc-agent:active {
	background: #f3eee4;
	color: var(--pc-ink);
	border-color: var(--pc-accent);
}

.pc-delivery .pc-input,
.pc-delivery .pc-input:focus {
	background-color: #fff;
	color: var(--pc-ink);
}

.pc-delivery select.pc-input option {
	background: #fff;
	color: var(--pc-ink);
}

/* ---- Panels ---- */

.pc-panel {
	display: none;
	padding: 14px;
	background: #faf9f6;
	border: 1px solid var(--pc-line);
	border-radius: 8px;
	font-size: 13.5px;
	line-height: 1.55;
}

.pc-panel.is-active {
	display: block;
}

.pc-panel p {
	margin: 0 0 10px;
}

.pc-panel p:last-child {
	margin-bottom: 0;
}

.pc-points {
	margin: 0 0 10px;
	padding-left: 18px;
}

.pc-points li {
	margin-bottom: 4px;
}

.pc-note {
	font-size: 12.5px;
	color: var(--pc-muted);
}

.pc-note--warn {
	color: var(--pc-warn);
	font-weight: 600;
}

/* ---- Agent finder ---- */

.pc-input {
	width: 100%;
	padding: 9px 11px;
	border: 1px solid var(--pc-line);
	border-radius: 6px;
	background: #fff;
	font: inherit;
	font-size: 14px;
}

.pc-finder__label {
	display: block;
	margin-bottom: 5px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--pc-ink);
}

.pc-browse {
	margin: 10px 0;
	font-size: 12.5px;
}

.pc-browse summary {
	cursor: pointer;
	color: var(--pc-muted);
}

.pc-browse__row {
	display: flex;
	gap: 8px;
	margin-top: 8px;
}

.pc-results {
	margin-top: 10px;
	max-height: 260px;
	overflow-y: auto;
}

.pc-results__group + .pc-results__group {
	margin-top: 10px;
}

.pc-results__area {
	margin: 0 0 5px;
	font-size: 11.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--pc-muted);
}

.pc-results ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.pc-results li {
	margin-bottom: 5px;
}

.pc-results__empty {
	margin: 10px 0 0;
	font-size: 13px;
	color: var(--pc-muted);
}

.pc-agent {
	display: flex;
	align-items: baseline;
	gap: 8px;
	width: 100%;
	padding: 9px 11px;
	background: #fff;
	border: 1px solid var(--pc-line);
	border-radius: 6px;
	cursor: pointer;
	text-align: left;
	font: inherit;
	font-size: 13px;
}

.pc-agent:hover {
	border-color: var(--pc-accent);
}

.pc-agent.is-loading {
	opacity: .55;
}

.pc-agent__name {
	font-weight: 600;
	color: var(--pc-ink);
}

.pc-agent__landmark {
	color: var(--pc-muted);
	font-size: 12px;
}

.pc-agent__price {
	margin-left: auto;
	white-space: nowrap;
	color: var(--pc-muted);
	font-size: 12.5px;
}

.pc-chosen-agent {
	display: none;
	align-items: flex-start;
	gap: 8px;
	margin-top: 10px;
	padding: 10px 12px;
	background: #edf6ee;
	border: 1px solid #bfdcc4;
	border-radius: 6px;
	font-size: 13px;
	line-height: 1.45;
}

.pc-chosen-agent.is-set {
	display: flex;
}

.pc-chosen-agent__tick {
	color: #1b7f34;
	font-weight: 700;
}

/* ---- WhatsApp ---- */

.pc-whatsapp-btn {
	display: inline-block;
	padding: 10px 18px;
	background: var(--pc-wa);
	color: #fff !important;
	border-radius: 6px;
	font-weight: 600;
	font-size: 13.5px;
	text-decoration: none !important;
}

.pc-whatsapp-btn:hover,
.pc-whatsapp-btn:focus {
	/* The theme darkens link backgrounds on hover, which turned this almost
	   black and the label with it. Both are stated outright instead. */
	background: #1eb855;
	color: #fff !important;
	filter: none;
}

/* Order-on-WhatsApp buttons on the product, cart and checkout pages. */
.pc-chat {
	margin: 14px 0;
}

.pc-chat--product {
	clear: both;
}

.pc-chat--cart .pc-whatsapp-btn {
	display: block;
	text-align: center;
	margin-top: 10px;
}

.pc-chat--checkout {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 16px;
	align-items: center;
	padding: 12px 14px;
	border: 1px solid var(--pc-line);
	border-radius: 6px;
}

.pc-chat--checkout p {
	margin: 0;
	flex: 1 1 240px;
	font-size: 14px;
	color: var(--pc-muted);
}

.pc-reserve-note {
	margin: 12px 0 0;
	font-size: 12.5px;
	color: var(--pc-muted);
}

/* ---- Payment instructions ---- */

.pc-pay {
	margin: 14px 0;
	padding: 15px 17px;
	background: #faf9f6;
	border: 1px solid var(--pc-line);
	border-radius: 8px;
}

.pc-pay__title {
	margin: 0 0 9px;
	font-weight: 700;
	font-size: 14.5px;
	color: var(--pc-ink);
}

.pc-pay__steps {
	margin: 0 0 9px;
	padding-left: 20px;
	font-size: 13.5px;
	line-height: 1.7;
}

.pc-pay__name {
	margin: 0 0 8px;
	font-size: 13px;
}

/* WhatsApp under the "I have sent the money" box on the thank-you page. */
.pc-wa-nudge {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 14px;
	align-items: center;
	margin: 0 0 16px;
	font-size: 13.5px;
	color: var(--pc-muted);
}

/* ---- "I have paid" ---- */

.pc-confirm {
	margin: 16px 0;
	padding: 15px 17px;
	background: #fff;
	border: 1px solid var(--pc-line);
	border-radius: 8px;
}

.pc-confirm__btn {
	padding: 11px 22px;
	background: var(--pc-accent);
	color: #fff;
	border: 0;
	border-radius: 6px;
	cursor: pointer;
	font: inherit;
	font-weight: 600;
	font-size: 14px;
}

.pc-confirm__btn:disabled {
	opacity: .6;
	cursor: default;
}

.pc-confirm .pc-note {
	margin: 8px 0 0;
}

.pc-confirm--done {
	background: #edf6ee;
	border-color: #bfdcc4;
}

.pc-confirm--done p {
	margin: 0;
	font-size: 13.5px;
}

@media (max-width: 600px) {
	.pc-tab {
		flex: 1 1 100%;
	}

	.pc-browse__row {
		flex-direction: column;
	}

	/* iOS Safari zooms the whole page in when a focused field is under 16px.
	   The agent search is the one box every shopper has to tap, so on phones
	   these go to 16px - otherwise the page lurches and they pinch back out. */
	.pc-input,
	#pc-agent-search,
	#pc-county,
	#pc-area {
		font-size: 16px;
	}
}

/* ---- Mobile: the chosen panel sits under its own tab ---- */

@media (max-width: 600px) {
	/* Moved here by the script so the answer appears where the finger is,
	   rather than below three other tabs where it reads as broken. */
	.pc-panel.is-active.pc-panel--inline {
		margin: 0 0 10px;
		border-top: 0;
	}

	.pc-tabs {
		display: block;
	}

	.pc-tab {
		width: 100%;
	}
}
