/**
 * Order-status page CSS — copied for #posh-order-modal so the modal matches exactly.
 * Interior selectors: #posh-order-modal .order-modal-content …
 *
 * Shell (below): centers the card on both legacy [posh_dashboard] and V2. Legacy loads
 * posh-dashboard.css which uses row flex + absolute translate on .order-modal-content; this
 * file’s higher-specificity .order-modal-content resets position to relative, so we must
 * define an explicit column flex overlay here.
 */
#posh-order-modal {
	box-sizing: border-box;
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	padding: 1rem;
	background: rgba(0, 0, 0, 0.5);
	align-items: center;
	justify-content: center;
}

#posh-order-modal.active {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

#posh-order-modal .posh-modal-backdrop,
#posh-order-modal .padv2-modal-backdrop {
	position: absolute;
	inset: 0;
	z-index: 0;
}

#posh-order-modal .order-modal-content {
	position: relative;
	z-index: 1;
	flex-shrink: 0;
	margin-left: auto;
	margin-right: auto;
	font-family: 'Poppins', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	background: #fff;
	border-radius: 14px;
	max-width: 600px;
	width: 100%;
	max-height: 90vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 8px 40px rgba(0,0,0,0.18);
	padding: 0;
}

#posh-order-modal .order-modal-content .posh-order-received {
	max-width: 100%;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	flex: 1;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

#posh-order-modal .order-modal-content .posh-order-success {
	background: linear-gradient(135deg, #E0457B, #EAA26D);
	color: white;
	padding: 2rem;
	padding-top: 2.5rem;
	border-radius: 0;
	text-align: center;
	margin-bottom: 0;
	box-shadow: 0 4px 20px rgba(224, 69, 123, 0.3);
	position: relative;
	flex-shrink: 0;
}

#posh-order-modal .order-modal-content .posh-order-success .order-modal-close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	background: rgba(255,255,255,0.25);
	border: none;
	border-radius: 50%;
	width: 36px;
	height: 36px;
	font-size: 1.25rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	line-height: 1;
}
#posh-order-modal .order-modal-content .posh-order-success .order-modal-close:hover {
	background: rgba(255,255,255,0.4);
}

#posh-order-modal .order-modal-content .posh-order-success h1 {
	font-size: 1.75rem;
	font-weight: 600;
	margin: 0 0 0.5rem 0;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#posh-order-modal .order-modal-content .posh-order-success p {
	font-size: 1rem;
	margin: 0;
	opacity: 0.95;
}

#posh-order-modal .order-modal-content .posh-order-section {
	background: #ffffff;
	padding: 1.5rem;
	border-radius: 12px;
	margin: 0 1rem 1.5rem 1rem;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	border: 1px solid #e0e0e0;
}

#posh-order-modal .order-modal-content .posh-order-section h3 {
	color: #E0457B;
	font-size: 1.4rem;
	font-weight: 600;
	margin: 0 0 1rem 0;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid #f0f0f0;
}

#posh-order-modal .order-modal-content .posh-order-details {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1rem;
	margin-bottom: 1rem;
}

#posh-order-modal .order-modal-content .posh-detail-item {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

#posh-order-modal .order-modal-content .posh-detail-label {
	font-weight: 600;
	color: #666;
	font-size: 0.9rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

#posh-order-modal .order-modal-content .posh-detail-value {
	color: #333;
	font-size: 1rem;
	font-weight: 500;
}

#posh-order-modal .order-modal-content .posh-customer-info {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1.5rem;
	margin-top: 1rem;
}

#posh-order-modal .order-modal-content .posh-address-section h4 {
	color: #E0457B;
	font-size: 1.1rem;
	font-weight: 600;
	margin: 0 0 0.75rem 0;
}

#posh-order-modal .order-modal-content .posh-address-section p {
	margin: 0.25rem 0;
	line-height: 1.5;
}

#posh-order-modal .order-modal-content .posh-order-items {
	margin-top: 1rem;
}

#posh-order-modal .order-modal-content .posh-order-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1rem 0;
	border-bottom: none;
}

#posh-order-modal .order-modal-content .posh-order-item:last-child {
	border-bottom: none;
}

#posh-order-modal .order-modal-content .posh-item-name {
	font-weight: 600;
	color: #333;
	flex: 1;
}

#posh-order-modal .order-modal-content .posh-item-quantity {
	color: #666;
	font-size: 0.9rem;
	margin: 0 1rem;
	min-width: 60px;
	text-align: center;
}

#posh-order-modal .order-modal-content .posh-item-price {
	font-weight: 600;
	color: #E0457B;
	min-width: 80px;
	text-align: right;
}

#posh-order-modal .order-modal-content .posh-order-totals {
	background: #f9f9f9;
	padding: 1.5rem;
	border-radius: 8px;
	margin-top: 1rem;
}

#posh-order-modal .order-modal-content .posh-total-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.5rem 0;
	border-bottom: none;
}

#posh-order-modal .order-modal-content .posh-total-row:last-child,
#posh-order-modal .order-modal-content .posh-total-row-grand {
	border-bottom: none;
	font-size: 1.2rem;
	font-weight: 600;
	color: #E0457B;
	margin-top: 0.5rem;
	padding-top: 1rem;
	border-top: 2px solid #E0457B;
}

#posh-order-modal .order-modal-content .posh-total-label {
	font-weight: 500;
	color: #666;
}

