/* ============================================================
   iQ Lingua — Custom Checkout Page (Bestellübersicht)
   ============================================================ */

/* ── Wrapper & Layout ─────────────────────────────────────── */
.caw-checkout-wrapper {
	max-width: 680px;
	margin: 0 auto;
	padding: 0 16px 48px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: #111;
}

.caw-checkout-header {
	text-align: center;
	margin: 24px 0 28px;
}

.caw-checkout-title {
	font-size: 24px;
	font-weight: 700;
	margin: 0 0 6px;
	color: #111;
}

.caw-checkout-subtitle {
	font-size: 14px;
	color: #666;
	margin: 0;
}

/* ── Form ─────────────────────────────────────────────────── */
.caw-checkout-form {
	display: flex;
	flex-direction: column;
	gap: 0;
}

/* ── Accordion Container ──────────────────────────────────── */
.caw-checkout-accordions {
	display: flex;
	flex-direction: column;
	gap: 0;
	margin-bottom: 20px;
}

/* ── Single Accordion ─────────────────────────────────────── */
.caw-co-accordion {
	background: #fff;
	border: 1px solid #e4e4e4;
	border-radius: 10px;
	margin-bottom: 10px;
	overflow: hidden;
	transition: box-shadow 0.2s;
}

.caw-co-accordion.is-open {
	box-shadow: 0 2px 12px rgba(0,0,0,.08);
}

/* Header button */
.caw-co-accordion__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 18px 20px;
	background: none;
	border: none;
	cursor: pointer;
	text-align: left;
	-webkit-appearance: none;
	appearance: none;
	color: inherit;
}

.caw-co-accordion__title {
	font-size: 16px;
	font-weight: 700;
	color: #111;
}

/* Chevron */
.caw-co-accordion__chevron {
	display: inline-block;
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	position: relative;
}

.caw-co-accordion__chevron::before,
.caw-co-accordion__chevron::after {
	content: '';
	position: absolute;
	top: 50%;
	width: 8px;
	height: 2px;
	background: #555;
	border-radius: 2px;
	transition: transform 0.25s ease;
}

.caw-co-accordion__chevron::before {
	left: 3px;
	transform: translateY(-50%) rotate(45deg);
}

.caw-co-accordion__chevron::after {
	right: 3px;
	transform: translateY(-50%) rotate(-45deg);
}

/* Rotated when open */
.caw-co-accordion__header[aria-expanded="true"] .caw-co-accordion__chevron::before {
	transform: translateY(-50%) rotate(-45deg);
}

.caw-co-accordion__header[aria-expanded="true"] .caw-co-accordion__chevron::after {
	transform: translateY(-50%) rotate(45deg);
}

/* Body */
.caw-co-accordion__body {
	overflow: hidden;
	max-height: 0;
	transition: max-height 0.35s ease, padding 0.2s ease;
}

.caw-co-accordion__body:not([hidden]) {
	max-height: 2000px;
}

.caw-co-accordion__inner {
	padding: 4px 20px 20px;
	border-top: 1px solid #f0f0f0;
}

/* ── Course Table ─────────────────────────────────────────── */
.caw-co-course-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.caw-co-course-table th,
.caw-co-course-table td {
	padding: 6px 0;
	text-align: left;
	vertical-align: top;
}

.caw-co-course-name {
	font-weight: 700;
	font-size: 15px;
	padding-bottom: 10px;
}

.caw-co-meta-key {
	color: #666;
	width: 35%;
	padding-right: 12px;
	display: flex;
}

.caw-co-course-table tr {
	 border-bottom: solid 1px #DDDDDD;
}

/* ── Billing inner (WC form styling) ──────────────────────── */
.caw-co-billing-inner .woocommerce-billing-fields label,
.caw-co-billing-inner .woocommerce-shipping-fields label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 4px;
	color: #333;
}

.caw-co-billing-inner input[type="text"],
.caw-co-billing-inner input[type="email"],
.caw-co-billing-inner input[type="tel"],
.caw-co-billing-inner input[type="date"],
.caw-co-billing-inner select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d0d0d0;
	border-radius: 6px;
	font-size: 14px;
	color: #111;
	background: #fff;
	box-sizing: border-box;
}

.caw-co-billing-inner input[type="date"] {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	text-align: left;
}
.caw-co-billing-inner input:focus,
.caw-co-billing-inner select:focus {
	outline: none;
	border-color: #d0021b;
	box-shadow: 0 0 0 3px rgba(208,2,27,.12);
}

.caw-co-billing-inner .form-row {
	margin-bottom: 14px;
}

/* ── Payment inner ────────────────────────────────────────── */
.caw-co-payment-inner #payment {
	background: none;
	border: none;
	padding: 0;
}

