/* Basket functionality styles */

/* Basket view indicator */
.basket-view-indicator {
    background: #e8f5e8 !important;
    border: 1px solid #4caf50 !important;
    border-radius: 8px !important;
    padding: 12px !important;
    margin-bottom: 16px !important;
    text-align: center !important;
    font-size: 14px !important;
}

.basket-indicator-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.basket-icon {
    font-size: 18px;
}

.basket-text {
    color: #2e7d32;
}

.back-link {
    color: #1976d2;
    text-decoration: none;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.back-link:hover {
    background: rgba(25, 118, 210, 0.1);
    text-decoration: underline;
}

/* Basket icon styling */
.basket-icon-img {
    width: 16px;
    height: 16px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.2s ease;
}

.basket-icon-img:hover {
    opacity: 1;
    transform: scale(1.1);
    filter: brightness(0) saturate(100%) invert(45%) sepia(85%) saturate(2270%) hue-rotate(25deg) brightness(102%) contrast(98%);
}

/* Basket page styles */
.baskets-container {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.baskets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.baskets-header h1 {
    margin: 0;
    color: var(--text-color);
}

.create-basket-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background 0.2s ease;
}

.create-basket-btn:hover {
    background: #1976d2;
}

.baskets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.basket-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.basket-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.basket-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.basket-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
    cursor: pointer;
}

.basket-name:hover {
    color: var(--primary-color);
}

.basket-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.basket-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.basket-btn {
    padding: 0.375rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    background: white;
    transition: all 0.2s ease;
}

.basket-btn:hover {
    background: #f5f5f5;
}

.basket-btn.primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.basket-btn.primary:hover {
    background: #1976d2;
    border-color: #1976d2;
}

.basket-btn.danger {
    background: #f44336;
    color: white;
    border-color: #f44336;
}

.basket-btn.danger:hover {
    background: #d32f2f;
    border-color: #d32f2f;
}

.basket-products {
    padding: 1rem 1.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.basket-product-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.basket-product-item:last-child {
    border-bottom: none;
}

.basket-product-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
    background: #f8f8f8;
}

.basket-product-info {
    flex: 1;
}

.basket-product-name {
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0 0 0.25rem 0;
    line-height: 1.2;
}

.basket-product-meta {
    font-size: 0.8rem;
    color: #666;
}

.basket-product-remove {
    background: none;
    border: none;
    color: #f44336;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.basket-product-remove:hover {
    background: #fff5f5;
}

/* Basket modal styles */
.basket-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.basket-modal-overlay.active {
    opacity: 1;
}

.basket-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
}

.basket-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.basket-modal-header h3 {
    margin: 0;
    color: var(--text-color);
}

.basket-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.basket-modal-close:hover {
    background: #f5f5f5;
}

.basket-modal-content {
    padding: 1.5rem;
}

.basket-modal-content label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.basket-modal-content input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.basket-modal-content input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.basket-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding: 1.5rem;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.basket-modal-actions button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.basket-modal-actions .btn-cancel {
    background: #6c757d;
    color: white;
}

.basket-modal-actions .btn-cancel:hover {
    background: #5a6268;
}

.basket-modal-actions .btn-confirm {
    background: var(--primary-color);
    color: white;
}

.basket-modal-actions .btn-confirm:hover {
    background: #1976d2;
}

/* Empty state */
.empty-baskets {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.empty-baskets h2 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.empty-baskets p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .baskets-container {
        padding: 1rem;
    }
    
    .baskets-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .basket-modal {
        width: 95%;
    }
    
    .basket-modal-content {
        padding: 1rem;
    }
    
    .basket-modal-actions {
        padding: 1rem;
        flex-direction: column;
    }
    
    .basket-modal-actions button {
        width: 100%;
    }
}
