.cpc-contracts {
	--cpc-border: #ddd8cc;
	--cpc-text: #181715;
	--cpc-muted: #68645d;
	--cpc-surface: #fffdf8;
	--cpc-soft: #f7f3ea;
	--cpc-accent: #f4bf23;
	--cpc-danger: #8b2b2b;
	color: var(--cpc-text);
}

.cpc-contracts__intro {
	margin: 0 0 24px;
	padding: 24px;
	border: 1px solid var(--cpc-border);
	border-radius: 18px;
	background: linear-gradient(135deg, #fffdf8 0%, #f7f1df 100%);
}

.cpc-contracts__eyebrow {
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.cpc-contracts__intro h2,
.cpc-contract-card h3,
.cpc-contracts__empty h3 {
	margin-top: 0;
	color: var(--cpc-text);
}

.cpc-contracts__intro h2 {
	margin-bottom: 10px;
	font-size: clamp(26px, 4vw, 38px);
}

.cpc-contracts__intro p:last-child,
.cpc-contracts__empty p:last-child,
.cpc-contract-card__action p:last-child {
	margin-bottom: 0;
}

.cpc-contracts__grid {
	display: grid;
	gap: 18px;
}

.cpc-contract-card,
.cpc-contracts__empty {
	padding: 22px;
	border: 1px solid var(--cpc-border);
	border-radius: 18px;
	background: var(--cpc-surface);
	box-shadow: 0 10px 30px rgba(25, 20, 10, .05);
}

.cpc-contract-card__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 18px;
}

.cpc-contract-card__head h3 {
	margin-bottom: 0;
	font-size: 20px;
	line-height: 1.45;
}

.cpc-contract-card__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	margin-bottom: 8px;
}

.cpc-contract-badge {
	display: inline-flex;
	align-items: center;
	min-height: 26px;
	padding: 4px 9px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
}

.cpc-contract-badge--status {
	background: #e8f5e9;
	color: #255d2b;
}

.cpc-contract-badge--sandbox {
	background: #e9eefc;
	color: #34518c;
}

.cpc-contract-badge--cancel {
	background: #f9e5e3;
	color: #7b2c26;
}

.cpc-contract-card__order {
	flex: 0 0 auto;
	font-size: 13px;
	font-weight: 700;
}

.cpc-contract-card__facts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1px;
	margin: 0;
	overflow: hidden;
	border: 1px solid var(--cpc-border);
	border-radius: 14px;
	background: var(--cpc-border);
}

.cpc-contract-card__facts > div {
	padding: 14px;
	background: var(--cpc-soft);
}

.cpc-contract-card__facts dt {
	margin-bottom: 5px;
	color: var(--cpc-muted);
	font-size: 12px;
	font-weight: 700;
}

.cpc-contract-card__facts dd {
	margin: 0;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.6;
}

.cpc-contract-card__action {
	margin-top: 18px;
	padding-top: 18px;
	border-top: 1px solid var(--cpc-border);
}

.cpc-contract-card__action p {
	margin-top: 0;
	color: var(--cpc-muted);
	font-size: 13px;
	line-height: 1.75;
}

.cpc-contract-action-form {
	margin: 0;
}

.cpc-contract-action-button {
	min-height: 44px;
	padding: 10px 16px !important;
	border-radius: 10px !important;
	font-weight: 700 !important;
}

.cpc-contract-action-button--danger {
	border-color: var(--cpc-danger) !important;
	background: transparent !important;
	color: var(--cpc-danger) !important;
}

.cpc-contract-action-button--danger:hover,
.cpc-contract-action-button--danger:focus {
	background: var(--cpc-danger) !important;
	color: #fff !important;
}

@media (max-width: 680px) {
	.cpc-contracts__intro,
	.cpc-contract-card,
	.cpc-contracts__empty {
		padding: 18px;
		border-radius: 14px;
	}

	.cpc-contract-card__head {
		flex-direction: column;
	}

	.cpc-contract-card__facts {
		grid-template-columns: 1fr;
	}
}

