/* ==========================================================================
   Ping Advanced Messages — Frontend Styles (v1.1.0)
   Covers: inline, toast, banner, modal display types.
   ========================================================================== */

/* =========================================================================
   1. BASE MESSAGE COMPONENT
   ========================================================================= */

.pam-message {
	position: relative;
	padding: .8em 1.2em;
	border-radius: 6px;
	line-height: 1.55;
	font-size: 14px;
	box-sizing: border-box;
}

.pam-message .pam-icon {
	margin-right: .45em;
	font-style: normal;
	flex-shrink: 0;
}

.pam-message .pam-message-body {
	display: inline;
}

.pam-message .pam-message-body p:last-child {
	margin-bottom: 0;
}

/* Dismiss button — shared across all types */
.pam-message .pam-dismiss {
	background: transparent;
	border: none;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
	padding: 0 2px;
	color: inherit;
	opacity: .55;
	position: absolute;
	top: .55em;
	right: .75em;
}

.pam-message .pam-dismiss:hover {
	opacity: 1;
}

.pam-message.pam-is-dismissible {
	padding-right: 2.6em;
}

/* =========================================================================
   2. MESSAGE TYPES (colour coding)
   ========================================================================= */

.pam-message.pam-type-info {
	background-color: #dbeafe;
	border-left: 4px solid #3b82f6;
	color: #1e3a5f;
}

.pam-message.pam-type-success {
	background-color: #d1fae5;
	border-left: 4px solid #10b981;
	color: #064e3b;
}

.pam-message.pam-type-warning {
	background-color: #fef3c7;
	border-left: 4px solid #f59e0b;
	color: #78350f;
}

.pam-message.pam-type-error {
	background-color: #fee2e2;
	border-left: 4px solid #ef4444;
	color: #7f1d1d;
}

.pam-message.pam-type-custom {
	background-color: #f3e8ff;
	border-left: 4px solid #8b5cf6;
	color: #3b0764;
}

/* =========================================================================
   3. INLINE (default)
   ========================================================================= */

.pam-message + .pam-message {
	margin-top: .75em;
}

/* =========================================================================
   4. TOAST
   ========================================================================= */

#pam-toast-container {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 99990;
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-width: 380px;
	width: calc(100vw - 48px);
	pointer-events: none;
}

.pam-message.pam-toast {
	pointer-events: all;
	box-shadow: 0 4px 18px rgba(0,0,0,.18);
	border-radius: 8px;
	padding: .85em 2.8em .85em 1.2em;
	display: flex;
	align-items: flex-start;
	gap: .5em;
	border-left-width: 5px;
	opacity: 0;
}

.pam-message.pam-toast .pam-dismiss {
	top: 50%;
	transform: translateY(-50%);
	right: .8em;
}

/* =========================================================================
   5. BANNER
   ========================================================================= */

#pam-banner-wrap {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 99991;
	display: flex;
	flex-direction: column;
}

