/**
 * Book Packages & Bundles Styles
 * @package Bookshop_Essential
 */

.bookshop-package-builder {
    background: #FAF8F5;
    border: 1px solid #E4DFD5;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-sizing: border-box;
}

.package-builder-header {
    margin-bottom: 16px;
    border-bottom: 1px solid #EBE6DC;
    padding-bottom: 12px;
}

.package-builder-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.package-builder-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #12372D;
    margin: 0;
}

.package-rule-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    background: #E8F0E8;
    color: #12372D;
    border: 1px solid #C8DBC8;
}

.package-builder-sub {
    font-size: 0.875rem;
    color: #68645C;
    margin: 0;
}

.package-book-items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.package-book-row {
    display: flex;
    align-items: center;
    background: #FFFFFF;
    border: 1px solid #E8E3D7;
    border-radius: 8px;
    padding: 12px 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.package-book-row.is-selected {
    border-color: #12372D;
    background: #FCFDFB;
}

.package-book-row:hover {
    border-color: #C79A57;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.package-book-row.is-out-of-stock {
    opacity: 0.6;
    cursor: not-allowed;
    background: #F4F4F4;
}

.row-checkbox {
    margin-right: 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.row-checkbox input[type="checkbox"] {
    width: 19px;
    height: 19px;
    cursor: pointer;
    accent-color: #12372D;
}

.row-thumbnail {
    width: 48px;
    height: 68px;
    flex-shrink: 0;
    margin-right: 14px;
    border-radius: 4px;
    overflow: hidden;
    background: #F5F2EA;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    text-decoration: none;
}

.row-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.row-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.row-book-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #173D2D;
    line-height: 1.35;
    text-decoration: none;
}

.row-book-title:hover {
    color: #996A2C;
    text-decoration: underline;
}

.row-book-author {
    font-size: 0.8125rem;
    color: #68645C;
    margin-top: 2px;
}

.row-book-desc {
    font-size: 0.8125rem;
    color: #4E5D53;
    line-height: 1.45;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.row-badges {
    margin-top: 4px;
    display: flex;
    gap: 6px;
    align-items: center;
}

.row-included-tag {
    font-size: 0.7rem;
    font-weight: 700;
    color: #1E5631;
    background: #EDF5EE;
    padding: 2px 7px;
    border-radius: 4px;
}

.row-stock-status {
    font-size: 0.75rem;
    color: #B33A3A;
    font-weight: 600;
}

.row-price {
    flex-shrink: 0;
    margin-left: 12px;
    font-weight: 700;
    color: #12372D;
    font-size: 0.95rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.row-reg-price {
    font-size: 0.78rem;
    color: #94A3B8;
    font-weight: 500;
}

.package-min-alert {
    color: #991B1B;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 6px;
    padding: 9px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 10px;
}

.package-live-summary {
    background: #FFFFFF;
    border: 1px dashed #C79A57;
    border-radius: 6px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.package-live-summary .summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9375rem;
}

.package-live-summary .line-discount {
    color: #4F6357;
    font-weight: 500;
}

.package-live-summary .line-total {
    border-top: 1px solid #EEE;
    padding-top: 8px;
    margin-top: 4px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #12372D;
}

.package-live-summary .final-price-display {
    color: #12372D;
    font-size: 1.15rem;
}

@media (max-width: 480px) {
    .package-book-row {
        padding: 8px 10px;
    }
    .row-thumbnail {
        width: 36px;
        height: 48px;
        margin-right: 8px;
    }
    .row-book-title {
        font-size: 0.875rem;
    }
    .row-price {
        font-size: 0.875rem;
    }
}
