/**
 * Checkout page styles.
 *
 * Location: /assets/css/frontend/checkout/checkout-page.css
 *
 * @package SunTechPortal
 */

body.suntech-portal-checkout-page .entry-title,
body.suntech-portal-checkout-page .page-title,
body.suntech-portal-checkout-page .wp-block-post-title {
	display: none !important;
}

.stp-checkout {
	--stp-checkout-primary: #f97316;
	--stp-checkout-primary-dark: #ea580c;
	--stp-checkout-primary-soft: #fff7ed;
	--stp-checkout-success: #16a34a;
	--stp-checkout-success-dark: #15803d;
	--stp-checkout-success-deep: #14532d;
	--stp-checkout-success-soft: #ecfdf5;
	--stp-checkout-success-panel: #f0fdf4;
	--stp-checkout-success-border: #bbf7d0;
	--stp-checkout-heading: #0f172a;
	--stp-checkout-text: #111827;
	--stp-checkout-muted: #64748b;
	--stp-checkout-border: #e5e7eb;
	--stp-checkout-border-strong: #d7dde7;
	--stp-checkout-soft: #f8fafc;
	--stp-checkout-danger: #dc2626;
	--stp-checkout-radius: 16px;

	width: min(1280px, calc(100vw - 32px));
	max-width: none;
	margin: 20px auto 0;
	padding: 0 0 52px;
	color: var(--stp-checkout-text);
	box-sizing: border-box;
}

body.suntech-portal-checkout-thank-you-page .stp-checkout {
	width: min(1120px, calc(100vw - 32px));
	max-width: 1120px;
}

body.suntech-portal-checkout-thank-you-page .stp-checkout-thank-you__layout {
	grid-template-columns: minmax(0, 1fr) 390px;
}

.stp-checkout *,
.stp-checkout *::before,
.stp-checkout *::after {
	box-sizing: border-box;
}

.stp-checkout a {
	box-shadow: none;
}

.stp-checkout__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 20px;
	padding: 18px 20px;
	border: 1px solid var(--stp-checkout-border);
	border-radius: var(--stp-checkout-radius);
	background:
		linear-gradient(135deg, rgba(249, 115, 22, 0.055), rgba(255, 255, 255, 0) 44%),
		#fff;
}

.stp-checkout__header-content {
	min-width: 0;
}

.stp-checkout__eyebrow {
	display: block;
	margin-bottom: 7px;
	color: var(--stp-checkout-primary-dark);
	font-size: 11px;
	font-weight: 850;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: 0.055em;
}

.stp-checkout__title {
	margin: 0;
	color: var(--stp-checkout-heading);
	font-size: clamp(28px, 3.4vw, 40px);
	line-height: 1.05;
	font-weight: 900;
	letter-spacing: -0.035em;
}

.stp-checkout__breadcrumb {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
	color: var(--stp-checkout-muted);
	font-size: 12px;
	font-weight: 700;
}

.stp-checkout__breadcrumb a {
	color: var(--stp-checkout-primary-dark);
	text-decoration: none;
}

.stp-checkout__breadcrumb a:hover,
.stp-checkout__breadcrumb a:focus {
	color: var(--stp-checkout-primary);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.stp-checkout__header-actions {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 9px;
}

.stp-checkout__header-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	min-height: 38px;
	padding: 9px 13px;
	border: 1px solid transparent;
	border-radius: 999px;
	background: transparent;
	color: var(--stp-checkout-heading);
	font-size: 12px;
	font-weight: 900;
	line-height: 1;
	text-decoration: underline;
	text-underline-offset: 4px;
	white-space: nowrap;
	transition: color 0.18s ease;
}

.stp-checkout__header-link:hover,
.stp-checkout__header-link:focus {
	color: var(--stp-checkout-primary-dark);
	text-decoration: underline;
}

.stp-checkout__notices {
	display: grid;
	gap: 10px;
	margin-bottom: 16px;
}

.stp-checkout__notice {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	border: 1px solid var(--stp-checkout-border);
	border-radius: 14px;
	background: #fff;
	font-size: 13px;
	font-weight: 700;
}

.stp-checkout__notice--success {
	border-color: rgba(22, 163, 74, 0.3);
	background: #f0fdf4;
	color: #166534;
}

.stp-checkout__notice--error {
	border-color: rgba(220, 38, 38, 0.26);
	background: #fef2f2;
	color: #991b1b;
}

.stp-checkout__notice .dashicons {
	width: 18px;
	height: 18px;
	font-size: 18px;
	line-height: 1;
}

.stp-checkout__notice-message {
	flex: 1;
}