.caw-co-payment-inner #payment ul.payment_methods {
	list-style: none;
	padding: 0;
	margin: 0;
}

/* One row per payment option: radio · icon · label, description underneath. */
.caw-co-payment-inner #payment ul.payment_methods li {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	padding: 12px 0;
	border-bottom: 1px solid #f0f0f0;
}

.caw-co-payment-inner #payment ul.payment_methods li > input[type="radio"] {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: #111;
	cursor: pointer;
}

.caw-co-payment-inner #payment ul.payment_methods li > label {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1 1 auto;
	margin: 0;
	font-weight: 500;
	line-height: 1.3;
	cursor: pointer;
}

/* WooCommerce prints the icon after the title, so pull it in front. A text node
   cannot be reordered, but giving the icon a negative order moves it ahead of
   the anonymous flex item the title sits in. */
.caw-co-payment-inner #payment ul.payment_methods li .caw-pm-icon {
	order: -1;
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	flex: 0 0 auto;
	/* Fixed box keeps the labels aligned regardless of each logo's width. */
	min-width: 36px;
}

.caw-co-payment-inner #payment ul.payment_methods li .caw-pm-icon img {
	display: block;
	width: auto;
	height: 22px;
	max-width: 36px;
	/* WooCommerce and some gateway plugins force these — override both. */
	margin: 0;
	padding: 0;
	float: none;
	max-height: 22px;
}

/* Gateway description drops to its own full-width row below the option. */
.caw-co-payment-inner #payment ul.payment_methods li .payment_box {
	flex: 0 0 100%;
}

.caw-co-payment-inner #payment .payment_box {
	margin: 10px 0 0;
	padding: 14px;
	background: #fafafa;
	border-radius: 8px;
	font-size: 14px;
}

/* Hide WC's default "Place order" button — we use our own */
.caw-co-payment-inner #payment .place-order {
	display: none !important;
}

/* ── Price Summary ────────────────────────────────────────── */
.caw-co-summary {
	background: #fff;
	border: 1px solid #e4e4e4;
	border-radius: 10px;
	padding: 20px;
	margin-bottom: 20px;
	font-size: 15px;
}

.caw-co-summary__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 0;
	color: #222;
}

.caw-co-summary__row span:last-child {
	font-variant-numeric: tabular-nums;
}

.caw-co-summary__divider {
	height: 1px;
	background: #e4e4e4;
	margin: 10px 0;
}

.caw-co-summary__row--total {
	font-size: 17px;
	font-weight: 700;
}

/* ── Custom Checkboxes ────────────────────────────────────── */
.caw-co-checkboxes {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 20px;
}

.caw-co-checkbox-label {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	cursor: pointer;
	font-size: 14px;
	line-height: 1.4;
	color: #333;
	user-select: none;
}

.caw-co-checkbox-label input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.caw-co-checkbox-custom {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	border: 2px solid #ccc;
	border-radius: 4px;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s, border-color 0.15s;
	margin-top: 1px;
}

.caw-co-checkbox-label input[type="checkbox"]:checked + .caw-co-checkbox-custom {
	background: #d0021b;
	border-color: #d0021b;
}

.caw-co-checkbox-label input[type="checkbox"]:checked + .caw-co-checkbox-custom::after {
	content: '';
	display: block;
	width: 5px;
	height: 9px;
	border: 2px solid #fff;
	border-top: none;
	border-left: none;
	transform: rotate(45deg) translate(-1px, -1px);
}

.caw-co-checkbox-label input[type="checkbox"]:focus + .caw-co-checkbox-custom {
	box-shadow: 0 0 0 3px rgba(208,2,27,.2);
}

.caw-co-checkbox-text a {
	color: #d0021b;
	text-decoration: underline;
}

/* ── Submit Button ────────────────────────────────────────── */
.caw-co-submit-wrap {
	margin-bottom: 14px;
}

.caw-co-submit {
	display: block;
	width: 100%;
	padding: 16px 24px;
	background: #d0021b;
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	border: none;
	border-radius: 50px;
	cursor: pointer;
	text-align: center;
	transition: background 0.2s, transform 0.1s;
	letter-spacing: 0.01em;
	-webkit-appearance: none;
	appearance: none;
}

.caw-co-submit:hover:not(:disabled) {
	background: #b00019;
}

.caw-co-submit:active:not(:disabled) {
	transform: scale(0.98);
}

.caw-co-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* ── Subscription Note ────────────────────────────────────── */
.caw-co-sub-note {
	font-size: 12px;
	color: #999;
	text-align: center;
	margin: 0;
	line-height: 1.5;
}

/* ── WC error / notice overrides ─────────────────────────── */
.caw-checkout-wrapper .woocommerce-error,
.caw-checkout-wrapper .woocommerce-message,
.caw-checkout-wrapper .woocommerce-info {
	border-radius: 8px;
	margin-bottom: 16px;
}

