/* ==========================================================================
   Arctica Store Pickup — Checkout Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   Store Pickup shipping option — "Free" label pushed to the right
   -------------------------------------------------------------------------- */

label[for*="arctica_store_pickup"] {
	display: flex !important;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	gap: 8px;
}

/* --------------------------------------------------------------------------
   Store Pickup option — active state: promote card styling from label to <li>
   so the pickup prompt sits inside the same box.
   -------------------------------------------------------------------------- */

li.asp-pickup-active {
	border: 1px solid #295CAD;
	background-color: #E1EFF6;
	border-radius: 12px;
	padding: 20px 12px;
	flex-wrap: wrap !important; /* ensure prompt wraps to new line in flex themes */
}

/* Strip the label's own card — the <li> IS the card now */
li.asp-pickup-active label {
	border: none !important;
	padding: 0 !important;
	background: none !important;
	border-radius: 0 !important;
}

/* Prompt injected inside the Store Pickup <li> — always on its own line */
.asp-pickup-prompt {
	display: block;
	width: 100%;
	flex-basis: 100%;  /* new line in flex parents */
	clear: both;       /* new line in float-based layouts */
	margin: 12px 0 0;
	box-sizing: border-box;
}

.asp-open-modal-btn {
	display: inline-flex;
	align-items: flex-start;
	flex-direction: column;
	gap: 2px;
	padding: 6px 12px;
	background: #1a1a1a;
	color: #fff;
	border: none;
	border-radius: 12px;
	font-size: 0.85em;
	cursor: pointer;
	line-height: 1.4;
	transition: background 0.15s;
	text-align: left;
}

.asp-open-modal-btn:hover {
	background: #333;
}

.asp-open-modal-btn.asp-has-selection {
	width: 100%;
	background: #fff;
	color: #1a1a1a;
	border: 1px solid #ccc;
	padding: 7px 11px;
}

.asp-open-modal-btn.asp-has-selection:hover {
	border-color: #1a1a1a;
}

.asp-prompt-text {
	width: 100%;
}

/* Header row: store name left, "Change location" right */
.asp-prompt-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
}

/* Address shown below the store name */
.asp-prompt-address {
	display: block;
	font-size: 0.82em;
	color: #555;
	font-weight: normal;
	margin-top: 2px;
	line-height: 1.4;
}

/* Meta line (country · pickup date) */
.asp-prompt-meta {
	display: block;
	font-size: 0.82em;
	color: #666;
	font-weight: normal;
	margin-top: 2px;
}

.asp-prompt-change {
	font-size: 0.82em;
	font-weight: normal;
	opacity: 0.7;
	text-decoration: underline;
	white-space: nowrap;
	margin-left: 12px;
}

.asp-prompt-error {
	margin: 6px 0 0 !important;
	color: #c00;
	font-size: 0.85em;
}

/* --------------------------------------------------------------------------
   Modal overlay
   -------------------------------------------------------------------------- */

body.asp-modal-open {
	overflow: hidden;
}

.asp-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
}

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

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

/* --------------------------------------------------------------------------
   Modal dialog box
   -------------------------------------------------------------------------- */

.asp-modal__dialog {
	position: relative;
	z-index: 1;
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
	width: 90%;
	max-width: 480px;
	max-height: 80vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.asp-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px 14px;
	border-bottom: 1px solid #e5e5e5;
	flex-shrink: 0;
}

.asp-modal__title {
	margin: 0;
	font-size: 1em;
	font-weight: 600;
	color: #1a1a1a;
}

.asp-modal__close {
	background: none;
	border: none;
	font-size: 1.1em;
	color: #888;
	cursor: pointer;
	padding: 4px 6px;
	line-height: 1;
	border-radius: 20px;
}

.asp-modal__close:hover {
	color: #1a1a1a;
	background: #f0f0f0;
}

/* Country filter */
.asp-modal__search {
	padding: 12px 20px;
	border-bottom: 1px solid #e5e5e5;
	flex-shrink: 0;
}

.asp-modal__country-select {
	width: 100%;
	box-sizing: border-box;
	padding: 8px 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 0.9em;
	background: #fff;
	cursor: pointer;
	outline: none;
}

.asp-modal__country-select:focus {
	border-color: #1a1a1a;
	box-shadow: 0 0 0 2px rgba(26, 26, 26, 0.1);
}

/* Scrollable location list */
.asp-modal__body {
	overflow-y: auto;
	flex: 1;
	padding: 6px 0;
}

