/**
 * WLL Shipping — Frontend Styles
 *
 * Brand colours:
 *   Black:     #353735 (text, borders)
 *   Beige:     #DAD7CB (info notices)
 *   Yellow:    #F8E04D (warning notices)
 *   Turquoise: #35C4B5 (action notices, link hover)
 */

/* ==========================================================================
   Base Notice
   ========================================================================== */

.wll-shipping-notice {
	padding: 1em 1.5em;
	margin-bottom: 1.5em;
	color: #353735;
	border-top: 3px solid #353735;
	border-radius: 2px;
	font-size: 0.95em;
	line-height: 1.5;
}

.wll-shipping-notice strong {
	font-weight: 600;
}

.wll-shipping-notice a {
	color: #353735;
	text-decoration: underline;
	font-weight: 600;
}

.wll-shipping-notice a:hover {
	color: #35C4B5;
}

/* Info — beige (holidays, no-delay NZ Post) */
.wll-shipping-notice--info {
	background-color: #DAD7CB;
}

/* Warning — yellow (NZ Post delays, closures) */
.wll-shipping-notice--warning {
	background-color: #F8E04D;
}

/* Action — turquoise (occasion cutoffs) */
.wll-shipping-notice--action {
	background-color: #35C4B5;
	color: #fff;
}

.wll-shipping-notice--action a {
	color: #fff;
}

.wll-shipping-notice--action a:hover {
	color: #353735;
}

/* ==========================================================================
   PDP Ship Date & Tooltip
   ========================================================================== */

.wll-shipping-tooltip {
	position: relative;
	display: inline-block;
	margin-left: 5px;
}

.wll-shipping-tooltip-trigger {
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
	font-size: 0.9em;
}

.wll-shipping-tooltiptext {
	visibility: hidden;
	width: 380px;
	background-color: #555;
	color: #fff;
	text-align: left;
	border-radius: 6px;
	padding: 12px;
	position: absolute;
	z-index: 999999;
	bottom: 125%;
	left: 50%;
	margin-left: -190px;
	opacity: 0;
	transition: opacity 0.3s;
	font-size: 13px;
	line-height: 1.6;
	font-weight: normal;
}

.wll-shipping-tooltiptext::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 50%;
	margin-left: -5px;
	border-width: 5px;
	border-style: solid;
	border-color: #555 transparent transparent transparent;
}

.wll-shipping-tooltip.active .wll-shipping-tooltiptext {
	visibility: visible;
	opacity: 1;
}

.wll-shipping-note {
	font-size: 14px;
	color: #000;
	display: block;
	margin-top: 4px;
}

/* Mobile: centered modal with backdrop */
@media (max-width: 768px) {
	.wll-shipping-tooltiptext {
		position: fixed;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		width: calc(100vw - 40px);
		max-width: 380px;
		bottom: auto;
		margin: 0;
		z-index: 999999;
	}

	.wll-shipping-tooltiptext::after {
		display: none;
	}

	.wll-shipping-tooltip.active::before {
		content: '';
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background: rgba(0, 0, 0, 0.5);
		z-index: 999998;
	}
}

/* ==========================================================================
   Shortcode Table
   ========================================================================== */

.wll-shipping-table {
	width: 100%;
	border-collapse: collapse;
	margin: 1em 0;
	font-size: 0.95em;
	color: #353735;
}

.wll-shipping-table th,
.wll-shipping-table td {
	text-align: left;
	padding: 0.6em 0.8em;
	border-bottom: 1px solid #DAD7CB;
}

.wll-shipping-table th {
	font-weight: 600;
	border-bottom: 2px solid #353735;
}

.wll-shipping-table tr:last-child td {
	border-bottom: none;
}

/* ==========================================================================
   Occasion Cut-off Table ([wll_occasion_cutoff])
   ========================================================================== */

.wll-occasion-cutoffs {
	margin: 1.5em 0;
	color: #353735;
}

/* Yellow in every state — the band carries the dates, not an alarm level. */
.wll-occasion-cutoffs__band {
	background-color: #F8E04D;
	border-top: 3px solid #353735;
	padding: 1em 1.25em;
}

.wll-occasion-cutoffs__heading {
	margin: 0;
	font-size: 1.35em;
	font-weight: 600;
	line-height: 1.2;
	text-wrap: pretty;
}

.wll-occasion-cutoffs__intro {
	margin: 0.4em 0 0;
	font-size: 0.95em;
	line-height: 1.5;
	text-wrap: pretty;
}

.wll-occasion-cutoffs__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1em;
	margin-top: 1em;
}

.wll-occasion-cutoffs__card {
	display: flex;
	flex-direction: column;
	border: 1px solid #DAD7CB;
	border-top: 3px solid #353735;
	border-radius: 2px;
}

.wll-occasion-cutoffs__card.is-closed {
	border-top-color: #DAD7CB;
	background-color: #FAFAF8;
}

.wll-occasion-cutoffs__island {
	padding: 0.75em 1em 0.15em;
	font-size: 0.75em;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #6a6c69;
}

.wll-occasion-cutoffs__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75em;
	padding: 0.7em 1em;
	border-bottom: 1px solid #EDEBE3;
}