.caw-checkout-wrapper .woocommerce-invalid input {
	border-color: #d0021b !important;
}

/* ── Hide quantity controls (single-seat booking model) ──── */
/* PHP filter woocommerce_cart_item_quantity returns '' for   */
/* course items; this is a fallback for any WC cart view.    */
.woocommerce-cart-form .quantity,
.woocommerce-mini-cart .quantity,
.wc-block-mini-cart__product-quantity,
.wc-block-cart-item__quantity {
	display: none !important;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 480px) {
	.caw-checkout-wrapper {
		padding: 0 12px 32px;
	}
	.caw-co-accordion__header {
		padding: 15px 16px;
	}
	.caw-co-accordion__inner {
		padding: 4px 16px 16px;
	}
	.caw-checkout-title {
		font-size: 20px;
	}
}

/* ═══════════════════════════════════════════════════════════
   Thank-You / Order-Received Page  (.caw-ty-*)
   ═══════════════════════════════════════════════════════════ */

/* Hide WC's default page title and native order content on the order-received page */
.woocommerce-order-received .entry-title,
.woocommerce-order-received .page-title,
.woocommerce-order-received h1.post-title {
	display: none !important;
}

.woocommerce-order-received .woocommerce > p:first-of-type,
.woocommerce-order-received .woocommerce-thankyou-order-details,
.woocommerce-order-received .woocommerce-order-details,
.woocommerce-order-received .woocommerce-customer-details {
	display: none !important;
}

/* ── Wrapper ─────────────────────────────────────────────── */
.caw-ty-wrap {
	max-width: 900px;
	margin: 0 auto;
	padding: 0 16px 60px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: #111;
	font-size: 14px;
}

/* ── Hero ────────────────────────────────────────────────── */
.caw-ty-hero {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 20px;
	align-items: start;
	padding: 28px 0 20px;
	margin-bottom: 6px;
}

.caw-ty-hero__left {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.caw-ty-hero__badge {
	display: flex;
	align-items: center;
	gap: 16px;
}

.caw-ty-hero__check {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #16a34a;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.caw-ty-hero__title-group .caw-ty-hero__title {
	font-size: 30px;
	font-weight: 800;
	margin: 0 0 4px;
	color: #111;
	line-height: 1.1;
}

.caw-ty-hero__title-group .caw-ty-hero__sub {
	font-size: 14px;
	color: #555;
	margin: 0;
}

.caw-ty-hero__order-meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding-left: 72px;
}

.caw-ty-order-number {
	font-size: 14px;
	color: #111;
}

.caw-ty-order-number strong {
	color: #cc0000;
}

.caw-ty-order-date {
	font-size: 13px;
	color: #666;
}

/* Right: total card */
.caw-ty-total-card {
	background: #fff;
	border: 1px solid #e4e4e4;
	border-radius: 12px;
	padding: 20px 24px;
}

.caw-ty-total-card__label {
	font-size: 11px;
	color: #999;
	margin: 0 0 4px;
	text-transform: uppercase;
	letter-spacing: .4px;
}

.caw-ty-total-card__amount {
	font-size: 28px;
	font-weight: 800;
	color: #111;
	margin: 0 0 14px;
}

.caw-ty-total-card__method {
	font-size: 15px;
	font-weight: 600;
	color: #111;
	margin: 0;
}

/* ── Email confirmation ──────────────────────────────────── */
.caw-ty-email-note {
	font-size: 13px;
	color: #555;
	margin: 0 0 20px;
}

.caw-ty-email-note strong {
	color: #111;
}

/* ── Course details card ─────────────────────────────────── */
.caw-ty-course-card {
	background: #fff;
	border: 1px solid #e4e4e4;
	border-radius: 12px;
	padding: 20px 24px;
	margin-bottom: 20px;
}

.caw-ty-course-card__heading {
	font-size: 17px;
	font-weight: 700;
	margin: 0 0 14px;
	color: #111;
}

/* iq-cc-icon span: keep icon + label inline */
.iq-cc-icon {
	display: inline-flex;
	align-items: center;
	margin-right: 6px;
	vertical-align: middle;
}

/* ── 2-column row (Zahlung + Vertrag) ────────────────────── */
.caw-ty-row2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-bottom: 20px;
	align-items: start;
}

.caw-ty-row2--single {
	grid-template-columns: 1fr;
	max-width: 460px;
}

/* ── Zahlungsübersicht card ──────────────────────────────── */
.caw-ty-zahlung-card,
.caw-ty-subscription-card {
	background: #fff;
	border: 1px solid #e4e4e4;
	border-radius: 12px;
	padding: 20px 24px;
}

