/* Bygger videre på CCMerch Kasse (variabler, trin, ordrekort). */
.ccm-ty {
	--ccm-co-accent: #05707A;
	--ccm-co-accent-dark: #045C64;
	--ccm-co-heading: #313D4D;
	--ccm-co-text: #484F56;
	--ccm-co-muted: #6B747D;
	--ccm-co-line: #E4E7EA;
	--ccm-co-soft: #F7F8F9;
	box-sizing: border-box;
	width: 100%;
	max-width: 1280px;
	margin: 0 auto;
	padding: 24px 0 80px;
	font-family: "Jost", sans-serif;
	color: var(--ccm-co-text);
}

.ccm-ty *,
.ccm-ty *::before,
.ccm-ty *::after {
	box-sizing: border-box;
}

.ccm-ty .ccm-ty__head {
	margin-bottom: 20px;
}

.ccm-ty__note {
	margin: 0;
	padding: 16px 18px;
	font-size: 15px;
	color: var(--ccm-co-heading);
	background-color: var(--ccm-co-soft);
	border-radius: 14px;
}

/* Hero */
.ccm-ty .ccm-ty__hero {
	display: flex;
	align-items: center;
	gap: 22px;
	margin: 0 0 18px;
	padding: 28px 32px;
	color: #FFFFFF;
	background: linear-gradient(135deg, var(--ccm-co-accent) 0%, var(--ccm-co-accent-dark) 100%);
	border-radius: 24px;
}

.ccm-ty .ccm-ty__hero.is-failed {
	color: #8A1C1C;
	background: #FDECEC;
}

.ccm-ty .ccm-ty__badge {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 68px;
	height: 68px;
	color: var(--ccm-co-accent);
	background-color: #FFFFFF;
	border-radius: 50%;
	box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.18);
}

.ccm-ty .ccm-ty__hero.is-failed .ccm-ty__badge {
	color: #B42318;
	box-shadow: 0 0 0 8px rgba(180, 35, 24, 0.08);
}

.ccm-ty .ccm-ty__hero-text {
	min-width: 0;
}

.ccm-ty .ccm-ty__title {
	margin: 0;
	font-family: "Jost", sans-serif;
	font-size: clamp(28px, 3.6vw, 40px);
	font-weight: 600;
	line-height: 1.12;
	color: inherit;
}

.ccm-ty .ccm-ty__intro {
	margin: 8px 0 0;
	font-size: 16px;
	line-height: 1.5;
	color: inherit;
	opacity: 0.92;
}

.ccm-ty .ccm-ty__number {
	display: inline-block;
	margin: 14px 0 0;
	padding: 6px 14px;
	font-size: 14px;
	color: #FFFFFF;
	background-color: rgba(255, 255, 255, 0.16);
	border-radius: 999px;
}

.ccm-ty .ccm-ty__number strong {
	font-weight: 600;
}

/* Oversigt */
.ccm-ty ul.ccm-ty__overview {
	margin: 0 0 24px;
}

.ccm-ty ul.ccm-ty__overview li strong {
	word-break: break-word;
}

/* Layout */
.ccm-ty .ccm-ty__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 380px;
	gap: 24px;
	align-items: start;
}

.ccm-ty .ccm-ty__main {
	display: flex;
	flex-direction: column;
	gap: 18px;
	min-width: 0;
}

.ccm-ty .ccm-ty__main > :empty {
	display: none;
}

.ccm-ty .ccm-ty__side {
	position: sticky;
	top: 24px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 24px;
	background-color: var(--ccm-co-soft);
	border-radius: 20px;
}

/* Hvad sker der nu? */
.ccm-ty .ccm-ty__next-title {
	margin: 0 0 14px;
	font-family: "Jost", sans-serif;
	font-size: 20px;
	font-weight: 600;
	color: var(--ccm-co-heading);
}

.ccm-ty ol.ccm-ty__timeline {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ccm-ty ol.ccm-ty__timeline::before {
	content: "";
	position: absolute;
	top: 18px;
	bottom: 18px;
	left: 17px;
	width: 2px;
	background-color: var(--ccm-co-line);
}

.ccm-ty .ccm-ty__tl-item {
	position: relative;
	display: flex;
	gap: 14px;
	margin: 0;
}

.ccm-ty .ccm-ty__tl-icon {
	position: relative;
	z-index: 1;
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	color: var(--ccm-co-accent);
	background-color: #FFFFFF;
	border: 1.5px solid var(--ccm-co-line);
	border-radius: 50%;
}

.ccm-ty .ccm-ty__tl-item.is-done .ccm-ty__tl-icon {
	color: #FFFFFF;
	background-color: var(--ccm-co-accent);
	border-color: var(--ccm-co-accent);
}

.ccm-ty .ccm-ty__tl-icon .ccm-ty__icon {
	width: 18px;
	height: 18px;
}

.ccm-ty .ccm-ty__tl-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding-top: 6px;
	font-size: 14px;
	line-height: 1.45;
	color: var(--ccm-co-text);
}

