/* ============================================================
   CQP Produktfelder – Frontend CSS
   ============================================================ */

.cqp-product-fields {
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 16px 20px;
}

.cqp-field-wrap {
    margin-bottom: 0;
    box-sizing: border-box;
}

/* Breitenklassen */
.cqp-field-wrap--w100 { width: 100%; }
.cqp-field-wrap--w50  { width: calc( 50% - 10px ); }
.cqp-field-wrap--w33  { width: calc( 33.333% - 14px ); }
.cqp-field-wrap--w25  { width: calc( 25% - 15px ); }

/* Mobil: immer volle Breite */
@media ( max-width: 600px ) {
    .cqp-field-wrap--w50,
    .cqp-field-wrap--w33,
    .cqp-field-wrap--w25 { width: 100%; }
}

.cqp-field-label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.cqp-required { color: #e74c3c; }

.cqp-input {
    width: 100%;
    max-width: 320px;
}

/* Radio & Checkbox */
.cqp-radio-group,
.cqp-checkbox-group,
.cqp-yes-no-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cqp-radio-label,
.cqp-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.cqp-opt-price {
    font-size: 0.85rem;
    color: #888;
}

/* Color Swatches */
.cqp-swatch-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

.cqp-swatch-label {
    position: relative;
    cursor: pointer;
}

.cqp-swatch-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cqp-swatch {
    display: block;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid transparent;
    box-shadow: 0 0 0 1px #ccc;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.cqp-swatch-label input:checked + .cqp-swatch,
.cqp-swatch.is-selected {
    border-color: #1d2327;
    box-shadow: 0 0 0 2px #1d2327;
}

.cqp-swatch-selected-label {
    font-size: 0.875rem;
    color: #555;
    min-height: 1.2em;
}

/* Number */
.cqp-number-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cqp-number-price {
    font-size: 0.875rem;
    color: #888;
}

/* Feld-Beschreibung */
.cqp-field-desc {
    font-size: 14px;
    color: #333;
    margin-top: 4px;
}

/* ── Live-Preisanzeige ─────────────────────────────────────── */
.cqp-price-opts {
    display: block;
    font-size: 0.9rem;
    color: #555;
    margin-top: 4px;
    font-weight: normal;
}

.cqp-price-total {
    display: block;
    margin-top: 4px;
    font-size: 1.1rem;
}

/* ── Preisblock (Basispreis / Optionen / Gesamt) ───────────── */

.cqp-price-block {
    margin: 24px 0 16px;
}

.cqp-price-table {
    width: 100%;
    border-collapse: collapse;
    font-family: "Prompt", sans-serif;
}

.cqp-price-table tr {
    border-top: none;
}

.cqp-price-table tr:first-child {
    border-top: none;
}

.cqp-price-row__label {
    padding: 8px 0;
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
    width: 55%;
}

.cqp-price-row__value {
    padding: 8px 0;
    text-align: right;
    font-size: 0.95rem;
    color: #333;
    white-space: nowrap;
}

.cqp-tax-label {
    font-size: 0.8rem;
    font-weight: normal;
    color: #888;
    margin-left: 4px;
}

/* Gesamtpreis-Zeile hervorheben */
.cqp-price-row--total .cqp-price-row__label,
.cqp-price-row--total .cqp-price-row__value {
    font-size: 1.05rem;
    font-weight: 700;
    padding-top: 14px;
    color: #1a1a1a;
}

.cqp-price-row--total .cqp-tax-label {
    font-weight: normal;
    font-size: 0.8rem;
    color: #666;
}

/* ── Überschrift / Sektion ─────────────────────────────────── */

.cqp-field-wrap--heading {
    width: 100% !important;   /* Überschriften immer volle Breite */
    margin-top: 12px;
    margin-bottom: 4px;
}

.cqp-section-heading {
    margin: 0 0 4px 0;
    padding: 0;
    font-size: 1rem;
    font-weight: 700;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 6px;
}

.cqp-section-desc {
    margin: 0 0 8px;
    font-size: 0.875rem;
    color: #666;
}

/* ── Quellen-Badges (nur für Admins sichtbar) ──────────────── */

.cqp-source-badge {
    font-size: 0.75em;
    vertical-align: middle;
    margin-left: 4px;
    cursor: help;
    opacity: 0.7;
}

.cqp-source-badge--product { /* 📦 Paket = produktspezifisch */ }
.cqp-source-badge--global  { /* 🌐 Globus = globale Gruppe   */ }

/* ── Bearbeiten-Hinweis auf Produktseite ───────────────────── */

.cqp-edit-notice {
    background: #e8f4fd;
    border-left: 4px solid #2271b1;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 0 4px 4px 0;
    font-size: 0.9rem;
    color: #1a4971;
}

/* ── Preis-Hint und Max unter dem Feld ─────────────────────── */

.cqp-field-price-hint,
.cqp-field-max-hint {
    margin: 4px 0 0;
    font-size: 0.82rem;
    color: #666;
    line-height: 1.3;
}

.cqp-varkey-price-hint {
    font-size: 0.82rem;
    color: #666;
}

/* ── Frontend-Akkordion ────────────────────────────────────── */

.cqp-accordion-section-toggle {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.cqp-accordion-section-toggle:hover {
    opacity: 0.8;
}

.cqp-acc-icon {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 7px solid currentColor;
    flex-shrink: 0;
    transition: transform 0.2s;
    vertical-align: middle;
    margin-left: 6px;
}

.cqp-accordion-section-toggle[aria-expanded="false"] .cqp-acc-icon {
    transform: rotate( -90deg );
}

.cqp-accordion-group {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 16px 20px;
}

/* ── Hogatek Custom Styles ───────────────────────────────────────────────── */

/* Akkordion-Pfeil */
.cqp-acc-icon {
	border-right: 6px solid transparent;
	border-left:  6px solid transparent;
	border-top:   12px solid #157f2d;
}
/* .cqp-acc-icon:before {
	content: "aufklappen";
	font-size: 14px;
} */

/* CQP Allgemein */
.cqp-product-fields {
	font-family: 'prompt', sans-serif;
}

/* Preistabelle Frontend */
.cqp-price-table {
	border: 0px solid transparent;
}
.cqp-price-table td {
	border: 0px solid transparent;
	background: none;
}

/* Preiszeilen */
.cqp-price-row__label {
	color: #0d5920 !important;
	font-size: 18px;
}
.cqp-price-row__value {
	font-weight: bold;
	font-size: 18px;
}

/* Submit-Button */
#cqp-submit-btn {
	color: #157f2d;
	font-weight: bold;
	border: solid 1.5px #157f2d;
}
#cqp-submit-btn:hover {
	color: #fff;
	background: #157f2d;
	font-weight: bold;
	border: solid 1.5px #157f2d;
}

/* Zahlenfeld Preis-Hint */
.cqp-number-price {
	color: #555;
	font-weight: 600;
}

/* Sektions-Überschriften */
.cqp-section-heading {
	font-size: 1.35rem;
	padding: 10px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 0 10px -5px #0005;
}
.cqp-section-heading:hover {
	color: #157f2d;
	opacity: 1;
}

/* Radio / Ja-Nein Gruppen */
.cqp-yes-no-group,
.cqp-radio-group {
	gap: 12px;
}
.cqp-radio-label {
	font-size: 18px;
}

/* Preis-Hints */
.cqp-varkey-price-hint,
.cqp-opt-price,
.cqp-field-price-hint {
	font-size: 15px;
	font-weight: 600;
	color: #333;
}

/* ── WooCommerce Produktseite ────────────────────────────────────────────── */
.hogatek-variationen .wapf-product-totals span {
	font-family: 'prompt', sans-serif;
}
.hogatek-variationen .wapf-product-totals span.price {
	font-family: 'prompt', sans-serif;
	font-weight: bold;
	color: #0d5920;
}

.variations tr {
	display: flex;
	flex-flow: column;
}
.variations {
	margin-bottom: 0;
	margin-top: 1rem;
	font-size: 15px;
}
.variations th {
	padding: 0;
	text-align: left;
	background: transparent;
}
.variations td {
	padding: 0 0 20px 0;
	text-align: left;
	background: transparent;
}
.variations td select {
	background-color: white;
}

.single_variation_wrap::before {
	content: 'Basispreis';
	display: block;
	position: relative;
	top: -10px;
	font-size: 1.5rem;
	font-family: 'prompt', sans-serif;
	font-weight: bold;
}
.woocommerce-variation-price {
	font-family: "prompt", sans-serif;
	font-size: 18px;
	font-weight: bold;
}
.woocommerce-variation-price .price {
	color: #0d5920;
}
.woocommerce-variation-price .woocommerce-price-suffix {
	color: #666;
	font-size: 16px;
}

a.reset_variations {
	background: #777;
	padding: 4px 6px;
	color: #fff;
	font-weight: bold;
	border-radius: 3px;
}