.cpc-contracts__timezone {
	margin: 10px 0 0;
	color: var(--cpc-muted);
	font-size: 12px;
}

.cpc-contract-card__payment {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 18px;
	padding: 16px;
	border: 1px solid var(--cpc-border);
	border-radius: 14px;
	background: #fffaf0;
}

.cpc-contract-card__payment-copy {
	display: grid;
	gap: 4px;
}

.cpc-contract-card__payment-copy strong {
	font-size: 13px;
}

.cpc-contract-card__payment-copy span {
	font-size: 15px;
	font-weight: 700;
}

.cpc-payment-method-form {
	flex: 0 0 auto;
	margin: 0;
}

.cpc-payment-method-button {
	min-height: 42px;
	padding: 9px 16px !important;
	border-radius: 10px !important;
	font-weight: 700 !important;
	white-space: nowrap;
}

/* Contract-order detail pages: use a dedicated component and leave the native WooCommerce table hidden for compatibility. */
body.cpc-contract-order-view {
	--cpc-order-surface: #fffdf8;
	--cpc-order-surface-soft: #f7f3ea;
	--cpc-order-surface-quiet: #fbf8f1;
	--cpc-order-line: #ddd8cc;
	--cpc-order-line-strong: #cfc7b8;
	--cpc-order-ink: #151515;
	--cpc-order-muted: #68645d;
	--cpc-order-accent: #f4bf23;
}

body.cpc-contract-order-view .woocommerce-MyAccount-content {
	min-width: 0;
}

body.cpc-contract-order-view .woocommerce-MyAccount-content > section.woocommerce-order-details {
	display: grid !important;
	gap: 18px !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 0 22px !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	overflow: visible !important;
}

/* The native heading and table still execute all WooCommerce/extension hooks, but are not used as the visual UI. */
body.cpc-contract-order-view .woocommerce-MyAccount-content > section.woocommerce-order-details > .woocommerce-order-details__title,
body.cpc-contract-order-view .woocommerce-MyAccount-content > section.woocommerce-order-details > table.woocommerce-table--order-details {
	display: none !important;
}

body.cpc-contract-order-view .cpc-contract-order-module {
	display: grid;
	gap: 14px;
	width: 100%;
	min-width: 0;
}

body.cpc-contract-order-view .cpc-contract-order-module__heading {
	padding: 0 0 14px;
	border-bottom: 1px solid rgba(21, 21, 21, .12);
}

body.cpc-contract-order-view .cpc-contract-order-module__eyebrow {
	margin: 0 0 5px;
	color: var(--cpc-order-muted);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .09em;
	line-height: 1.2;
}

body.cpc-contract-order-view .cpc-contract-order-module__heading h2 {
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--cpc-order-ink);
	font-size: clamp(26px, 3.2vw, 38px);
	font-weight: 800;
	line-height: 1.18;
}

body.cpc-contract-order-view .cpc-contract-order-summary {
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	overflow: hidden;
	border: 1px solid var(--cpc-order-line);
	border-radius: 16px;
	background: var(--cpc-order-surface);
	box-shadow: 0 10px 28px rgba(31, 24, 12, .045);
}

body.cpc-contract-order-view .cpc-contract-order-summary__columns,
body.cpc-contract-order-view .cpc-contract-order-summary__item,
body.cpc-contract-order-view .cpc-contract-order-summary__total {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(116px, auto);
	column-gap: 20px;
	align-items: center;
}

body.cpc-contract-order-view .cpc-contract-order-summary__columns {
	padding: 11px 18px;
	border-bottom: 1px solid var(--cpc-order-line);
	background: var(--cpc-order-surface-soft);
	color: var(--cpc-order-muted);
	font-size: 12px;
	font-weight: 800;
}

body.cpc-contract-order-view .cpc-contract-order-summary__columns span:last-child {
	text-align: right;
}

body.cpc-contract-order-view .cpc-contract-order-summary__items {
	background: var(--cpc-order-surface);
}

body.cpc-contract-order-view .cpc-contract-order-summary__item {
	padding: 17px 18px;
	border-bottom: 1px solid var(--cpc-order-line);
}