.ccm-ty .ccm-ty__tl-text strong {
	font-size: 15px;
	font-weight: 600;
	color: var(--ccm-co-heading);
}

/* Knapper */
.ccm-ty .ccm-ty__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
}

.ccm-ty .ccm-ty__hero .ccm-ty__actions {
	margin-top: 16px;
}

.ccm-ty .ccm-ty__side .ccm-ty__actions {
	flex-direction: column;
	padding-top: 16px;
	border-top: 1px solid var(--ccm-co-line);
}

.ccm-ty a.ccm-ty__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 22px;
	font-family: "Jost", sans-serif;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	color: var(--ccm-co-accent);
	text-decoration: none;
	background-color: #FFFFFF;
	border: 1.5px solid var(--ccm-co-accent);
	border-radius: 999px;
	transition: background-color 0.2s, color 0.2s;
}

.ccm-ty a.ccm-ty__btn:hover,
.ccm-ty a.ccm-ty__btn:focus-visible {
	color: #FFFFFF;
	background-color: var(--ccm-co-accent);
}

.ccm-ty a.ccm-ty__btn--primary {
	color: #FFFFFF;
	background-color: var(--ccm-co-accent);
}

.ccm-ty a.ccm-ty__btn--primary:hover,
.ccm-ty a.ccm-ty__btn--primary:focus-visible {
	background-color: var(--ccm-co-accent-dark);
	border-color: var(--ccm-co-accent-dark);
}

.ccm-ty a.ccm-ty__btn:focus-visible {
	outline: 2px solid var(--ccm-co-accent);
	outline-offset: 2px;
}

/* Ordredetaljer fra WooCommerce */
.ccm-ty .woocommerce-order-details,
.ccm-ty .woocommerce-customer-details {
	margin: 0;
	padding: 24px;
	background-color: #FFFFFF;
	border: 1px solid var(--ccm-co-line);
	border-radius: 20px;
}

.ccm-ty .woocommerce-order-details__title,
.ccm-ty .woocommerce-column__title,
.ccm-ty .woocommerce-customer-details h2 {
	margin: 0 0 14px;
	font-family: "Jost", sans-serif;
	font-size: 20px;
	font-weight: 600;
	letter-spacing: normal;
	text-transform: none;
	color: var(--ccm-co-heading);
}

.ccm-ty table.order_details {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
}

.ccm-ty table.order_details thead {
	display: none;
}

.ccm-ty table.order_details th,
.ccm-ty table.order_details td {
	padding: 12px 0;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.45;
	text-align: left;
	vertical-align: top;
	color: var(--ccm-co-heading);
	background: transparent !important;
	border: 0;
	border-bottom: 1px solid var(--ccm-co-line);
}

.ccm-ty table.order_details tr > :last-child {
	text-align: right;
}

.ccm-ty table.order_details td.product-total {
	white-space: nowrap;
}

.ccm-ty table.order_details tfoot td small {
	display: block;
	font-size: 13px;
	color: var(--ccm-co-muted);
}

.ccm-ty table.order_details tfoot th {
	font-weight: 500;
	color: var(--ccm-co-text);
}

/* Totalrækken er den sidste, medmindre der kommer en række med handlinger (fx fortrydelse) bagefter. */
.ccm-ty table.order_details tfoot tr:last-child:not(:has(.order-actions--heading)) th,
.ccm-ty table.order_details tfoot tr:last-child:not(:has(.order-actions--heading)) td,
.ccm-ty table.order_details tfoot tr:has(+ tr .order-actions--heading) th,
.ccm-ty table.order_details tfoot tr:has(+ tr .order-actions--heading) td {
	padding-top: 16px;
	font-size: 18px;
	font-weight: 600;
	color: var(--ccm-co-heading);
}

.ccm-ty table.order_details tfoot tr:last-child th,
.ccm-ty table.order_details tfoot tr:last-child td {
	border-bottom: 0;
}

.ccm-ty table.order_details tfoot tr:has(.order-actions--heading) th,
.ccm-ty table.order_details tfoot tr:has(.order-actions--heading) td {
	padding-top: 16px;
	font-size: 15px;
	font-weight: 500;
	vertical-align: middle;
	color: var(--ccm-co-text);
}

