/**
 * Express Checkout — Self-contained Slide-in Panel Styles
 * All styles scoped to .ncc-express-content to avoid affecting site layout.
 * Does NOT depend on checkout.css.
 */

/* ========== Trigger Button ========== */

.ncc-express-trigger {
	display: block;
	width: 100%;
	text-align: center;
	margin-top: 8px;
	padding: 10px 16px;
	background: var(--nl-primary, #468664);
	color: #fff !important;
	border: none;
	border-radius: var(--nl-radius-sm, 8px);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: opacity var(--nl-transition);
}

.ncc-express-trigger:hover {
	opacity: 0.9;
	color: #fff !important;
}

/* ========== Overlay ========== */

.ncc-express-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 9998;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.ncc-express-overlay--active {
	display: block;
	opacity: 1;
}

/* ========== Panel ========== */

.ncc-express-panel {
	position: fixed;
	top: 0;
	right: -450px;
	width: 450px;
	max-width: 100%;
	height: 100vh;
	background: var(--nl-bg, #f8f6f3);
	z-index: 9999;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	transition: right 0.3s ease;
	box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
}

.ncc-express-panel--active {
	right: 0;
}

.ncc-express-close {
	position: absolute;
	top: 40px;
	right: 24px;
	width: 36px;
	height: 36px;
	border: none;
	background: var(--nl-surface, #fff);
	border-radius: 50%;
	font-size: 20px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1;
	transition: background var(--nl-transition);
}

.ncc-express-close:hover {
	background: var(--nl-primary-light, #deece4);
}

/* ========== Content Wrapper ========== */

.ncc-express-content {
	padding: 0 24px 80px;
	font-family: var(--nl-font-family, inherit);
	font-size: var(--nl-font-size-base, 14px);
	color: var(--nl-text, #333);
}

.ncc-express-header {
	padding: 40px 0 20px;
	padding-right: 30px;
	margin-bottom: 20px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.ncc-express-header h2 {
	font-size: 20px;
	font-weight: 600;
	margin: 0 0 4px;
}

.ncc-express-subtitle {
	font-size: 13px;
	color: var(--nl-text-muted, #888);
	margin: 0;
}

/* ========== Cart Summary ========== */

.ncc-express-cart-summary {
	background: var(--nl-surface, #fff);
	border: 1px solid #e0e0e0;
	border-radius: var(--nl-radius-sm, 8px);
	padding: 12px 16px;
	margin-bottom: 20px;
}

.ncc-express-cart-item {
	display: flex;
	gap: 10px;
	align-items: center;
	font-size: 13px;
	padding: 6px 0;
	border-bottom: 1px solid #f0f0f0;
}

.ncc-express-cart-item:last-child {
	border-bottom: none;
}

.ncc-express-cart-image {
	width: 48px;
	height: 48px;
	flex-shrink: 0;
	border-radius: 6px;
	overflow: hidden;
}

.ncc-express-cart-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
}

.ncc-express-cart-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ncc-express-cart-name {
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ncc-express-cart-qty {
	color: var(--nl-text-muted, #888);
	font-size: 12px;
}

.ncc-express-cart-price {
	font-weight: 500;
}

.ncc-express-cart-line-total {
	display: flex;
	gap: 8px;
	font-size: 12px;
	color: var(--nl-text-muted, #888);
	padding: 0 0 3px;
}

.ncc-express-cart-line-price {
	font-weight: 500;
}

/* Totals breakdown */

.ncc-express-totals {
	border-top: 1px solid #eee;
	margin-top: 8px;
	padding-top: 8px;
}

.ncc-express-totals-row {
	display: flex;
	justify-content: space-between;
	font-size: 13px;
	padding: 3px 0;
}

.ncc-express-totals-row--discount span:last-child,
.ncc-express-totals-row--fee-discount span:last-child {
	color: #e2401c;
}

.ncc-express-totals-row--total {
	font-size: 16px;
	font-weight: 700;
	padding-top: 8px;
	margin-top: 6px;
	border-top: 2px solid #eee;
}

.ncc-express-total-value {
	color: var(--nl-primary, #468664);
}

.ncc-express-base-price {
	font-size: 11px;
	color: var(--nl-text-muted, #888);
	text-align: right;
	padding: 0 0 6px 0;
	line-height: 1.4;
}

/* ========== SCOPED Accordion (inside .ncc-express-content only) ========== */

.ncc-express-content .ncc-step {
	background: var(--nl-surface, #fff);
	border: 2px solid #e0e0e0;
	border-radius: var(--nl-radius, 14px);
	margin-bottom: 8px;
	overflow: hidden;
	transition: border-color var(--nl-transition), box-shadow var(--nl-transition), opacity var(--nl-transition);
}

.ncc-express-content .ncc-step--active {
	border-color: var(--nl-primary, #468664);
	box-shadow: 0 2px 12px rgba(107, 124, 94, 0.12);
}

.ncc-express-content .ncc-step--completed {
	border-color: var(--nl-primary-light, #deece4);
	opacity: 0.85;
}

.ncc-express-content .ncc-step--completed:hover {
	opacity: 1;
}

.ncc-express-content .ncc-step--pending {
	opacity: 0.5;
	pointer-events: none;
}

.ncc-express-content .ncc-step--pending.ncc-step--unlocked {
	opacity: 0.7;
	pointer-events: auto;
}

/* Step Header */

.ncc-express-content .ncc-step-header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	cursor: pointer;
	user-select: none;
}

.ncc-express-content .ncc-step--active .ncc-step-header {
	cursor: default;
}

.ncc-express-content .ncc-step-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--nl-primary, #468664);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	flex-shrink: 0;
}

.ncc-express-content .ncc-step--pending .ncc-step-number {
	background: #ccc;
}

.ncc-express-content .ncc-step-title {
	font-size: 15px;
	font-weight: 600;
	color: var(--nl-primary, #468664);
}

.ncc-express-content .ncc-step--pending .ncc-step-title {
	color: var(--nl-text-muted, #888);
}

.ncc-express-content .ncc-step-summary {
	margin-left: auto;
	font-size: 12px;
	color: var(--nl-primary, #468664);
	background: var(--nl-primary-light, #deece4);
	padding: 4px 12px;
	border-radius: 20px;
	display: none;
}

.ncc-express-content .ncc-step--completed .ncc-step-summary {
	display: inline-block;
}

/* Step Body */

.ncc-express-content .ncc-step-body {
	padding: 0 14px 14px;
}

/* ========== SCOPED Form Fields ========== */

.ncc-express-content .ncc-fields {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ncc-express-content .ncc-field-row {
	display: flex;
	gap: 12px;
}

.ncc-express-content .ncc-field-row--2col .ncc-field {
	flex: 1;
}

.ncc-express-content .ncc-field-row--3col {
	display: grid;
	grid-template-columns: 1fr 2fr;
	gap: 12px;
}

.ncc-express-content .ncc-field {
	margin: 0;
}

.ncc-express-content .ncc-field label {
	display: block;
	font-size: 12px;
	color: #666;
	margin-bottom: 4px;
	font-weight: 500;
}

.ncc-express-content .ncc-field .required {
	color: #e2401c;
}

.ncc-express-content .ncc-input {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid #ddd;
	border-radius: var(--nl-radius-sm, 8px);
	background: var(--nl-bg, #f8f6f3);
	font-size: 14px;
	color: var(--nl-text, #333);
	font-family: inherit;
	transition: border-color var(--nl-transition), box-shadow var(--nl-transition);
	box-sizing: border-box;
}

.ncc-express-content .ncc-input:focus {
	outline: none;
	border-color: var(--nl-primary, #468664);
	box-shadow: 0 0 0 3px rgba(107, 124, 94, 0.15);
}

.ncc-express-content .ncc-input::placeholder {
	color: #aaa;
}

.ncc-express-content select.ncc-input {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 32px;
}

/* ========== SCOPED Payment Cards — compact ========== */

.ncc-express-content .ncc-payment-methods {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ncc-express-content .ncc-payment-card {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	cursor: pointer;
}

.ncc-express-content .ncc-payment-radio {
	display: none;
}

.ncc-express-content .ncc-payment-radio-indicator {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: 2px solid #ccc;
	flex-shrink: 0;
	position: relative;
	transition: all var(--nl-transition);
	margin-top: 10px;
}

.ncc-express-content .ncc-payment-card--selected .ncc-payment-radio-indicator {
	border-color: var(--nl-primary, #468664);
}

.ncc-express-content .ncc-payment-card--selected .ncc-payment-radio-indicator::after {
	content: '';
	position: absolute;
	top: 3px;
	left: 3px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--nl-primary, #468664);
}

.ncc-express-content .ncc-payment-card-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex: 1;
	padding: 10px 14px;
	border: 2px solid #e0e0e0;
	border-radius: var(--nl-radius-sm, 8px);
	background: var(--nl-bg, #f8f6f3);
	transition: all var(--nl-transition);
}

.ncc-express-content .ncc-payment-card--selected .ncc-payment-card-inner,
.ncc-express-content .ncc-payment-card:hover .ncc-payment-card-inner {
	border-color: var(--nl-primary, #468664);
	background: var(--nl-primary-light, #deece4);
}

.ncc-express-content .ncc-payment-card--selected .ncc-payment-card-inner {
	box-shadow: 0 0 0 1px var(--nl-primary, #468664);
}

.ncc-express-content .ncc-payment-title {
	font-weight: 600;
	font-size: 14px;
}

.ncc-express-content .ncc-payment-desc {
	display: none;
}

.ncc-express-content .ncc-payment-icon img {
	max-height: 20px;
}

/* ========== SCOPED Buttons ========== */

.ncc-express-content .ncc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 24px;
	border: 2px solid var(--nl-primary, #468664);
	border-radius: var(--nl-radius-sm, 8px);
	background: var(--nl-primary, #468664);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: all var(--nl-transition);
	text-decoration: none;
}

.ncc-express-content .ncc-btn:hover {
	opacity: 0.9;
}

.ncc-express-content .ncc-btn--back {
	background: transparent;
	color: var(--nl-primary, #468664);
	border-color: transparent;
	font-size: 13px;
	font-weight: 400;
	padding: 8px 12px;
}

.ncc-express-content .ncc-btn--back:hover {
	text-decoration: underline;
}

.ncc-express-content .ncc-btn--next {
	width: 100%;
	padding: 14px 24px;
	font-size: 15px;
}

.ncc-express-content .ncc-btn--submit {
	width: 100%;
	padding: 16px 32px;
	font-size: 16px;
	background: var(--nl-primary, #468664);
	border-color: var(--nl-primary, #468664);
	position: relative;
}

/* Loading state */
.ncc-express-content .ncc-btn--submit.is-loading {
	pointer-events: none;
	opacity: 0.85;
}

.ncc-express-content .ncc-btn--submit.is-loading .ncc-btn-label {
	display: none;
}

.ncc-btn-spinner {
	display: none;
	width: 22px;
	height: 22px;
	border: 2.5px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: ncc-spin 0.6s linear infinite;
}

.ncc-express-content .ncc-btn--submit.is-loading .ncc-btn-spinner {
	display: inline-block;
}

@keyframes ncc-spin {
	to { transform: rotate(360deg); }
}

.ncc-express-content .ncc-step-actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 16px;
}

/* ========== Legal Checkbox ========== */

.ncc-express-legal {
	margin: 0 0 16px;
}

.ncc-express-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	cursor: pointer;
	font-size: 13px;
	line-height: 1.6;
	color: var(--nl-text, #333);
}

.ncc-express-checkbox input[type="checkbox"] {
	width: 18px;
	height: 18px;
	accent-color: var(--nl-primary, #468664);
	flex-shrink: 0;
	margin-top: 2px;
	cursor: pointer;
}

.ncc-express-checkbox-text {
	flex: 1;
}

.ncc-express-checkbox-text a {
	color: var(--nl-primary, #468664);
	text-decoration: underline;
}

.ncc-express-checkbox-text a:hover {
	color: var(--nl-primary, #468664);
	text-decoration: none;
}

/* ========== SCOPED Errors ========== */

.ncc-express-content .ncc-error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #e2401c;
	padding: 8px 12px;
	border-radius: var(--nl-radius-sm, 8px);
	font-size: 13px;
	margin-bottom: 12px;
}

/* ========== Submit area ========== */

.ncc-express-submit {
	margin-top: 20px;
}

.ncc-express-submit .ncc-btn--submit {
	width: 100%;
	display: flex;
}

.ncc-express-submit .ncc-express-legal {
	margin: 0 0 14px;
}

/* ========== SCOPED Coupon ========== */

.ncc-express-content .ncc-express-coupon {
	margin-bottom: 12px;
}

.ncc-express-content .ncc-coupon-input-wrap {
	display: flex;
	gap: 6px;
	align-items: stretch;
}

.ncc-express-content .ncc-coupon-input-wrap .ncc-input {
	flex: 1;
	padding: 4px 10px;
	font-size: 12px;
}

.ncc-express-content .ncc-btn--coupon {
	padding: 4px 14px;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	min-height: 26px;
	border-radius: var(--nl-radius-sm, 8px);
}

.ncc-express-content .ncc-coupon-message {
	margin-top: 6px;
	font-size: 12px;
	line-height: 1.4;
}

.ncc-express-content .ncc-coupon-message--success {
	color: var(--nl-primary, #468664);
}

.ncc-express-content .ncc-coupon-message--error {
	color: #e2401c;
}

/* Coupon pill in totals */
.ncc-express-content .ncc-express-totals-row--coupon {
	font-size: 13px;
	align-items: center;
}

.ncc-express-content .ncc-coupon-label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}

.ncc-express-content .ncc-coupon-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--nl-primary-light, #deece4);
	color: var(--nl-primary, #468664);
	padding: 4px 10px 4px 12px;
	border-radius: 20px;
	font-size: 12px;
}

.ncc-express-content .ncc-coupon-pill strong {
	font-weight: 600;
	letter-spacing: 0.3px;
}

.ncc-express-content .ncc-coupon-remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border: none;
	background: rgba(70, 134, 100, 0.2);
	color: var(--nl-primary, #468664);
	border-radius: 50%;
	font-size: 13px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	transition: background 0.15s;
}

.ncc-express-content .ncc-coupon-remove:hover {
	background: rgba(70, 134, 100, 0.35);
}

.ncc-express-content .ncc-sidebar-coupon-amount {
	color: #e2401c;
	font-weight: 600;
}

/* ========== Mobile ========== */

@media (max-width: 480px) {
	.ncc-express-panel {
		width: 100%;
	}

	.ncc-express-content .ncc-field-row {
		flex-direction: column;
		gap: 12px;
	}

	.ncc-express-content .ncc-field-row--3col {
		display: flex;
		flex-direction: column;
		gap: 12px;
	}

	.ncc-express-content .ncc-step-actions {
		flex-direction: column-reverse;
		gap: 8px;
	}
}