#posh-order-modal .order-modal-content .posh-total-value {
	font-weight: 600;
	color: #333;
}

#posh-order-modal .order-modal-content .posh-total-row-muted .posh-total-label,
#posh-order-modal .order-modal-content .posh-total-row-muted .posh-total-value {
	color: #6b8299;
	font-size: 0.9rem;
}

#posh-order-modal .order-modal-content .posh-payment-method {
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 8px;
	padding: 1rem;
	margin: 0.5rem 0;
}

#posh-order-modal .order-modal-content .posh-payment-method-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 0.5rem;
}

#posh-order-modal .order-modal-content .posh-payment-method-title {
	font-weight: 600;
	color: #E0457B;
	font-size: 1rem;
}

#posh-order-modal .order-modal-content .posh-payment-method-amount {
	font-weight: 600;
	color: #333;
	font-size: 1.1rem;
}

#posh-order-modal .order-modal-content .posh-payment-details {
	font-size: 0.9rem;
	color: #666;
	line-height: 1.4;
}

#posh-order-modal .order-modal-content .posh-payment-confirmation {
	background: #e3f2fd;
	color: #1976d2;
	padding: 0.5rem;
	border-radius: 4px;
	font-family: 'Courier New', monospace;
	font-weight: 600;
	margin-top: 0.5rem;
}

#posh-order-modal .order-modal-content .posh-tracking-info {
	background: #d1ecf1;
	border: 1px solid #bee5eb;
	border-radius: 8px;
	padding: 1rem;
	margin-top: 1rem;
	text-align: center;
}

#posh-order-modal .order-modal-content .posh-tracking-info h4 {
	color: #0c5460;
	font-size: 1rem;
	font-weight: 600;
	margin: 0 0 0.5rem 0;
}

#posh-order-modal .order-modal-content .posh-tracking-number {
	font-family: 'Courier New', monospace;
	font-size: 1.1rem;
	font-weight: 600;
	color: #0c5460;
	background: white;
	padding: 0.5rem 1rem;
	border-radius: 4px;
	display: inline-block;
	margin-top: 0.5rem;
	word-break: break-all;
}

#posh-order-modal .order-modal-content .posh-tracking-provider {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	border-radius: 6px;
	font-weight: 600;
	margin: 0.5rem 0;
	color: white;
}

#posh-order-modal .order-modal-content .posh-provider-usps { background: #004B87; }
#posh-order-modal .order-modal-content .posh-provider-ups { background: #7B2009; }
#posh-order-modal .order-modal-content .posh-provider-fedex { background: #4D148C; }
#posh-order-modal .order-modal-content .posh-provider-dhl { background: #D40511; }
#posh-order-modal .order-modal-content .posh-provider-default { background: #6c757d; }

#posh-order-modal .order-modal-content .posh-tracking-actions {
	display: flex;
	gap: 0.75rem;
	justify-content: center;
	margin-top: 1rem;
	flex-wrap: wrap;
}

#posh-order-modal .order-modal-content .posh-tracking-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	border-radius: 6px;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.2s ease;
	font-size: 0.9rem;
	border: none;
	cursor: pointer;
	font-family: inherit;
}

#posh-order-modal .order-modal-content .posh-tracking-btn-primary {
	background: #0c5460;
	color: white;
}

#posh-order-modal .order-modal-content .posh-tracking-btn-secondary {
	background: white;
	color: #0c5460;
	border: 1px solid #0c5460;
}

#posh-order-modal .order-modal-content .posh-ship-date {
	color: #666;
	font-size: 0.9rem;
	margin-top: 0.5rem;
}

#posh-order-modal .order-modal-content .posh-action-buttons {
	display: flex;
	gap: 1rem;
	justify-content: center;
	margin: 1.5rem 1rem 1rem;
	flex-wrap: wrap;
}

#posh-order-modal .order-modal-content .posh-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.75rem 1.5rem;
	border-radius: 8px;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.2s ease;
	border: none;
	cursor: pointer;
	font-size: 1rem;
	font-family: inherit;
}

#posh-order-modal .order-modal-content .posh-btn-primary {
	background: #E0457B;
	color: white;
}

#posh-order-modal .order-modal-content .posh-btn-secondary {
	background: white;
	color: #E0457B;
	border: 2px solid #E0457B;
}

#posh-order-modal .order-modal-content .status-badge {
	display: inline-block;
	padding: 8px 16px;
	border-radius: 20px;
	font-weight: 600;
	text-transform: uppercase;
	font-size: 14px;
	margin: 10px 0;
}

#posh-order-modal .order-modal-content .status-processing {
	background: #fff3cd;
	color: #856404;
	border: 1px solid #ffeaa7;
}

#posh-order-modal .order-modal-content .status-completed {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

#posh-order-modal .order-modal-content .status-shipped {
	background: #cce5ff;
	color: #004085;
	border: 1px solid #99d6ff;
}

#posh-order-modal .order-modal-content .status-cancelled {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

#posh-order-modal .order-modal-content .status-pending {
	background: #f3f3f3;
	color: #555;
}

@media (max-width: 768px) {
	#posh-order-modal .order-modal-content .posh-order-success h1 {
		font-size: 1.5rem;
	}
	#posh-order-modal .order-modal-content .posh-order-details {
		grid-template-columns: 1fr;
	}
	#posh-order-modal .order-modal-content .posh-order-section {
		margin-left: 0.75rem;
		margin-right: 0.75rem;
	}
}