.ccm-ty table.order_details a.order-actions-button,
.ccm-ty table.order_details .order-actions-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	margin: 0 0 0 6px;
	padding: 0 18px;
	font-family: "Jost", sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	color: var(--ccm-co-accent) !important;
	text-decoration: none;
	background: #FFFFFF !important;
	border: 1.5px solid var(--ccm-co-accent) !important;
	border-radius: 999px !important;
	box-shadow: none;
}

.ccm-ty table.order_details a.order-actions-button:hover,
.ccm-ty table.order_details a.order-actions-button:focus-visible {
	color: #FFFFFF !important;
	background: var(--ccm-co-accent) !important;
}

.ccm-ty table.order_details td.product-name {
	position: relative;
	width: 100%;
	padding-right: 12px;
	white-space: normal;
}

.ccm-ty table.order_details td.product-name:has(.ccm-ty__thumb) {
	height: 84px;
	padding-left: 72px;
}

.ccm-ty .ccm-ty__thumb {
	position: absolute;
	top: 12px;
	left: 0;
	width: 58px;
	height: 58px;
	overflow: hidden;
	background-color: var(--ccm-co-soft);
	border: 1px solid var(--ccm-co-line);
	border-radius: 10px;
}

.ccm-ty .ccm-ty__thumb img {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	margin: 0;
	object-fit: cover;
}

.ccm-ty .ccm-ty__item-name,
.ccm-ty .ccm-ty__item-name a {
	font-weight: 600;
	color: var(--ccm-co-heading);
	text-decoration: none;
}

.ccm-ty td.product-name .product-quantity {
	font-weight: 500;
	color: var(--ccm-co-muted);
}

.ccm-ty td.product-name ul.wc-item-meta {
	margin: 4px 0 0;
	padding: 0;
	font-size: 13px;
	list-style: none;
	color: var(--ccm-co-text);
}

.ccm-ty td.product-name ul.wc-item-meta li,
.ccm-ty td.product-name ul.wc-item-meta p {
	display: inline;
	margin: 0;
}

.ccm-ty td.product-name ul.wc-item-meta li::after {
	content: "\A";
	white-space: pre;
}

.ccm-ty td.product-name ul.wc-item-meta strong {
	font-weight: 500;
}

.ccm-ty .woocommerce-customer-details .woocommerce-columns--addresses,
.ccm-ty .woocommerce-customer-details .col2-set {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 20px;
	width: 100%;
	margin: 0;
}

.ccm-ty .woocommerce-customer-details .col2-set::before,
.ccm-ty .woocommerce-customer-details .col2-set::after {
	display: none;
}

.ccm-ty .woocommerce-customer-details .woocommerce-column,
.ccm-ty .woocommerce-customer-details .col-1,
.ccm-ty .woocommerce-customer-details .col-2 {
	float: none;
	width: auto;
	max-width: none;
	padding: 0;
}

.ccm-ty .woocommerce-customer-details address {
	margin: 0;
	padding: 0;
	font-size: 15px;
	font-style: normal;
	line-height: 1.6;
	color: var(--ccm-co-text);
	border: 0;
}

.ccm-ty .woocommerce-customer-details address p {
	margin: 6px 0 0;
}

.ccm-ty .woocommerce-customer-details--phone::before,
.ccm-ty .woocommerce-customer-details--email::before {
	display: none;
}

.ccm-ty .woocommerce-customer-details--phone,
.ccm-ty .woocommerce-customer-details--email {
	padding-left: 0 !important;
	text-indent: 0;
}

/* Mobil */
@media (max-width: 960px) {
	.ccm-ty .ccm-ty__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.ccm-ty .ccm-ty__side {
		position: static;
	}
}

@media (max-width: 767px) {
	.ccm-ty {
		padding: 12px 6px 48px;
	}

	.ccm-ty .ccm-ty__hero {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
		padding: 22px 20px;
		border-radius: 20px;
	}

	.ccm-ty .ccm-ty__badge {
		width: 56px;
		height: 56px;
	}

	.ccm-ty ul.ccm-ty__overview {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}

	.ccm-ty .woocommerce-order-details,
	.ccm-ty .woocommerce-customer-details,
	.ccm-ty .ccm-ty__side {
		padding: 18px 16px;
	}

	.ccm-ty table.order_details td.product-name:has(.ccm-ty__thumb) {
		height: 76px;
		padding-left: 62px;
	}

	.ccm-ty .ccm-ty__thumb {
		width: 50px;
		height: 50px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ccm-ty a.ccm-ty__btn {
		transition: none;
	}
}