.stp-checkout__notice-link {
	color: inherit;
	font-weight: 850;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.stp-checkout__form {
	width: 100%;
	margin: 0;
}

.stp-checkout__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 430px;
	align-items: start;
	gap: 22px;
	width: 100%;
}

.stp-checkout__main {
	display: grid;
	gap: 16px;
	min-width: 0;
}

.stp-checkout__sidebar {
	position: sticky;
	top: 20px;
	display: grid;
	gap: 13px;
	min-width: 0;
}

.stp-checkout-card,
.stp-checkout-summary,
.stp-checkout-panel,
.stp-checkout-place-order,
.stp-checkout-trust,
.stp-checkout__empty {
	border: 1px solid var(--stp-checkout-border);
	border-radius: var(--stp-checkout-radius);
	background: #fff;
}

.stp-checkout-card {
	overflow: hidden;
}

.stp-checkout-card__header {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 16px 18px;
	border-bottom: 1px solid var(--stp-checkout-border);
	background: #fff;
}

.stp-checkout-card__step {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 31px;
	width: 31px;
	height: 31px;
	border: 1px solid rgba(249, 115, 22, 0.42);
	border-radius: 50%;
	background: #fff;
	color: var(--stp-checkout-primary-dark);
	font-size: 13px;
	font-weight: 900;
	line-height: 1;
}

.stp-checkout-card__title,
.stp-checkout-summary__title,
.stp-checkout-panel__title {
	margin: 0;
	color: var(--stp-checkout-heading);
	font-size: 17px;
	line-height: 1.22;
	font-weight: 900;
	letter-spacing: -0.02em;
	text-transform: none;
}

.stp-checkout-card__title,
.stp-checkout-panel__title {
	text-transform: uppercase;
}

.stp-checkout-card__text {
	margin: 4px 0 0;
	color: var(--stp-checkout-muted);
	font-size: 12px;
	line-height: 1.45;
}

.stp-checkout-card__body {
	display: grid;
	gap: 13px;
	padding: 18px;
}

.stp-checkout-section-title {
	margin: 0;
	color: var(--stp-checkout-heading);
	font-size: 14px;
	font-weight: 900;
	line-height: 1.3;
}

.stp-checkout-fields {
	display: grid;
	gap: 13px;
}

.stp-checkout-fields--two {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stp-checkout-field {
	display: grid;
	gap: 6px;
	margin: 0;
}

.stp-checkout-field--wide {
	grid-column: 1 / -1;
}

.stp-checkout-field label,
.stp-checkout-coupon label {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--stp-checkout-heading);
	font-size: 12px;
	font-weight: 850;
	line-height: 1.3;
}

.stp-checkout-field label span {
	color: var(--stp-checkout-danger);
}

.stp-checkout-field input,
.stp-checkout-field select,
.stp-checkout-field textarea,
.stp-checkout-coupon input {
	width: 100%;
	max-width: 100%;
	min-height: 42px;
	padding: 10px 12px;
	border: 1px solid var(--stp-checkout-border);
	border-radius: 12px;
	background: #fff;
	color: var(--stp-checkout-text);
	font-size: 13px;
	line-height: 1.45;
	outline: none;
	box-shadow: none;
	transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.stp-checkout-field textarea {
	min-height: 98px;
	resize: vertical;
}

.stp-checkout-field input:focus,
.stp-checkout-field select:focus,
.stp-checkout-field textarea:focus,
.stp-checkout-coupon input:focus {
	border-color: var(--stp-checkout-primary);
	background: #fff;
	box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.08);
}

.stp-checkout-field input::placeholder,
.stp-checkout-field textarea::placeholder,
.stp-checkout-coupon input::placeholder {
	color: #9ca3af;
}

.stp-checkout__checkbox {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	margin: 0;
	color: var(--stp-checkout-muted);
	font-size: 12px;
	line-height: 1.55;
	cursor: pointer;
}

.stp-checkout__checkbox input {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	margin-top: 2px;
	accent-color: var(--stp-checkout-primary);
}

.stp-checkout__checkbox--inline {
	color: var(--stp-checkout-heading);
	font-weight: 800;
}

.stp-checkout__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 46px;
	padding: 12px 18px;
	border: 1px solid transparent;
	border-radius: 14px;
	font-size: 14px;
	font-weight: 900;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.stp-checkout__button--primary {
	background: var(--stp-checkout-primary);
	color: #fff;
}

.stp-checkout__button--primary:hover,
.stp-checkout__button--primary:focus {
	background: var(--stp-checkout-primary-dark);
	color: #fff;
	text-decoration: none;
}

.stp-checkout__button--primary:disabled {
	opacity: 0.72;
	cursor: wait;
}