body.cpc-contract-order-view .cpc-contract-order-summary__product {
	min-width: 0;
	color: var(--cpc-order-ink);
	font-size: 14px;
	font-weight: 800;
	line-height: 1.55;
}

body.cpc-contract-order-view .cpc-contract-order-summary__product > a,
body.cpc-contract-order-view .cpc-contract-order-summary__product > span:first-child {
	color: inherit;
	text-decoration: none;
}

body.cpc-contract-order-view .cpc-contract-order-summary__product > a:hover,
body.cpc-contract-order-view .cpc-contract-order-summary__product > a:focus {
	text-decoration: underline;
	text-underline-offset: 3px;
}

body.cpc-contract-order-view .cpc-contract-order-summary__quantity {
	display: inline-flex;
	align-items: center;
	margin-left: 8px;
	padding: 3px 8px;
	border-radius: 999px;
	background: var(--cpc-order-surface-soft);
	color: var(--cpc-order-muted);
	font-size: 12px;
	font-weight: 800;
	white-space: nowrap;
}

body.cpc-contract-order-view .cpc-contract-order-summary__meta {
	margin-top: 5px;
	color: var(--cpc-order-muted);
	font-size: 12px;
	font-weight: 600;
}

body.cpc-contract-order-view .cpc-contract-order-summary__meta ul,
body.cpc-contract-order-view .cpc-contract-order-summary__meta p {
	margin: 0;
	padding: 0;
	list-style: none;
}

body.cpc-contract-order-view .cpc-contract-order-summary__line-total {
	text-align: right;
	font-size: 15px;
	font-weight: 800;
	white-space: nowrap;
}

body.cpc-contract-order-view .cpc-contract-order-summary__totals {
	margin: 0;
	padding: 0;
	background: var(--cpc-order-surface-quiet);
}

body.cpc-contract-order-view .cpc-contract-order-summary__total {
	margin: 0;
	padding: 13px 18px;
	border-bottom: 1px solid var(--cpc-order-line);
}

body.cpc-contract-order-view .cpc-contract-order-summary__total dt,
body.cpc-contract-order-view .cpc-contract-order-summary__total dd {
	margin: 0;
	color: var(--cpc-order-ink);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.55;
}

body.cpc-contract-order-view .cpc-contract-order-summary__total dd {
	text-align: right;
}

body.cpc-contract-order-view .cpc-contract-order-summary__total--order_total dt,
body.cpc-contract-order-view .cpc-contract-order-summary__total--order_total dd {
	font-size: 15px;
	font-weight: 900;
}

body.cpc-contract-order-view .cpc-contract-order-summary__note {
	padding: 15px 18px;
	border-bottom: 1px solid var(--cpc-order-line);
	background: var(--cpc-order-surface);
}

body.cpc-contract-order-view .cpc-contract-order-summary__note strong {
	display: block;
	margin-bottom: 5px;
	font-size: 13px;
}

body.cpc-contract-order-view .cpc-contract-order-summary__note p {
	margin: 0;
	color: var(--cpc-order-muted);
	font-size: 13px;
	line-height: 1.7;
}

body.cpc-contract-order-view .cpc-contract-order-summary__actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 15px 18px;
	background: var(--cpc-order-surface);
}

body.cpc-contract-order-view .cpc-contract-order-summary__actions-copy {
	display: grid;
	gap: 2px;
	min-width: 0;
}

body.cpc-contract-order-view .cpc-contract-order-summary__actions-copy strong {
	font-size: 13px;
	font-weight: 800;
}

body.cpc-contract-order-view .cpc-contract-order-summary__actions-copy span {
	color: var(--cpc-order-muted);
	font-size: 12px;
	line-height: 1.5;
}

body.cpc-contract-order-view .cpc-contract-order-summary__action-buttons {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex: 0 0 auto;
	flex-wrap: wrap;
	gap: 8px;
}

body.cpc-contract-order-view .cpc-contract-order-summary__action {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: auto !important;
	min-height: 40px !important;
	margin: 0 !important;
	padding: 9px 15px !important;
	border-radius: 999px !important;
	white-space: nowrap !important;
}

