/* filepath: website_sale_aplicoop/static/src/css/components/cart.css */

/**
 * Shopping cart component styles
 */

.sticky-cart {
    top: 20px;
}

.cart-header {
    background-color: var(--primary-color);
    color: white;
    padding: 0.25rem;
    border-radius: 0.25rem 0.25rem 0 0;
}

.cart-header h5 {
    color: white;
    margin: 0;
}

.cart-header .btn {
    color: white;
}

.cart-items {
    max-height: 400px;
    overflow-y: auto;
}

#cart-items-container {
    padding: 0.2rem 0.4rem;
}

#cart-items-container .list-group {
    margin-bottom: 0;
}

#cart-items-container p.text-muted {
    margin: 0.4rem 0;
}

.list-group-item {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid #e0e0e0;
}

.list-group-item.d-flex {
    gap: 0.5rem;
    flex-direction: column;
}

.list-group-item h6 {
    margin: 0;
    margin-bottom: 0.2rem;
    font-weight: 600;
    word-break: break-word;
    font-size: 0.875rem;
    line-height: 1.3;
}

.list-group-item small {
    display: block;
    font-size: 0.75rem;
    color: #6c757d;
}

.list-group-item .d-flex {
    min-width: auto;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.list-group-item .remove-from-cart {
    flex-shrink: 0;
    min-width: 24px;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem 0.25rem;
    font-size: 0.7rem;
    cursor: pointer;
    background-color: #dc3545;
    color: #ffffff;
    border: 1px solid #dc3545;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.list-group-item .remove-from-cart:hover {
    background-color: #bb2d3b;
    border-color: #bb2d3b;
    transform: scale(1.05);
}

.list-group-item .remove-from-cart i {
    font-size: 0.85rem;
    color: #ffffff;
}

.list-group-item strong {
    min-width: 60px;
    text-align: right;
    white-space: nowrap;
    font-size: 0.875rem;
    color: #667eea;
}

.list-group-item.d-flex > div:first-child {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.list-group-item.d-flex > div:first-child h6 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.cart-total {
    padding: 1rem;
    background-color: #f8f9fa;
    font-size: 1.5rem;
    font-weight: 700;
    border-top: 2px solid var(--primary-color);
    text-align: right;
    color: var(--primary-color);
}

.cart-item-remove {
    cursor: pointer;
    color: #dc3545;
    font-size: 0.7rem;
}

.cart-item-remove:hover {
    text-decoration: underline;
}

/* Cart header buttons styling */
#save-cart-btn,
#reload-cart-btn {
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-right: 0.25rem;
    color: white;
}

#save-cart-btn {
    background-color: #007bff;
    border-color: #0056b3;
}

#save-cart-btn:hover {
    background-color: #0056b3;
    border-color: #004085;
    box-shadow: 0 4px 8px rgba(0, 86, 179, 0.3);
}

#save-cart-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 4px rgba(0, 86, 179, 0.3);
}

#reload-cart-btn {
    background-color: #17a2b8;
    border-color: #117a8b;
}

#reload-cart-btn:hover {
    background-color: #117a8b;
    border-color: #0c5460;
    box-shadow: 0 4px 8px rgba(17, 122, 139, 0.3);
}

#reload-cart-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 4px rgba(17, 122, 139, 0.3);
}

.card-header .btn-group {
    flex-shrink: 0;
}

#cart-title {
    font-size: 1.2rem;
}

.cart-btn-group-nowrap,
.cart-btn-group {
    flex-wrap: nowrap;
}

.cart-header-btn {
    padding: 0.25rem;
}

.cart-icon-size {
    font-size: 0.9rem;
}

.cart-body-text {
    font-size: 1.1rem;
}

.cart-body-lg {
    font-size: 1.1rem;
}

.cart-title-lg {
    font-size: 1.5rem;
}

.cart-title-sm {
    font-size: 1.1rem;
}

.cart-btn-compact {
    padding: 0.1rem;
    min-width: auto;
    font-size: 0.5rem;
    line-height: 0.5;
    height: auto;
}

.cart-sticky-position {
    top: 20px;
}