.wll-occasion-cutoffs__row:last-child {
	border-bottom: none;
}

.wll-occasion-cutoffs__lane {
	display: flex;
	flex-direction: column;
	gap: 0.15em;
	font-size: 0.95em;
}

/* Label and its service tag share one line; the transit range sits beneath. */
.wll-occasion-cutoffs__service {
	display: inline-block;
	margin-left: 0.35em;
	padding: 0 0.35em;
	border: 1px solid #35C4B5;
	border-radius: 2px;
	font-size: 0.7em;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #1E8B80;
	vertical-align: 1px;
}

.wll-occasion-cutoffs__row.is-closed .wll-occasion-cutoffs__service {
	border-color: #DAD7CB;
	color: #8a8c88;
}

.wll-occasion-cutoffs__transit {
	font-size: 0.75em;
	color: #8a8c88;
}

.wll-occasion-cutoffs__date {
	font-weight: 600;
	white-space: nowrap;
}

.wll-occasion-cutoffs__row.is-closed .wll-occasion-cutoffs__lane {
	color: #8a8c88;
}

.wll-occasion-cutoffs__row.is-closed .wll-occasion-cutoffs__date {
	color: #a3a5a1;
	text-decoration: line-through;
}

.wll-occasion-cutoffs__closed {
	display: inline-block;
	padding: 0.1em 0.4em;
	border: 1px solid #C0392B;
	border-radius: 2px;
	font-size: 0.7em;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #C0392B;
	text-decoration: none;
	vertical-align: middle;
}

.wll-occasion-cutoffs__notes p {
	margin: 0.6em 0 0;
	font-size: 0.85em;
	line-height: 1.5;
	color: #6a6c69;
	text-wrap: pretty;
}

@media (max-width: 600px) {
	.wll-occasion-cutoffs__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ==========================================================================
   Checkout Delivery Labels
   ========================================================================== */

.wll-shipping-delivery-estimate {
	display: block;
	font-size: 0.85em;
	color: #666;
	margin-top: 0.25em;
}

/* Per-method descriptions (classes match the replaced
   wc-shipping-method-description plugin; content self-styles inline). */
.shipping_method_description {
	margin-top: 0.25em;
}

/* ==========================================================================
   Method Hider Debug Panel (admin-only on cart/checkout)
   ========================================================================== */

.wll-shipping-debug {
	background: #1e1e1e;
	color: #f0f0f0;
	padding: 20px;
	margin: 20px 0;
	border-radius: 8px;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 13px;
	line-height: 1.5;
}

.wll-shipping-debug__title {
	margin: 0 0 15px;
	padding-bottom: 10px;
	color: #4a9eff;
	border-bottom: 1px solid #333;
	font-size: 14px;
}

.wll-shipping-debug__row {
	margin-bottom: 12px;
}

.wll-shipping-debug__label {
	color: #ffc107;
	font-weight: 600;
	margin-right: 6px;
}

.wll-shipping-debug__value {
	color: #a6e22e;
}

.wll-shipping-debug__value--no {
	color: #ff6b6b;
}

.wll-shipping-debug__table {
	width: 100%;
	margin-top: 8px;
	border-collapse: collapse;
}

.wll-shipping-debug__table th,
.wll-shipping-debug__table td {
	padding: 8px;
	border: 1px solid #444;
	text-align: left;
}

.wll-shipping-debug__table th {
	background: #2a2a2a;
}

.wll-shipping-debug__table code {
	color: #66d9ef;
	background: transparent;
}

.wll-shipping-debug__row--visible {
	background: #1a3a1a;
}

.wll-shipping-debug__row--hidden {
	background: #3a1a1a;
}

/* ==========================================================================
   Free Shipping Badge (absorbed from the standalone Free Shipping Badge
   plugin — class names kept for continuity)
   ========================================================================== */

.fsb-badge {
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	border-radius: 3px;
	font-family: inherit;
}

.fsb-badge-single {
	font-size: 70%;
	line-height: 32px;
	margin-top: 20px;
	width: 100%;
}

.fsb-badge-shop {
	font-size: 100%;
	font-weight: 600;
	line-height: 100%;
	padding: 3px 5px;
	width: 100%;
}

.fsb-badge-inline {
	display: inline-flex;
	width: auto !important;
	margin-left: 8px;
	font-size: 80%;
	vertical-align: middle;
	line-height: 1.5;
}

.price span.fsb-badge-inline {
	margin-top: 0 !important;
	margin-left: 5px !important;
}

.variations_form .woocommerce-variation-price span.fsb-badge-inline {
	margin-left: 8px !important;
}

@media screen and (max-width: 992px) {
	.fsb-badge-shop {
		font-weight: 400;
	}

	.fsb-badge-inline {
		margin-top: 4px;
		margin-left: 4px;
		font-size: 0.8em;
	}
}

@media screen and (max-width: 390px) {
	.fsb-badge-inline {
		margin-left: 2px;
		margin-right: 0;
		padding: 2px 3px !important;
		font-size: 0.75em;
		line-height: 1.3;
	}

	.price span.fsb-badge-inline,
	.variations_form .woocommerce-variation-price span.fsb-badge-inline {
		margin-left: 2px !important;
	}
}