/* The cancellation request is a sibling module with the same material and border language. */
body.cpc-contract-order-view .woocommerce-MyAccount-content > section.woocommerce-order-details > section#ccs-cancel-request-box {
	box-sizing: border-box !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	padding: 24px !important;
	border: 1px solid var(--cpc-order-line) !important;
	border-radius: 16px !important;
	background: var(--cpc-order-surface) !important;
	box-shadow: 0 10px 28px rgba(31, 24, 12, .045) !important;
	overflow: visible !important;
}

body.cpc-contract-order-view #ccs-cancel-request-box > h2 {
	margin: 0 0 8px !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	color: var(--cpc-order-ink) !important;
	font-size: clamp(24px, 2.7vw, 32px) !important;
	line-height: 1.25 !important;
}

body.cpc-contract-order-view #ccs-cancel-request-box > p {
	margin: 0 0 18px !important;
	color: var(--cpc-order-muted) !important;
	line-height: 1.75 !important;
}

body.cpc-contract-order-view #ccs-cancel-request-box form {
	display: grid !important;
	gap: 16px !important;
	margin: 0 !important;
}

body.cpc-contract-order-view #ccs-cancel-request-box form > p {
	margin: 0 !important;
}

body.cpc-contract-order-view #ccs-cancel-request-box label {
	display: block !important;
	margin: 0 0 7px !important;
	color: var(--cpc-order-ink) !important;
	font-size: 13px !important;
	font-weight: 800 !important;
}

body.cpc-contract-order-view #ccs-cancel-request-box textarea {
	box-sizing: border-box !important;
	width: 100% !important;
	max-width: 100% !important;
	min-height: 112px !important;
	margin: 0 !important;
	padding: 12px 14px !important;
	border: 1px solid var(--cpc-order-line) !important;
	border-radius: 12px !important;
	background: #fff !important;
	box-shadow: none !important;
	resize: vertical !important;
}

body.cpc-contract-order-view #ccs-cancel-request-box textarea:focus {
	border-color: var(--cpc-order-line-strong) !important;
	outline: 2px solid rgba(244, 191, 35, .3) !important;
	outline-offset: 1px;
}

body.cpc-contract-order-view .woocommerce-MyAccount-content > section.woocommerce-order-details > .coyote-ir-order-documents {
	margin: 0 !important;
	border-color: var(--cpc-order-line) !important;
	border-radius: 16px !important;
	box-shadow: 0 10px 28px rgba(31, 24, 12, .045) !important;
}

@media (max-width: 680px) {
	body.cpc-contract-order-view .cpc-contract-order-summary__columns,
	body.cpc-contract-order-view .cpc-contract-order-summary__item,
	body.cpc-contract-order-view .cpc-contract-order-summary__total {
		grid-template-columns: minmax(0, 1fr) auto;
		column-gap: 12px;
	}

	body.cpc-contract-order-view .cpc-contract-order-summary__columns,
	body.cpc-contract-order-view .cpc-contract-order-summary__item,
	body.cpc-contract-order-view .cpc-contract-order-summary__total,
	body.cpc-contract-order-view .cpc-contract-order-summary__actions {
		padding-right: 14px;
		padding-left: 14px;
	}

	body.cpc-contract-order-view .cpc-contract-order-summary__actions {
		align-items: stretch;
		flex-direction: column;
		gap: 12px;
	}

	body.cpc-contract-order-view .cpc-contract-order-summary__action-buttons,
	body.cpc-contract-order-view .cpc-contract-order-summary__action {
		width: 100% !important;
	}

	body.cpc-contract-order-view .woocommerce-MyAccount-content > section.woocommerce-order-details > section#ccs-cancel-request-box {
		padding: 18px !important;
		border-radius: 14px !important;
	}
}

