/* ═══════════════════════════════════════════════════════════
   Cone Customizer — Cart & Order Config Table
   Scoped to .cc-cart-config so it never touches default WooCommerce styles
   ═══════════════════════════════════════════════════════════ */

.cc-cart-config {
    margin: 12px 0 4px;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 13px;
    line-height: 1.45;
    color: #333;
    background: #fff;
    max-width: 460px;
}

/* ── Header ─────────────────────────────────────────────── */

.cc-cart-config__header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f7f7f7;
    border-bottom: 1px solid #e2e2e2;
}

.cc-cart-config__badge {
    display: inline-block;
    padding: 2px 9px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #fff;
    background: #7c5cbf;
    border-radius: 4px;
    line-height: 1.6;
}

.cc-cart-config__title {
    font-size: 13px;
    font-weight: 600;
    color: #222;
}

/* ── Preview + Logo images ──────────────────────────────── */

.cc-cart-config__images {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid #e2e2e2;
    background: #fafafa;
}

.cc-cart-config__img-wrap {
    position: relative;
    flex: 0 0 auto;
}

.cc-cart-config__img-wrap img {
    display: block;
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    background: #141418;
}

.cc-cart-config__img-wrap--logo img {
    width: 60px;
    height: 60px;
    background: #fff;
}

.cc-cart-config__img-label {
    display: block;
    text-align: center;
    font-size: 10px;
    color: #888;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* ── Config Table ───────────────────────────────────────── */

.cc-cart-config__table {
    width: 100%;
    border-collapse: collapse;
}

.cc-cart-config__table tbody + tbody .cc-cart-config__section-row td {
    border-top: 1px solid #e2e2e2;
}

.cc-cart-config__section-row td {
    padding: 7px 14px 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: #7c5cbf;
    background: #fafaff;
}

.cc-cart-config__table tr:not(.cc-cart-config__section-row) td {
    padding: 4px 14px;
}

.cc-cart-config__table tr:not(.cc-cart-config__section-row):last-child td {
    padding-bottom: 8px;
}

.cc-cart-config__label {
    width: 42%;
    color: #777;
    font-size: 12px;
    white-space: nowrap;
    vertical-align: middle;
}

.cc-cart-config__value {
    font-weight: 500;
    color: #222;
    font-size: 12px;
    vertical-align: middle;
}

/* ── Color swatch ───────────────────────────────────────── */

.cc-cart-config__color {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cc-cart-config__swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid rgba(0,0,0,0.12);
    flex-shrink: 0;
    vertical-align: middle;
}

/* ── Classic cart thumbnail override ────────────────────── */

img.cc-cart-thumb {
    max-width: 80px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

/* ── Hide default WooCommerce "key: value" wrapper for our data ── */

.wc-block-components-product-details .wc-block-components-product-details__item--cone_configuration .wc-block-components-product-details__name {
    display: none;
}

/* ═══════════════════════════════════════════════════════════
   ADMIN VARIANT  — wider card, bigger preview images
   ═══════════════════════════════════════════════════════════ */

.cc-cart-config--admin {
    max-width: 560px;
    border-color: #c3c4c7;
}

.cc-cart-config--admin .cc-cart-config__header {
    background: #f0f0f1;
}

.cc-cart-config--admin .cc-cart-config__badge {
    background: #2271b1;
}

.cc-cart-config--admin .cc-cart-config__img-wrap img {
    width: 140px;
    height: 140px;
}

.cc-cart-config--admin .cc-cart-config__img-wrap--logo img {
    width: 80px;
    height: 80px;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .cc-cart-config {
        max-width: 100%;
        font-size: 12px;
    }

    .cc-cart-config__images {
        flex-wrap: wrap;
    }

    .cc-cart-config__img-wrap img {
        width: 80px;
        height: 80px;
    }

    .cc-cart-config__img-wrap--logo img {
        width: 50px;
        height: 50px;
    }

    .cc-cart-config__label,
    .cc-cart-config__value {
        font-size: 11px;
    }

    .cc-cart-config__section-row td {
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .cc-cart-config__header {
        padding: 8px 10px;
    }

    .cc-cart-config__images {
        padding: 10px;
    }

    .cc-cart-config__table tr:not(.cc-cart-config__section-row) td {
        padding: 3px 10px;
    }

    .cc-cart-config__section-row td {
        padding: 6px 10px 3px;
    }

    .cc-cart-config__label {
        width: 46%;
    }
}