.asp-modal__list {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.asp-modal__item {
	margin: 0 !important;
	padding: 0 !important;
}

.asp-modal__location-btn {
	display: block;
	width: 100%;
	text-align: left;
	padding: 14px 20px;
	background: none;
	border: none;
	border-radius: 0;
	cursor: pointer;
	border-bottom: 1px solid #f0f0f0;
	transition: background 0.1s;
	box-shadow: none;
}

.asp-modal__item:last-child .asp-modal__location-btn {
	border-bottom: none;
}

.asp-modal__location-btn:hover,
.asp-modal__location-btn:focus {
	background: #f7f7f7;
	border-radius: 0;
	outline: none;
	box-shadow: none;
}

.asp-modal__item--selected .asp-modal__location-btn {
	background: #f0f7f0;
	border-radius: 0;
}

.asp-modal__item--selected .asp-modal__location-btn:hover {
	background: #e8f3e8;
	border-radius: 0;
}

.asp-modal__location-name {
	display: block;
	font-weight: 600;
	font-size: 0.95em;
	color: #1a1a1a;
	margin-bottom: 2px;
}

.asp-modal__location-address {
	display: block;
	font-size: 0.82em;
	color: #666;
	margin-bottom: 4px;
	line-height: 1.4;
}

.asp-modal__location-date {
	display: inline-block;
	font-size: 0.8em;
	color: #fff;
	background: #1a1a1a;
	padding: 2px 7px;
	border-radius: 20px;
}

.asp-modal__no-results {
	padding: 20px;
	text-align: center;
	color: #888;
	font-size: 0.9em;
}

/* --------------------------------------------------------------------------
   Frontend — Store Pickup notice (view-order + thank-you)
   Mirrors the selected-location card from the checkout selector.
   -------------------------------------------------------------------------- */

.asp-pickup-notice {
	display: flex;
	flex-direction: column;
	gap: 2px;
	width: 100%;
	background: #fff;
	color: #1a1a1a;
	border: 1px solid #ccc;
	border-radius: 12px;
	padding: 7px 11px;
	font-size: 0.85em;
	line-height: 1.4;
	box-sizing: border-box;
	margin-bottom: 20px;
}

.asp-pickup-notice__label {
	display: block;
	font-size: 0.78em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #888;
	margin-bottom: 2px;
}

.asp-pickup-notice__address {
	display: block;
	font-size: 0.82em;
	color: #555;
	font-weight: normal;
	line-height: 1.4;
}

.asp-pickup-notice__meta {
	display: block;
	font-size: 0.82em;
	color: #666;
	font-weight: normal;
	margin-top: 2px;
}

.asp-pickup-notice__note {
	display: block;
	font-size: 0.78em;
	color: #888;
	font-style: italic;
	margin-top: 6px;
}

/* ==========================================================================
   Admin — Wave Status Badges (CPT list and meta box)
   ========================================================================== */

.asp-status {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 3px;
	font-size: 0.8em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.asp-status--draft               { background: #f0f0f0; color: #777; }
.asp-status--upcoming            { background: #e8f4fd; color: #0073aa; }
.asp-status--accepting_orders    { background: #d4edda; color: #155724; }
.asp-status--closed              { background: #fff3cd; color: #856404; }
.asp-status--available_for_pickup{ background: #cce5ff; color: #004085; }

.asp-milestone-info {
	margin: 4px 0;
	font-size: 0.9em;
	color: #555;
}

/* ==========================================================================
   Product Page — Store Pickup availability message
   ========================================================================== */

.asp-product-pickup {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 12px 0 0;
	font-size: 0.82em;
	color: #555;
}

.asp-product-pickup__icon {
	display: inline-flex;
	flex-shrink: 0;
}

.asp-product-pickup__text {
	font-weight: 500;
}

.asp-product-pickup__sep {
	color: #aaa;
}

.asp-product-pickup__details {
	display: inline;
	background: none;
	border: none;
	padding: 0;
	font-size: 1em;
	color: #555;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.asp-product-pickup__details:hover,
.asp-product-pickup__details:focus {
	color: #1a1a1a;
	background: none;
	border: none;
	outline: none;
	box-shadow: none;
}

/* Subtitle below modal title */
.asp-modal__subtitle {
	display: block;
	font-size: 0.75em;
	font-weight: normal;
	color: #888;
	margin-top: 2px;
}

/* Read-only location info block (product page modal) */
.asp-modal__location-info {
	display: block;
	padding: 14px 20px;
	border-bottom: 1px solid #f0f0f0;
}

.asp-modal__item:last-child .asp-modal__location-info {
	border-bottom: none;
}
