/* ================================================================
   COPE Delivery Extras — cope-extras.css
   ================================================================ */
/* ── Options wrapper ─────────────────────────────────────── */
.cope-extras-options {
    margin: 10px 0 16px;
    padding: 16px 18px;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.9em;
    width: 60%;    
}
.cope-extras-title {
    margin: 0 0 12px;
    font-size: 1.02em;
    font-weight: 700;
    color: #222;
}
/* ── Single radio option row ─────────────────────────────── */
.cope-extras-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    cursor: pointer;
    line-height: 1.5;
    color: #444;
    border-bottom: 1px solid #ececec;
}
.cope-extras-option:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.cope-extras-option input[type="radio"],
.cope-extras-option input[type="checkbox"] {
    margin-top: 4px;
    flex-shrink: 0;
    accent-color: #1a73e8;
}
.cope-extras-option span {
    flex: 1;
}
.cope-extras-option em {
    display: block;
    font-size: 0.9em;
    color: #888;
    font-style: normal;
    margin-top: 2px;
}
.cope-extras-option a {
    color: #1a73e8;
    text-decoration: none;
    font-size: 0.92em;
}
.cope-extras-option a:hover {
    text-decoration: underline;
}

/* ── NEW compact row layout (name + price on one line, info in a popover) ── */
.cope-extras-option-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.cope-extras-option-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.cope-extras-option-name {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 1em;
    color: #222;
}
.cope-extras-option-price {
    font-weight: 600;
    color: #222;
    white-space: nowrap;
    flex-shrink: 0;
}
.cope-extras-option-sub {
    font-size: 0.84em;
    color: #888;
}
.cope-extras-option-sub a {
    color: #1a73e8;
    font-size: 1em;
}

/* Info icon button */
.cope-extras-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid #b3b3b3;
    background: #fff;
    color: #777;
    font-size: 10px;
    font-style: italic;
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1;
    padding: 0;
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color .15s ease, color .15s ease;
}
.cope-extras-info-btn:hover,
.cope-extras-info-btn:focus {
    border-color: #1a73e8;
    color: #1a73e8;
    outline: none;
}

/* Popover tooltip — hidden by default, toggled via .active */
.cope-extras-tooltip {
    display: none;
    position: absolute;
    top: 24px;
    left: 0;
    z-index: 30;
    width: 230px;
    max-width: 70vw;
    background: #fff;
    color: #555;
    font-size: 0.82em;
    font-weight: 400;
    line-height: 1.45;
    padding: 9px 11px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.14);
    white-space: normal;
}
.cope-extras-tooltip.active {
    display: block;
}
.cope-extras-tooltip::before {
    content: "";
    position: absolute;
    top: -5px;
    left: 12px;
    width: 8px;
    height: 8px;
    background: #fff;
    border-left: 1px solid #ddd;
    border-top: 1px solid #ddd;
    transform: rotate(45deg);
}
.cope-extras-tooltip a {
    font-size: 1em;
}

/* ── Divider between Sydney extras and warranty ──────────── */
.cope-extras-warranty {
    padding-top: 10px;
    margin-top: 4px;
    border-top: 1px solid #e5e5e5;
}
.cope-extras-syd-only + .cope-extras-warranty {
    border-top: 1px dashed #ddd;
}
/* ── Delivery info link ──────────────────────────────────── */
.cope-extras-delivery-info {
    margin: 6px 0 12px !important;
    font-size: 0.88em !important;
    color: #666 !important;
}
.cope-extras-delivery-info a {
    color: #1a73e8;
    text-decoration: underline;
}

/* ── Cart-level extras block (single block, applies to ALL cart items) ──
   Rendered once via woocommerce_after_cart_table — i.e. below the cart
   table / Update Cart / Proceed to Checkout row. Reuses the same option
   row look as the product page and the (retired) per-item cart block. */
.cope-extras-cart-level {
    margin: 16px 0;
    padding: 16px 18px;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.92em;
    clear: both;
}
.cope-extras-cart-title {
    margin: 0 0 10px;
    font-size: 0.98em;
}

/* Cart-level price-list rows: bigger radio, name + price on one line,
   description directly underneath (no popover — matches the approved
   cart-page reference design). */
.cope-extras-cart-option {
    align-items: flex-start;
    padding: 12px 0;
    gap: 12px;
}
.cope-extras-cart-option input[type="radio"],
.cope-extras-cart-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
}
.cope-extras-cart-option .cope-extras-option-name {
    font-size: 1.02em;
    font-weight: 700;
    color: #1a1a1a;
}
.cope-extras-cart-option .cope-extras-option-price {
    font-size: 1.02em;
    font-weight: 600;
    color: #1a73e8;
}
.cope-extras-cart-option .cope-extras-option-desc {
    font-size: 0.86em;
    color: #999;
    line-height: 1.4;
}
.cope-extras-cart-option .cope-extras-option-desc a {
    color: #1a73e8;
    font-size: 1em;
    text-decoration: underline;
}
.cope-extras-cart-option input:checked ~ .cope-extras-option-body .cope-extras-option-name {
    color: #1a73e8;
}

/* ── Call notice ─────────────────────────────────────────── */
.cope-extras-call-notice td {
    padding: 8px 0 !important;
}
.cope-extras-call-notice a {
    color: #333 !important;
}
/* ── Highlighted selected option ────────────────────────── */
.cope-extras-option input[type="radio"]:checked + span {
    color: #111;
    font-weight: 500;
}
.cope-extras-option input[type="radio"]:checked ~ .cope-extras-option-body .cope-extras-option-name,
.cope-extras-option input[type="radio"]:checked ~ .cope-extras-option-body .cope-extras-option-price {
    color: #1a73e8;
}
@media only screen and (max-width: 767px) {
    .cope-extras-options {
        width: 100%;    
    }
    .cope-extras-tooltip {
        width: 200px;
    }
    .cope-extras-cart-level {
        padding: 12px;
    }
}