/* Optional Products Styles */
.count-input {
    display: inline-flex;
    align-items: center;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    overflow: hidden;
}

.count-input .btn {
    border: none;
    border-radius: 0;
    padding: 0.375rem 0.5rem;
    background: transparent;
    color: #6c757d;
    transition: all 0.15s ease-in-out;
}

.count-input .btn:hover {
    background: #f8f9fa;
    color: #495057;
}

.count-input .btn:disabled {
    opacity: 0.6;
    pointer-events: none;
}

.count-input .form-control {
    border: none;
    border-left: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    border-radius: 0;
    text-align: center;
    padding: 0.375rem 0.5rem;
    width: 50px;
    background: #fff;
}

.count-input .form-control:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: none;
}

/* Loading state for buttons */
.btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.loading:after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Table styling for optional products */
.table-optional-products th {
    border-top: none;
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
}

.table-optional-products td {
    vertical-align: middle;
    padding: 1rem 0.75rem;
}

.table-optional-products .product-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 0.5rem;
    color: #6c757d;
}

.table-optional-products .total-price {
    font-size: 1.1em;
    font-weight: 600;
    color: #198754;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    
    .count-input .form-control {
        width: 40px;
        padding: 0.25rem;
    }
    
    .count-input .btn {
        padding: 0.25rem 0.375rem;
    }
}