/* Keep the custom Contract Management endpoint aligned with the site's two-letter account-menu markers. */
.woocommerce-account .woocommerce-MyAccount-navigation-link--coyote-contracts > a {
	display: flex !important;
	align-items: center !important;
	gap: 14px !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation-link--coyote-contracts > a::before {
	content: "CM" !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex: 0 0 34px !important;
	width: 34px !important;
	height: 34px !important;
	margin: 0 !important;
	border-radius: 999px !important;
	background: #f7f3ea !important;
	color: #151515 !important;
	font-size: 10px !important;
	font-weight: 800 !important;
	line-height: 1 !important;
	letter-spacing: .02em !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation-link--coyote-contracts.is-active > a::before {
	background: #f4bf23 !important;
	color: #151515 !important;
}

.cpc-plan-change {
	margin-top: 18px;
	padding: 18px;
	border: 1px solid var(--cpc-border);
	border-radius: 14px;
	background: #fbf8f1;
}

.cpc-plan-change--pending {
	background: #fff9e8;
}

.cpc-plan-change__heading {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 12px;
}

.cpc-plan-change__eyebrow {
	margin: 0 0 4px;
	color: var(--cpc-muted);
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .09em;
}

.cpc-plan-change h4,
.cpc-plan-preview h5 {
	margin: 0;
	color: var(--cpc-text);
	font-weight: 800;
	line-height: 1.4;
}

.cpc-plan-change h4 {
	font-size: 18px;
}

.cpc-plan-preview h5 {
	font-size: 17px;
}

.cpc-plan-change__badge {
	display: inline-flex;
	align-items: center;
	min-height: 26px;
	padding: 4px 9px;
	border-radius: 999px;
	background: #f4e4ad;
	color: #5a4300;
	font-size: 11px;
	font-weight: 800;
	white-space: nowrap;
}

.cpc-plan-change__lead,
.cpc-plan-change__note {
	margin: 0;
	color: var(--cpc-muted);
	font-size: 13px;
	line-height: 1.7;
}

.cpc-plan-change__form {
	display: grid;
	gap: 8px;
	margin: 14px 0 0;
}

.cpc-plan-change__form label {
	font-size: 12px;
	font-weight: 800;
}

.cpc-plan-change__controls {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 10px;
}

.cpc-plan-change__controls select {
	box-sizing: border-box;
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 8px 12px;
	border: 1px solid var(--cpc-border);
	border-radius: 10px;
	background: #fff;
	color: var(--cpc-text);
}

.cpc-plan-change__submit,
.cpc-plan-change__cancel,
.cpc-plan-preview__apply,
.cpc-plan-preview__back {
	min-height: 44px !important;
	padding: 10px 16px !important;
	border-radius: 10px !important;
	font-weight: 800 !important;
	white-space: nowrap;
}

.cpc-plan-change__summary {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1px;
	margin: 12px 0;
	overflow: hidden;
	border: 1px solid var(--cpc-border);
	border-radius: 12px;
	background: var(--cpc-border);
}

.cpc-plan-change__summary > div {
	padding: 12px;
	background: #fffdf8;
}

.cpc-plan-change__summary dt {
	margin: 0 0 4px;
	color: var(--cpc-muted);
	font-size: 11px;
	font-weight: 800;
}

.cpc-plan-change__summary dd {
	margin: 0;
	font-size: 14px;
	font-weight: 800;
	line-height: 1.55;
}

.cpc-plan-change__summary-highlight {
	background: #fff4c9 !important;
}

.cpc-plan-change__button-form {
	margin: 14px 0 0;
}

.cpc-plan-preview__title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
}

.cpc-plan-preview__actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 14px;
}

.cpc-plan-preview__confirm {
	margin: 0;
}

@media (max-width: 680px) {
	.cpc-plan-change {
		padding: 16px;
	}

	.cpc-plan-change__controls,
	.cpc-plan-change__summary {
		grid-template-columns: 1fr;
	}

	.cpc-plan-change__submit,
	.cpc-plan-change__cancel,
	.cpc-plan-preview__apply,
	.cpc-plan-preview__back {
		width: 100%;
		white-space: normal;
	}

	.cpc-plan-preview__actions {
		align-items: stretch;
		flex-direction: column-reverse;
	}
}
