/* Swotzy Shipping — checkout styles */

/* Compensate for Bootstrap .row negative margins */
.carrier-extra-content {
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
}

#swotzy-checkout-block {
    width: 100%;
    padding: 16px 0 8px;
    box-sizing: border-box;
}

/* Category section */
#swotzy-checkout-block .swotzy-category {
    margin-bottom: 20px;
}

#swotzy-checkout-block .swotzy-category-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #999;
    text-transform: uppercase;
    margin: 0 0 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

/* 2-column grid */
#swotzy-checkout-block .swotzy-rates-grid {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: 1fr 10px 1fr;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 767px) {
    #swotzy-checkout-block .swotzy-rates-grid {
        grid-template-columns: 1fr;
    }
}

/* Rate card */
#swotzy-checkout-block .swotzy-rate-item {
    position: relative;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: #fff;
    box-sizing: border-box;
}

#swotzy-checkout-block .swotzy-rate-item:hover {
    border-color: #bbb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

#swotzy-checkout-block .swotzy-rate-item.swotzy-selected {
    border-color: #2563eb;
    background: #f0f6ff;
    box-shadow: 0 2px 8px rgba(37,99,235,0.12);
}

/* Badges */
#swotzy-checkout-block .swotzy-badge-best,
#swotzy-checkout-block .swotzy-badge-fast,
#swotzy-checkout-block .swotzy-badge-promo {
    position: absolute;
    top: -1px;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 0 0 6px 6px;
    line-height: 1.6;
    color: #fff;
}

#swotzy-checkout-block .swotzy-badge-best {
    background: #22c55e;
    right: 10px;
}

#swotzy-checkout-block .swotzy-badge-fast {
    background: #ef4444;
    right: 10px;
}

#swotzy-checkout-block .swotzy-badge-best ~ .swotzy-badge-fast,
#swotzy-checkout-block .swotzy-badge-fast:not(:only-of-type) {
    right: 90px;
}

#swotzy-checkout-block .swotzy-badge-promo {
    background: #f59e0b;
    right: 10px;
}

/* Label — row: [radio] [logo+info] [price] */
#swotzy-checkout-block .swotzy-rate-label {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
    cursor: pointer;
    width: 100%;
}

#swotzy-checkout-block .swotzy-rate-label input[type="radio"] {
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #2563eb;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Left: logo + info */
#swotzy-checkout-block .swotzy-rate-left {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 10px;
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    min-width: 0;
}

/* Carrier logo image */
#swotzy-checkout-block .swotzy-carrier-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    border-radius: 6px;
}

/* Fallback abbreviation badge */
#swotzy-checkout-block .swotzy-carrier-abbr {
    display: -webkit-inline-box !important;
    display: -ms-inline-flexbox !important;
    display: inline-flex !important;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px;
    border-radius: 8px;
    background: #6366f1 !important;
    color: #fff !important;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.03em;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    text-align: center;
    line-height: 1;
}

/* Rate info */
#swotzy-checkout-block .swotzy-rate-info {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

#swotzy-checkout-block .swotzy-rate-carrier {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#swotzy-checkout-block .swotzy-rate-service {
    font-size: 12px;
    color: #555;
    line-height: 1.3;
}

#swotzy-checkout-block .swotzy-rate-eta {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: #1a1a1a;
    margin-top: 2px;
}

/* Right: price */
#swotzy-checkout-block .swotzy-rate-right {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: end;
    -ms-flex-align: end;
    align-items: flex-end;
    -ms-flex-negative: 0;
    flex-shrink: 0;
}

#swotzy-checkout-block .swotzy-price-old {
    font-size: 11px;
    color: #aaa;
    text-decoration: line-through;
    line-height: 1.2;
}

#swotzy-checkout-block .swotzy-rate-price {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
}

/* Tooltip */
#swotzy-checkout-block .swotzy-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #9ca3af;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    cursor: help;
    vertical-align: middle;
    margin-left: 3px;
    flex-shrink: 0;
    position: relative;
}


/* Parcelshop */
#swotzy-checkout-block .swotzy-parcelshop-search {
    margin: 8px 0;
}

#swotzy-checkout-block .swotzy-parcelshop-list {
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-top: 4px;
}

#swotzy-checkout-block .swotzy-parcelshop-item {
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

#swotzy-checkout-block .swotzy-parcelshop-item:last-child { border-bottom: none; }
#swotzy-checkout-block .swotzy-parcelshop-item:hover { background: #f8f8f8; }
#swotzy-checkout-block .swotzy-parcelshop-item.swotzy-selected { background: #eff6ff; }
#swotzy-checkout-block .swotzy-parcelshop-item label { margin: 0; cursor: pointer; font-size: 13px; }

/* Selection summary */
#swotzy-checkout-block .swotzy-selection-summary {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    color: #15803d;
}

#swotzy-checkout-block .swotzy-selection-summary svg {
    flex-shrink: 0;
    color: #22c55e;
}

#swotzy-checkout-block .swotzy-summary-info {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 8px;
    flex: 1;
    flex-wrap: wrap;
    font-size: 13px;
}

#swotzy-checkout-block .swotzy-summary-name {
    font-weight: 700;
    color: #166534;
}

#swotzy-checkout-block .swotzy-summary-eta {
    color: #15803d;
    font-size: 12px;
}

#swotzy-checkout-block .swotzy-summary-eta:not(:empty)::before {
    content: '· ';
}

#swotzy-checkout-block .swotzy-summary-shop {
    color: #15803d;
    font-size: 12px;
}

#swotzy-checkout-block .swotzy-summary-price {
    font-size: 16px;
    font-weight: 700;
    color: #166534;
    white-space: nowrap;
    margin-left: auto;
}
