/* ============================================================
   Custom Quote Plugin – Formular-Styles
   ============================================================ */
/* Wrapper */
.cqp-quote-form-wrapper {
    margin-top: 48px;
    padding: 32px;
    background: #fafafa;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
}

/* Überschrift */
.cqp-heading {
    margin: 0 0 8px;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a2e;
}

/* Intro-Text */
.cqp-intro {
    margin: 0 0 24px;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Fehlermeldung */
.cqp-notice {
    padding: 12px 16px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.cqp-notice--error {
    background: #fff0f0;
    border: 1px solid #f5a0a0;
    color: #c0392b;
}

.cqp-notice--success {
    background: #f0fff4;
    border: 1px solid #6fcf97;
    color: #219653;
}

/* Zeilen */
.cqp-row {
    display: flex;
    gap: 20px;
    margin-bottom: 0;
}

.cqp-row--2col .cqp-field {
    flex: 1 1 0;
}

/* Einzelfeld */
.cqp-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}

.cqp-field label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.cqp-required {
    color: #e74c3c;
}

.cqp-field input,
.cqp-field textarea {
    padding: 10px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 5px;
    font-size: 0.95rem;
    color: #333;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.cqp-field input:focus,
.cqp-field textarea:focus {
    border-color: #1a1a2e;
    box-shadow: 0 0 0 3px rgba(26, 26, 46, 0.08);
}

.cqp-field textarea {
    resize: vertical;
    min-height: 100px;
}

/* Aktionen */
.cqp-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* Button */
.cqp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.cqp-btn--primary {
    background: #1a1a2e;
    color: #fff;
}

.cqp-btn--primary:hover {
    background: #2d2d4e;
}

.cqp-btn--primary:active {
    transform: scale(0.98);
}

.cqp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Datenschutz-Hinweis */
.cqp-privacy {
    font-size: 0.8rem;
    color: #888;
    margin: 0;
    line-height: 1.4;
}

.cqp-privacy a {
    color: #555;
}

/* Responsive */
@media (max-width: 600px) {
    .cqp-quote-form-wrapper {
        padding: 20px;
    }

    .cqp-row--2col {
        flex-direction: column;
        gap: 0;
    }

    .cqp-actions {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================================
   Cart Summary (Shortcode [cqp_cart_summary])
   ============================================================ */

.cqp-cart-summary {
    margin-bottom: 32px;
}

.cqp-cart-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 36px 16px 0; /* Rechts Platz für ×-Button */
    border-bottom: 1px solid #eee;
    position: relative;
}

.cqp-cart-item:first-child {
    border-top: 1px solid #eee;
}

.cqp-cart-item__image {
    flex-shrink: 0;
}

.cqp-cart-item__image img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e2e2e2;
}

.cqp-cart-item__details {
    flex: 1 1 auto;
    min-width: 0; /* verhindert Overflow in Flex */
}

.cqp-cart-item__name {
    display: block;
    font-size: 1rem;
    line-height: 1.4;
}

.cqp-cart-item__name a {
    color: inherit;
    text-decoration: none;
}

.cqp-cart-item__name a:hover {
    text-decoration: underline;
}

.cqp-cart-item__sku {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-top: 2px;
}

.cqp-cart-item__options {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.875rem;
    color: #555;
}

.cqp-cart-item__options li {
    margin-bottom: 3px;
}

.cqp-opt-label {
    font-weight: 600;
    margin-right: 4px;
}

.cqp-opt-price {
    color: #888;
    font-size: 0.8rem;
    margin-left: 4px;
}

.cqp-cart-item__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    white-space: nowrap;
    font-size: 0.9rem;
}

.cqp-cart-item__qty {
    color: #888;
}

.cqp-cart-item__price {
    font-weight: 700;
}

.cqp-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0 0;
    font-size: 1rem;
    font-weight: 700;
}

.cqp-empty-cart {
    color: #888;
    font-style: italic;
}

/* Shortcode-Wrapper */
.cqp-shortcode-wrap {
    max-width: 100%;
}

/* Responsive */
@media (max-width: 480px) {
    .cqp-cart-item__image img {
        width: 52px;
        height: 52px;
    }
    .cqp-cart-item {
        gap: 10px;
    }
}

/* ── Preisaufschlüsselung pro Position ─────────────────────── */

.cqp-cart-item__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.cqp-cart-item__baseprice {
    font-size: 0.9rem;
    color: #555;
    white-space: nowrap;
}

.cqp-cart-item__opts-total {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #555;
    border-top: 1px dashed #e0e0e0;
    margin-top: 8px;
    padding-top: 6px;
}

.cqp-cart-item__line-total {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    font-weight: 700;
    border-top: 1px solid #ddd;
    margin-top: 6px;
    padding-top: 6px;
}

/* Meta-Spalte (qty) ausblenden wenn Preis inline steht */
.cqp-cart-item__meta {
    display: none;
}

/* ── Remove-Button ─────────────────────────────────────────── */

.cqp-cart-item {
    position: relative;
}

.cqp-cart-item__remove-wrap {
    position: absolute;
    top: 14px;
    right: 0;
}

.cqp-remove-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid #ddd;
    border-radius: 50%;
    background: #fff;
    color: #999;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    padding: 0;
}

.cqp-remove-item:hover {
    background: #e74c3c;
    border-color: #e74c3c;
    color: #fff;
}

/* Während Entfernen: Zeile ausgrauen */
.cqp-cart-item--removing {
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.2s;
}

/* Kleinen Rechts-Abstand für die Details damit Button nicht überlappt */
.cqp-cart-item__details {
    padding-right: 36px;
}

/* ── Summenblock (Netto / MwSt. / Brutto) ──────────────────── */

.cqp-cart-totals {
    margin-top: 8px;
}

.cqp-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.cqp-cart-total--net {
    border-top: 1px solid #eee;
    font-size: 0.95rem;
}

.cqp-cart-total--tax {
    font-size: 0.875rem;
    color: #888;
}

.cqp-cart-total--gross {
    border-top: 2px solid #333;
    font-size: 1.05rem;
    font-weight: 700;
    padding-top: 10px;
    margin-top: 2px;
}

/* ── Bearbeiten-Link im Warenkorb ──────────────────────────── */

.cqp-edit-item {
    display: inline-block;
    font-size: 0.8rem;
    color: #2271b1;
    text-decoration: none;
    margin: 4px 0 6px;
    opacity: 0.85;
    transition: opacity 0.15s;
}
.cqp-edit-item:hover { opacity: 1; text-decoration: underline; }