.stp-checkout-summary,
.stp-checkout-panel,
.stp-checkout-place-order,
.stp-checkout-trust {
	padding: 15px;
}

.stp-checkout-summary {
	display: grid;
	gap: 13px;
}

.stp-checkout-summary__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding-bottom: 13px;
	border-bottom: 1px solid var(--stp-checkout-border);
}

.stp-checkout-summary__header p {
	margin: 4px 0 0;
	color: var(--stp-checkout-muted);
	font-size: 11px;
	line-height: 1.45;
}

.stp-checkout-summary__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	min-height: 28px;
	padding: 6px 10px;
	border: 1px solid var(--stp-checkout-success-border);
	border-radius: 999px;
	background: var(--stp-checkout-success-soft);
	color: var(--stp-checkout-success-dark);
	font-size: 11px;
	font-weight: 900;
	white-space: nowrap;
}

.stp-checkout-summary__table-head,
.stp-checkout-summary__items {
	display: none;
}

.stp-checkout-summary__compact {
	display: grid;
	gap: 9px;
	padding: 11px;
	border: 1px solid var(--stp-checkout-border);
	border-radius: 13px;
	background: var(--stp-checkout-soft);
}

.stp-checkout-summary__compact-row,
.stp-checkout-summary__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	color: var(--stp-checkout-muted);
	font-size: 12px;
	font-weight: 750;
}

.stp-checkout-summary__compact-row strong,
.stp-checkout-summary__row strong {
	color: var(--stp-checkout-heading);
	font-weight: 900;
	text-align: right;
}

.stp-checkout-summary__totals {
	display: grid;
	gap: 10px;
	padding-top: 2px;
}

.stp-checkout-summary__row--total {
	margin-top: 2px;
	padding: 12px;
	border: 1px solid var(--stp-checkout-success-border);
	border-radius: 13px;
	background: var(--stp-checkout-success-soft);
	color: #166534;
	font-size: 14px;
}

.stp-checkout-summary__row--total strong {
	color: var(--stp-checkout-success-deep);
	font-size: 18px;
}

.stp-checkout-coupon {
	display: grid;
	gap: 8px;
	padding-top: 2px;
}

.stp-checkout-coupon__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 8px;
}

.stp-checkout-coupon input {
	min-height: 39px;
	font-size: 12px;
}

.stp-checkout-coupon button {
	min-height: 39px;
	padding: 9px 12px;
	border: 0;
	border-radius: 12px;
	background: #e5e7eb;
	color: #64748b;
	font-size: 12px;
	font-weight: 900;
	cursor: not-allowed;
}

.stp-checkout-panel {
	display: grid;
	gap: 13px;
}

.stp-checkout-panel--delivery,
.stp-checkout-panel--payment {
	padding: 14px;
}

.stp-checkout-delivery,
.stp-checkout-payment-method,
.stp-checkout-payment-methods {
	display: grid;
	gap: 9px;
}