.caw-ty-zahlung-card h3,
.caw-ty-subscription-card h3 {
	font-size: 15px;
	font-weight: 700;
	margin: 0 0 14px;
	color: #111;
}

.caw-ty-zahlung-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.caw-ty-zahlung-table td {
	padding: 6px 0;
	vertical-align: top;
	color: #333;
}

.caw-ty-zahlung-table td:last-child {
	text-align: right;
	white-space: nowrap;
	padding-left: 12px;
}

.caw-ty-divider td {
	padding: 3px 0 !important;
	border-top: 1px solid #f0f0f0;
}

.caw-ty-total-row td {
	font-weight: 700;
	font-size: 14px;
	padding-top: 10px !important;
	border-top: 1px solid #ddd;
}

/* ── Zugehöriger Vertrag ─────────────────────────────────── */
.caw-ty-sub-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	margin-bottom: 14px;
}

.caw-ty-sub-table td {
	padding: 5px 0;
	vertical-align: top;
}

.caw-ty-sub-table td:first-child {
	color: #888;
	width: 48%;
}

.caw-ty-sub-status-badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 50px;
	font-size: 11px;
	font-weight: 600;
	background: #dcfce7;
	color: #16a34a;
}

.caw-ty-sub-status--cancelled,
.caw-ty-sub-status--expired {
	background: #fee2e2;
	color: #dc2626;
}

.caw-ty-sub-status--on-hold,
.caw-ty-sub-status--pending {
	background: #fef9c3;
	color: #92400e;
}

.caw-ty-sub-btn {
	display: inline-block;
	padding: 8px 18px;
	background: #fff;
	border: 1px solid #d0d0d0;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 500;
	color: #333;
	text-decoration: none;
	cursor: pointer;
	transition: border-color .15s, background .15s;
}

.caw-ty-sub-btn:hover {
	border-color: #999;
	background: #f9f9f9;
	color: #111;
	text-decoration: none;
}

/* ── Billing address card ────────────────────────────────── */
.caw-ty-billing-card {
	background: #f9f9f9;
	border: 1px solid #e4e4e4;
	border-radius: 12px;
	padding: 20px 24px;
	margin-bottom: 16px;
	display: flex;
	gap: 18px;
	align-items: flex-start;
}

.caw-ty-billing-card__icon {
	flex-shrink: 0;
	margin-top: 2px;
}

.caw-ty-billing-card__body h3 {
	font-size: 15px;
	font-weight: 700;
	margin: 0 0 10px;
	color: #111;
}

.caw-ty-billing-card__body p {
	font-size: 13px;
	color: #555;
	margin: 0 0 3px;
	line-height: 1.5;
}

.caw-ty-billing-card__body a {
	color: #555;
	text-decoration: none;
}

.caw-ty-billing-card__body a:hover {
	color: #111;
	text-decoration: underline;
}

/* ── Support CTA card ────────────────────────────────────── */
.caw-ty-support-card {
	background: #f9f9f9;
	border: 1px solid #e4e4e4;
	border-radius: 12px;
	padding: 20px 24px;
	display: flex;
	align-items: center;
	gap: 16px;
}

.caw-ty-support-card__icon {
	flex-shrink: 0;
}

.caw-ty-support-card__body {
	flex: 1;
}

.caw-ty-support-card__body h3 {
	font-size: 15px;
	font-weight: 700;
	margin: 0 0 3px;
	color: #111;
}

.caw-ty-support-card__body p {
	font-size: 13px;
	color: #666;
	margin: 0;
}

.caw-ty-support-btn {
	display: inline-block;
	padding: 10px 20px;
	background: #fff;
	border: 1px solid #d0d0d0;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	color: #333;
	text-decoration: none;
	white-space: nowrap;
	transition: border-color .15s, background .15s;
}

.caw-ty-support-btn:hover {
	border-color: #999;
	color: #111;
	text-decoration: none;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 680px) {
	.caw-ty-hero {
		grid-template-columns: 1fr;
	}
	.caw-ty-hero__right {
		order: 0; /* show total card above checkmark on mobile */
	}
	.caw-ty-row2 {
		grid-template-columns: 1fr;
	}
	.caw-ty-row2--single {
		max-width: 100%;
	}
	.caw-ty-hero__order-meta { 
		padding-left: 0;
	}
	.caw-ty-support-card {
		flex-wrap: wrap;
	}
	.caw-ty-support-btn {
		width: 100%;
		text-align: center;
	}
	.caw-co-course-table tr{
		display: flex;
		justify-content: space-between;
		gap: 16px;
	}
	.caw-co-course-table td {
    text-align: right;
	}
	.caw-co-meta-key {
    width: 115px !important;
    align-items: center;
	}
.caw-co-course-table td:not(.caw-co-meta-key) {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	max-width: 155px;
	display: block;
	}
}
