/* Cart page and tests-listing mini cart */
/* ---- Cart: item list + summary sidebar ---- */
.cart-page { align-items: flex-start; }
.cart-items-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.cart-items-head h3 { margin: 0; font-size: 24px; color: #004E75; }
.cart-items-head p { margin: 2px 0 0; color: #6c7a89; font-size: 14px; }
.cart-continue { color: #00A0A3; font-weight: 500; white-space: nowrap; }
.cart-continue:hover { color: #004E75; }
.cart-group { background: #fff; border: 1px solid #e6eef2; border-radius: 12px; margin-bottom: 20px; overflow: hidden; }
.cart-group-title { display: flex; align-items: center; gap: 10px; padding: 14px 20px; background: #f3f6fb; font-weight: 600; color: #004E75; font-size: 16px; }
.cart-group-count { background: #00A0A3; color: #fff; border-radius: 20px; font-size: 12px; line-height: 20px; min-width: 24px; padding: 0 8px; text-align: center; }
.cart-list { margin: 0; padding: 0; list-style: none; }
.cart-item { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-top: 1px solid #eef2f5; }
.cart-item:first-child { border-top: 0; }
.cart-item-icon { flex: 0 0 40px; height: 40px; border-radius: 10px; background: #e6f6f6; color: #00A0A3; display: flex; align-items: center; justify-content: center; }
.cart-item-name { flex: 1 1 auto; min-width: 0; color: #1d2c3b; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.cart-item-price { flex: 0 0 auto; font-weight: 600; color: #004E75; white-space: nowrap; }
.cart-item-note { flex: 0 0 auto; font-weight: 600; color: #00A0A3; white-space: nowrap; }
.cart-item-remove { flex: 0 0 36px; height: 36px; border: 0; border-radius: 8px; background: #fdecec; color: #dc3545; cursor: pointer; transition: all 200ms ease; }
.cart-item-remove:hover { background: #dc3545; color: #fff; }
.cart-summary { position: sticky; top: 110px; background: #fff; border: 1px solid #e6eef2; border-radius: 12px; padding: 24px; box-shadow: 0 10px 30px rgba(0, 78, 117, 0.06); }
.cart-summary h4 { margin: 0 0 16px; font-size: 20px; color: #004E75; }
.cart-summary-rows { margin: 0 0 16px; }
.cart-summary-rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; color: #4a5a6a; }
.cart-summary-rows dt { font-weight: 400; }
.cart-summary-rows dd { margin: 0; font-weight: 600; color: #1d2c3b; white-space: nowrap; }
.cart-summary-rows .cart-summary-total { border-top: 1px solid #e6eef2; margin-top: 8px; padding-top: 14px; font-size: 18px; }
.cart-summary-rows .cart-summary-total dt, .cart-summary-rows .cart-summary-total dd { font-weight: 700; color: #004E75; }
.cart-note { display: flex; gap: 10px; align-items: flex-start; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; font-size: 14px; }
.cart-note p { margin: 0; font-size: 14px; line-height: 1.5; color: inherit; }
.cart-note i { margin-top: 3px; }
.cart-note-info { background: #e6f6f6; color: #0c5460; }
.cart-note-warning { background: #fff4e5; color: #8a5300; }
.cart-btn { display: flex !important; align-items: center; justify-content: center; width: 100%; margin-top: 12px; text-align: center; }
.cart-checkout-wrap.is-disabled { cursor: not-allowed; }
.cart-checkout-wrap.is-disabled .cart-btn { opacity: 0.5; pointer-events: none; }
@media (max-width: 991px) {
    .cart-summary { position: static; margin-top: 10px; }
}
@media (max-width: 575px) {
    .cart-item { flex-wrap: wrap; gap: 10px 12px; padding: 14px 16px; }
    .cart-item-icon { display: none; }
    .cart-item-name { flex: 1 0 100%; }
    .cart-item-price { margin-right: auto; }
    .cart-summary { padding: 18px; }
}

/* Mini cart in the tests listing sidebar (pages/individuals) */
.mini-cart { padding: 18px; }
.mini-cart-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.mini-cart-head h4 { margin: 0; font-size: 18px; color: #004E75; }
.mini-cart .cart-group { margin-bottom: 14px; }
.mini-cart .cart-group-title { padding: 10px 14px; font-size: 14px; }
.mini-cart .cart-item { flex-wrap: wrap; gap: 6px 10px; padding: 12px 14px; }
.mini-cart .cart-item-name { flex: 1 0 100%; font-size: 14px; }
.mini-cart .cart-item-price { margin-right: auto; font-size: 14px; }
.mini-cart .cart-item-remove { flex-basis: 32px; height: 32px; }

/* The tests sidebar wraps the mini cart in section.appointment-section > .auto-container,
   whose padding left ~190px for the cart inside a 290px column. */
#individuals > .appointment-section { padding: 0; }
#individuals > .appointment-section > .auto-container { padding-left: 0; padding-right: 0; max-width: none; }

/* ---- Cart actions without reloads (SiteCart in layouts/scripts.blade.php) ---- */

/* Package card: whole card links to details via the stretched title link; cart button above it */
.package-card { position: relative; }
.package-card.is-in-cart { border-color: #bfe7e7; }
.package-card-link { color: inherit; }
.package-card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.package-card-link:hover { color: #00A0A3; }
.package-card-actions { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; }
.package-card-details {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 14px;
    border: 1px solid #00A0A3;
    border-radius: 30px;
    color: #00A0A3;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}
.package-card-details:hover { background: #004E75; border-color: #004E75; color: #fff; }
/* Add / remove: icon-only round button, "+" to add and "−" to remove */
.package-card-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #00A0A3;
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: background 200ms ease, opacity 200ms ease;
}
.package-card-cart:hover { background: #004E75; }
.package-card-cart .cart-icon-remove { display: none; }
.package-card-cart.is-in-cart .cart-icon-add { display: none; }
.package-card-cart.is-in-cart .cart-icon-remove { display: inline-block; }
.package-card-cart i { margin: 0; }

/* Busy state while a cart request is running */
.atc-btn.is-busy,
[data-cart-toggle].is-busy { opacity: 0.6; pointer-events: none; }
.atc-btn.is-busy i::before,
.package-card-cart.is-busy .cart-icon-add::before,
.package-card-cart.is-busy .cart-icon-remove::before { content: "\f110"; display: inline-block; animation: cart-spin 0.8s linear infinite; }
@keyframes cart-spin { to { transform: rotate(360deg); } }

/* Header cart badge bump when the count changes */
.cart-btn-top.cart-bump { animation: cart-bump 450ms ease; }
@keyframes cart-bump {
    0% { transform: scale(1); }
    35% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

/* Cart rows fade out while being removed */
.cart-item.is-removing { opacity: 0.4; pointer-events: none; transition: opacity 200ms ease; }

/* Generic toggles: the add-only icon hides once the item is in the cart */
[data-cart-toggle].is-in-cart .icon-add { display: none; }

/* Remove state ("−") is red everywhere: test cards and package cards */
.atc-btn:has(> .fa-minus),
.package-card-cart.is-in-cart {
    background: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #fff !important;
}
.atc-btn:has(> .fa-minus):hover,
.package-card-cart.is-in-cart:hover {
    background: #b02a37 !important;
    border-color: #b02a37 !important;
}
.atc-btn:has(> .fa-minus)::before { background: #b02a37 !important; }

/* Delete / trash icons are red across the website and dashboards */
i.fa-trash, i.fa-trash-alt { color: #dc3545; }
.cart-item-remove i { color: inherit; }

/* Empty cart: red outline button, solid red on hover (cart page + tests mini cart) */
.cart-btn.cart-btn-empty {
    color: #dc3545 !important;
    border: 1px solid #f3c6c6 !important;
    background: #fff !important;
}
.cart-btn.cart-btn-empty::before { display: none !important; }
.cart-btn.cart-btn-empty i { color: inherit !important; }
.cart-btn.cart-btn-empty:hover {
    color: #fff !important;
    background: #dc3545 !important;
    border-color: #dc3545 !important;
}

/* ---- Recommendations modal (cart page) ---- */
#checkrecommendation.is-loading { pointer-events: none; opacity: 0.75; }
#checkrecommendation.is-loading i::before { content: "\f110"; display: inline-block; animation: cart-spin 0.8s linear infinite; }
.reco-modal .modal-content { border: 0; border-radius: 18px; overflow: hidden; }
.reco-modal .modal-header { align-items: flex-start; padding: 22px 24px 16px; border-bottom: 1px solid #eef2f5; }
.reco-modal .modal-title { font-size: 20px; font-weight: 700; color: #004E75; margin: 0 0 4px; }
.reco-subtitle { margin: 0; font-size: 14px; line-height: 1.5; color: #6c7a89; }
.reco-modal .close { width: 36px; height: 36px; margin: -4px -6px 0 12px; padding: 0; border-radius: 50%; background: #eef2f5 !important; color: #4a5a6a; font-size: 22px; line-height: 1; opacity: 1; text-shadow: none; }
.reco-modal .close:hover { background: #004E75 !important; color: #fff; }
.reco-modal .close span { color: inherit !important; background: none !important; padding: 0 !important; width: auto !important; border-radius: 0 !important; font-size: 22px; line-height: 1; }
.reco-modal .modal-body { padding: 20px 24px 24px; background: #f7fafb; }
.reco-card {
    background: #fff;
    border: 1px solid #e6eef2;
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 14px;
    transition: border-color 200ms ease, box-shadow 200ms ease;
}
.reco-card:hover { border-color: #bfe7e7; box-shadow: 0 10px 26px rgba(0, 78, 117, 0.08); }
.reco-card.is-best { border-color: #00A0A3; }
.reco-card-head { display: flex; align-items: center; gap: 14px; }
.reco-logo {
    flex: 0 0 56px; width: 56px; height: 56px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid #eef2f5; border-radius: 12px; background: #fff; overflow: hidden;
    color: #00A0A3; font-size: 22px;
}
.reco-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.reco-info { flex: 1 1 auto; min-width: 0; }
.reco-info h6 { margin: 0 0 4px; font-size: 16px; font-weight: 700; color: #1d2c3b; line-height: 1.35; }
.reco-info p { margin: 0; font-size: 13px; color: #6c7a89; }
.reco-info p i { color: #00A0A3; margin-right: 4px; }
.reco-badge {
    display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 20px;
    background: #e6f6f6; color: #00787a; font-size: 11px; font-weight: 600; vertical-align: middle;
}
.reco-coverage { flex: 0 0 auto; text-align: center; line-height: 1.1; }
.reco-coverage strong { display: block; font-size: 20px; color: #004E75; }
.reco-coverage span { font-size: 12px; color: #6c7a89; }
.reco-progress { height: 6px; margin: 14px 0 12px; border-radius: 6px; background: #eef2f5; overflow: hidden; }
.reco-progress span { display: block; height: 100%; border-radius: 6px; background: #00A0A3; }
.reco-items { list-style: none; margin: 0; padding: 0; }
.reco-items li {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 0; border-bottom: 1px dashed #eef2f5; font-size: 14px; color: #1d2c3b;
}
.reco-items li:last-child { border-bottom: 0; }
.reco-items li i { color: #00A0A3; flex: 0 0 16px; }
.reco-items li span { flex: 1 1 auto; min-width: 0; }
.reco-items li b { flex: 0 0 auto; font-weight: 600; color: #004E75; white-space: nowrap; }
.reco-card-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    margin-top: 12px; padding-top: 12px; border-top: 1px solid #eef2f5;
}
.reco-total { font-size: 14px; color: #6c7a89; }
.reco-total strong { margin-left: 6px; font-size: 18px; color: #004E75; }
.reco-choose {
    display: inline-flex; align-items: center; gap: 8px;
    height: 42px; padding: 0 20px; border: 0; border-radius: 30px;
    background: #00A0A3; color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
    transition: background 200ms ease;
}
.reco-choose:hover { background: #004E75; }
.reco-choose:disabled { opacity: 0.6; cursor: wait; }
.reco-note { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 0; font-size: 13px; color: #6c7a89; }
.reco-note i { color: #00A0A3; margin-top: 2px; }
.reco-empty { text-align: center; padding: 30px 0; color: #6c7a89; }
.reco-empty i { font-size: 34px; color: #00A0A3; margin-bottom: 10px; }
@media (max-width: 575px) {
    .reco-modal .modal-header, .reco-modal .modal-body { padding-left: 16px; padding-right: 16px; }
    .reco-card-head { flex-wrap: wrap; }
    .reco-choose { width: 100%; justify-content: center; }
}

/* ---- Checkout step three (review & pay) ---- */
.co3 { padding: 40px 0 80px; }
.co3-card { background: #fff; border: 1px solid #e6eef2; border-radius: 16px; box-shadow: 0 10px 30px rgba(0, 78, 117, 0.05); margin-bottom: 20px; }
.co3-card-head { padding: 16px 22px; border-bottom: 1px solid #eef2f5; }
.co3-card-head h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 18px; font-weight: 700; color: #004E75; }
.co3-card-head h3 i {
    width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px; background: #e6f6f6; color: #00A0A3; font-size: 14px;
}
.co3-card-body { padding: 20px 22px; }
.co3-details { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.co3-detail { padding: 12px 14px; border-radius: 12px; background: #f7fafb; border: 1px solid #eef2f5; min-width: 0; }
.co3-detail span { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 600; letter-spacing: .3px; text-transform: uppercase; color: #8a97a6; }
.co3-detail strong { display: block; font-size: 15px; font-weight: 600; color: #1d2c3b; overflow-wrap: anywhere; }
.co3-detail-wide { grid-column: span 2; }
.co3-lines { list-style: none; margin: 0; padding: 0; }
.co3-lines li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 22px; border-bottom: 1px solid #eef2f5; }
.co3-lines li:last-child { border-bottom: 0; }
.co3-line-name { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 15px; font-weight: 600; color: #1d2c3b; }
.co3-line-name i { flex: 0 0 18px; color: #00A0A3; }
.co3-line-name em { font-style: normal; font-weight: 500; color: #6c7a89; margin-left: 4px; }
.co3-line-price { flex: 0 0 auto; font-size: 15px; font-weight: 600; color: #004E75; white-space: nowrap; }
.co3-line-muted .co3-line-name, .co3-line-muted .co3-line-price { font-weight: 500; color: #6c7a89; }
.co3-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.co3-method {
    position: relative; display: flex; align-items: center; gap: 12px;
    padding: 16px 18px; border: 1px solid #e5eded; border-radius: 14px; background: #fff; cursor: pointer;
    transition: border-color 200ms ease, box-shadow 200ms ease, background 200ms ease;
}
.co3-method:hover { border-color: #bfe7e7; }
.co3-method.activemethod { background: #f2fbfb !important; border-color: #00A0A3; box-shadow: 0 0 0 3px rgba(0, 160, 163, 0.12); color: inherit !important; }
.co3-method-icon { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: #e6f6f6; color: #00A0A3; }
.co3-method-name { flex: 1 1 auto; font-size: 15px; font-weight: 600; color: #1d2c3b; }
.co3-method-check {
    width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center;
    border: 2px solid #cfdbe0; border-radius: 50%; color: transparent; font-size: 10px;
}
.co3-method.activemethod .co3-method-check { background: #00A0A3; border-color: #00A0A3; color: #fff; }
.co3-label { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 700; color: #004E75; }
.co3 .select2-container--default .select2-selection--single { height: 48px; border-radius: 12px; }
.co3 .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 48px; }
.co3 .select2-container--default .select2-selection--single .select2-selection__arrow { height: 48px; }
.co3-promo { display: flex; gap: 8px; }
.co3-promo input {
    flex: 1 1 auto; min-width: 0; height: 48px; padding: 0 16px;
    border: 1px solid #e5eded; border-radius: 12px; font-size: 15px; color: #1d2c3b; outline: none;
}
.co3-promo input:focus { border-color: #00A0A3 !important; box-shadow: 0 0 0 3px rgba(0, 160, 163, 0.12); }
.co3-promo-btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: 48px; padding: 0 20px; border-radius: 12px; background: #00A0A3; color: #fff !important;
    font-size: 15px; font-weight: 600; cursor: pointer; transition: background 200ms ease;
}
.co3-promo-btn:hover { background: #004E75; }
.co3-promo-btn.is-remove { background: #fff; border: 1px solid #f3c6c6; color: #dc3545 !important; }
.co3-promo-btn.is-remove:hover { background: #dc3545; color: #fff !important; }
.co3-summary { position: sticky; top: 110px; background: #fff; border: 1px solid #e6eef2; border-radius: 16px; padding: 22px; box-shadow: 0 10px 30px rgba(0, 78, 117, 0.06); margin-bottom: 20px; }
.co3-summary h3 { margin: 0 0 14px; font-size: 20px; font-weight: 700; color: #004E75; }
.co3-rows { margin: 0 0 16px; }
.co3-rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 15px; color: #4a5a6a; }
.co3-rows dt { font-weight: 500; }
.co3-rows dd { margin: 0; font-weight: 600; color: #1d2c3b; white-space: nowrap; }
.co3-rows .co3-promo-row:empty { display: none; }
.co3-rows .co3-discount, .co3-rows #promoCodePrice { color: #1e8a4c; }
.co3-rows .co3-total { margin-top: 8px; padding-top: 14px; border-top: 1px solid #e6eef2; font-size: 19px; }
.co3-rows .co3-total dt, .co3-rows .co3-total dd { font-weight: 700; color: #004E75; }
.co3-agree { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; padding: 14px; border-radius: 12px; background: #f7fafb; }
.co3-check { display: flex; align-items: flex-start; gap: 10px; margin: 0; font-size: 14px; color: #4a5a6a; cursor: pointer; }
.co3-check input { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 2px; accent-color: #00A0A3; cursor: pointer; }
.co3-check a { color: #00A0A3; text-decoration: underline; }
.co3-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
    height: 50px; border-radius: 30px; font-size: 16px; font-weight: 600; cursor: pointer;
    transition: background 200ms ease, color 200ms ease, opacity 200ms ease;
}
.co3-btn-primary { background: #00A0A3; color: #fff !important; box-shadow: 0 10px 24px rgba(0, 160, 163, 0.22); }
.co3-btn-primary:hover { background: #004E75; }
.co3-order { margin-bottom: 10px; }
.co3-order:not(.is-ready) .co3-btn-primary { opacity: .5; box-shadow: none; }
.co3-btn-outline { border: 1px solid #cfe3e6; color: #004E75 !important; background: #fff; }
.co3-btn-outline:hover { background: #004E75; border-color: #004E75; color: #fff !important; }
@media (max-width: 991px) {
    .co3-summary { position: static; }
}
@media (max-width: 575px) {
    .co3 { padding: 24px 0 50px; }
    .co3-card-head, .co3-card-body { padding-left: 16px; padding-right: 16px; }
    .co3-lines li { padding-left: 16px; padding-right: 16px; }
    .co3-details { grid-template-columns: 1fr 1fr; }
    .co3-detail-wide { grid-column: 1 / -1; }
}
/* Trash icons on a red button (e.g. remove prescription) stay white */
.bg-danger i.fa-trash, .bg-danger i.fa-trash-alt,
.btn-danger i.fa-trash, .btn-danger i.fa-trash-alt { color: #fff !important; }
/* Buttons waiting for a request */
.theme-btn-one.is-loading, button.is-loading { opacity: .65; pointer-events: none; }
.theme-btn-one.is-loading::after, button.is-loading::after {
    content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 8px; vertical-align: -2px;
    border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: cart-spin .7s linear infinite;
}
/* Checkout step three: promo code card above the sticky summary */
.co3-side { position: sticky; top: 110px; }
.co3-side .co3-summary { position: static; }
.co3-promo-card { background: #fff; border: 1px solid #e6eef2; border-radius: 16px; padding: 18px 22px; margin-bottom: 16px; box-shadow: 0 10px 30px rgba(0, 78, 117, 0.05); }
.co3-promo-card .co3-label { display: flex; align-items: center; gap: 8px; }
.co3-promo-card .co3-label i { color: #00A0A3; }
.co3-promo-card .co3-promo-btn { padding: 0 16px; }
@media (max-width: 991px) { .co3-side { position: static; } }
/* Payment method in the side column: options stacked */
.co3-pay-card { margin-bottom: 16px; }
.co3-pay-card .co3-card-head { padding: 14px 20px; }
.co3-pay-card .co3-card-head h3 { font-size: 16px; }
.co3-pay-card .co3-card-body { padding: 14px 16px; }
.co3-pay-card .co3-methods { grid-template-columns: 1fr; gap: 10px; }
.co3-pay-card .co3-method { padding: 12px 14px; }
.co3-side .co3-pay-card { box-shadow: 0 10px 30px rgba(0, 78, 117, 0.05); }