.pam-message.pam-banner {
	border-radius: 0;
	border-left: none;
	border-bottom: 3px solid transparent;
	padding: .75em 3em .75em 1.2em;
	text-align: center;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .5em;
	box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

/* Type-specific bottom border for banner */
.pam-message.pam-banner.pam-type-info    { border-bottom-color: #3b82f6; }
.pam-message.pam-banner.pam-type-success { border-bottom-color: #10b981; }
.pam-message.pam-banner.pam-type-warning { border-bottom-color: #f59e0b; }
.pam-message.pam-banner.pam-type-error   { border-bottom-color: #ef4444; }
.pam-message.pam-banner.pam-type-custom  { border-bottom-color: #8b5cf6; }

.pam-message.pam-banner .pam-dismiss {
	top: 50%;
	transform: translateY(-50%);
	right: 1em;
}

/* =========================================================================
   6. MODAL
   ========================================================================= */

.pam-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.5);
	z-index: 99992;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5em;
	opacity: 0;
	transition: opacity .28s ease;
}

.pam-modal-overlay.pam-modal-visible {
	opacity: 1;
}

.pam-modal-overlay.pam-modal-visible .pam-modal-dialog {
	transform: translateY(0);
	opacity: 1;
}

.pam-modal-dialog {
	position: relative;
	background: #fff;
	border-radius: 10px;
	padding: 2em 2.2em 1.8em;
	max-width: 520px;
	width: 100%;
	box-shadow: 0 20px 50px rgba(0,0,0,.22);
	border-left: none;
	transform: translateY(-18px);
	opacity: 0;
	transition: transform .28s ease, opacity .28s ease;
	font-size: 15px;
	line-height: 1.6;
}

/* Override background for modal: keep accent as top bar */
.pam-modal-dialog.pam-type-info    { border-top: 5px solid #3b82f6; }
.pam-modal-dialog.pam-type-success { border-top: 5px solid #10b981; }
.pam-modal-dialog.pam-type-warning { border-top: 5px solid #f59e0b; }
.pam-modal-dialog.pam-type-error   { border-top: 5px solid #ef4444; }
.pam-modal-dialog.pam-type-custom  { border-top: 5px solid #8b5cf6; }

.pam-modal-dialog .pam-dismiss {
	position: absolute;
	top: .85em;
	right: 1em;
	font-size: 22px;
	opacity: .45;
	color: #333;
}

.pam-modal-dialog .pam-dismiss:hover {
	opacity: .85;
}

.pam-modal-dialog .pam-icon {
	font-size: 1.4em;
	vertical-align: middle;
	margin-right: .35em;
}

/* Prevent body scrolling while modal is open */
body.pam-modal-open {
	overflow: hidden;
}

/* =========================================================================
   7. NOSCRIPT FALLBACK
   ========================================================================= */

.pam-noscript-wrap {
	padding: 1em;
}

.pam-noscript-wrap .pam-message {
	margin-bottom: .75em;
}

/* =========================================================================
   8. RESPONSIVE
   ========================================================================= */

@media (max-width: 600px) {
	#pam-toast-container {
		bottom: 12px;
		right: 12px;
		left: 12px;
		width: auto;
		max-width: none;
	}

	.pam-modal-dialog {
		padding: 1.5em 1.2em;
	}

	.pam-message.pam-banner {
		font-size: 13px;
		padding: .65em 2.8em .65em .9em;
		text-align: left;
		justify-content: flex-start;
	}
}

/* ============================================================================
   PAM v1.2.0 — Checkout: Pickup / Delivery selector
   ============================================================================ */
.pam-fulfillment-wrap {
	margin: 0 0 24px;
	padding: 20px;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	background: #fafafa;
}
.pam-fulfillment-legend {
	font-weight: 700;
	font-size: 15px;
	margin-bottom: 14px;
	color: #222;
	display: block;
}
.pam-fulfillment-legend .required { color: #c00; margin-left: 3px; }
.pam-fulfillment-wrap fieldset { border: none; margin: 0; padding: 0; }
.pam-fulfillment-wrap fieldset > .pam-fulfillment-option {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-right: 16px;
	padding: 12px 20px;
	border: 2px solid #ddd;
	border-radius: 8px;
	cursor: pointer;
	background: #fff;
	transition: border-color .2s, background .2s;
	font-size: 15px;
	font-weight: 600;
}
.pam-fulfillment-option:hover { border-color: #0A3161; }
.pam-fulfillment-option.pam-selected,
.pam-fulfillment-option input:checked ~ * { color: #0A3161; }
.pam-fulfillment-option input[type="radio"] { display: none; }
.pam-fulfillment-option:has(input:checked) {
	border-color: #0A3161;
	background: #eef2fa;
}
.pam-fulfillment-icon { font-size: 22px; }
@media (max-width: 480px) {
	.pam-fulfillment-option { display: flex; width: 100%; margin: 6px 0; box-sizing: border-box; }
}

/* ============================================================================
   PAM v1.2.0 — Checkout: Future scheduling
   ============================================================================ */
.pam-scheduling-wrap {
	margin: 0 0 24px;
	padding: 20px;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	background: #fafafa;
}
.pam-scheduling-legend {
	font-weight: 700;
	font-size: 15px;
	margin-bottom: 14px;
	color: #222;
	display: block;
}
.pam-scheduling-legend .required { color: #c00; margin-left: 3px; }
.pam-scheduling-wrap fieldset { border: none; margin: 0; padding: 0; }
.pam-scheduling-row {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 12px;
}
.pam-scheduling-row label { font-weight: 600; min-width: 60px; font-size: 14px; }
.pam-date-select,
.pam-time-select {
	min-width: 200px;
	font-size: 14px;
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
}
@media (max-width: 480px) {
	.pam-scheduling-row { flex-direction: column; align-items: flex-start; }
	.pam-date-select, .pam-time-select { width: 100%; }
}