.stp-checkout-delivery__option,
.stp-checkout-payment-method__option {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	padding: 11px;
	border: 1px solid var(--stp-checkout-border);
	border-radius: 14px;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.stp-checkout-delivery__option:hover,
.stp-checkout-delivery__option:focus-within,
.stp-checkout-payment-method__option:hover,
.stp-checkout-payment-method__option:focus-within {
	border-color: var(--stp-checkout-border-strong);
	background: var(--stp-checkout-soft);
}

.stp-checkout-delivery__option.is-selected,
.stp-checkout-payment-method__option.is-selected {
	border-color: var(--stp-checkout-success);
	background: #fff;
	box-shadow: inset 3px 0 0 var(--stp-checkout-success);
}

.stp-checkout-delivery__control,
.stp-checkout-payment-method__control {
	display: inline-flex;
	padding-top: 2px;
}

.stp-checkout-delivery__control input,
.stp-checkout-payment-method__control input {
	width: 15px;
	height: 15px;
	margin: 0;
	accent-color: var(--stp-checkout-success);
}

.stp-checkout-delivery__content,
.stp-checkout-payment-method__content {
	display: grid;
	gap: 3px;
	min-width: 0;
	flex: 1;
}

.stp-checkout-delivery__title,
.stp-checkout-payment-method__title {
	color: var(--stp-checkout-heading);
	font-size: 12px;
	font-weight: 900;
	line-height: 1.35;
}

.stp-checkout-delivery__description,
.stp-checkout-payment-method__description {
	color: var(--stp-checkout-muted);
	font-size: 11px;
	line-height: 1.45;
}

.stp-checkout-delivery__price {
	margin-left: auto;
	color: var(--stp-checkout-success-dark);
	font-size: 11px;
	font-weight: 900;
	white-space: nowrap;
}

.stp-checkout-payment-empty {
	margin: 0;
	padding: 12px;
	border: 1px dashed var(--stp-checkout-border);
	border-radius: 14px;
	background: var(--stp-checkout-soft);
	color: var(--stp-checkout-muted);
	font-size: 12px;
	line-height: 1.5;
}

.stp-checkout-place-order {
	display: grid;
	gap: 13px;
}

.stp-checkout-place-order__privacy {
	margin: 0;
	color: var(--stp-checkout-text);
	font-size: 13px;
	line-height: 1.6;
}

.stp-checkout-place-order__meta {
	padding-top: 1px;
	color: var(--stp-checkout-muted);
	font-size: 11px;
	font-weight: 700;
	text-align: center;
}

.stp-checkout-trust {
	display: grid;
	gap: 11px;
}

.stp-checkout-trust__item {
	display: flex;
	align-items: flex-start;
	gap: 9px;
}

.stp-checkout-trust__item .dashicons {
	flex: 0 0 auto;
	width: 27px;
	height: 27px;
	border-radius: 50%;
	background: var(--stp-checkout-primary-soft);
	color: var(--stp-checkout-primary-dark);
	font-size: 15px;
	line-height: 27px;
	text-align: center;
}

.stp-checkout-trust__item strong {
	display: block;
	margin: 0 0 2px;
	color: var(--stp-checkout-heading);
	font-size: 12px;
	font-weight: 900;
}

.stp-checkout-trust__item p {
	margin: 0;
	color: var(--stp-checkout-muted);
	font-size: 11px;
	line-height: 1.45;
}

.stp-checkout--empty {
	display: flex;
	justify-content: center;
}

.stp-checkout__empty {
	width: min(100%, 560px);
	padding: 34px 24px;
	text-align: center;
}

.stp-checkout__empty-icon {
	width: 46px;
	height: 46px;
	margin-bottom: 12px;
	color: var(--stp-checkout-primary);
	font-size: 46px;
	line-height: 1;
}

.stp-checkout__empty-title {
	margin: 0;
	color: var(--stp-checkout-heading);
	font-size: 28px;
	font-weight: 900;
	line-height: 1.2;
}

.stp-checkout__empty-text {
	margin: 10px auto 20px;
	max-width: 420px;
	color: var(--stp-checkout-muted);
	font-size: 14px;
	line-height: 1.6;
}

@media (max-width: 1240px) {
	.stp-checkout__layout {
		grid-template-columns: minmax(0, 1fr) 410px;
		gap: 18px;
	}
}

@media (max-width: 1080px) {
	.stp-checkout {
		width: min(100%, calc(100vw - 24px));
		margin-top: 18px;
	}

	.stp-checkout__layout {
		grid-template-columns: 1fr;
	}

	.stp-checkout__sidebar {
		position: static;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		align-items: start;
	}

	.stp-checkout-summary,
	.stp-checkout-place-order {
		grid-column: 1 / -1;
	}
}

@media (max-width: 782px) {
	.stp-checkout {
		width: min(100%, calc(100vw - 20px));
		margin-top: 16px;
		padding: 0 0 36px;
	}

	.stp-checkout__header {
		align-items: flex-start;
		flex-direction: column;
		padding: 16px;
	}

	.stp-checkout__header-actions,
	.stp-checkout__header-link {
		width: 100%;
		justify-content: flex-start;
		padding-left: 0;
	}

	.stp-checkout-fields--two,
	.stp-checkout__sidebar {
		grid-template-columns: 1fr;
	}

	.stp-checkout-card__header,
	.stp-checkout-card__body,
	.stp-checkout-summary,
	.stp-checkout-panel,
	.stp-checkout-place-order,
	.stp-checkout-trust {
		padding: 14px;
	}

	.stp-checkout-coupon__row {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 480px) {
	.stp-checkout__title {
		font-size: 28px;
	}

	.stp-checkout-card__header {
		gap: 10px;
	}

	.stp-checkout-card__step {
		width: 29px;
		height: 29px;
		flex-basis: 29px;
		font-size: 12px;
	}

	.stp-checkout-card__title,
	.stp-checkout-summary__title,
	.stp-checkout-panel__title {
		font-size: 16px;
	}
}
.stp-checkout-delivery__empty {
	margin: 0;
	padding: 12px;
	color: var(--stp-checkout-muted);
	background: #fff;
	border: 1px dashed var(--stp-checkout-border);
	border-radius: 14px;
	font-size: 12px;
	line-height: 1.45;
}
