/* SteveCart Styles */

/* Add to Cart Button */
.btn-steve-cart {
    background-color: #b2542c;
    border: 2px solid #b2542c;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 25px;
    padding: 8px 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(178, 84, 44, 0.2);
}

.btn-steve-cart:hover {
    background-color: #9a4726;
    border-color: #9a4726;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(178, 84, 44, 0.3);
}

.btn-steve-cart:active {
    background-color: #8a3f22;
    border-color: #8a3f22;
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(178, 84, 44, 0.2);
}

.btn-steve-cart:focus {
    box-shadow: 0 0 0 3px rgba(178, 84, 44, 0.25);
}

.btn-steve-cart.btn-sm {
    padding: 6px 14px;
    font-size: 0.875rem;
}

/* Icon spacing */
.btn-steve-cart .bi {
    font-size: 0.9em;
}

/* Mobile responsive centering */
@media (max-width: 767.98px) {
    .text-md-end {
        text-align: center !important;
    }
    
    .btn-steve-cart {
        margin: 0 auto;
        display: block;
        width: fit-content;
    }
}

/* Cart Modal Styling */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    padding: 1.5rem;
}

.modal-title {
    color: #b2542c;
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
}

/* Quantity Controls */
.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-controls .btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-color: #b2542c;
    color: #b2542c;
    font-weight: 600;
    font-size: 16px;
    line-height: 1;
}

.quantity-controls .btn:hover {
    background-color: #b2542c;
    border-color: #b2542c;
    color: white;
}

.quantity-controls input {
    margin-top: 16px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    font-weight: 600;
    height: 36px;
    text-align: center;
}

.quantity-controls input:focus {
    border-color: #b2542c;
    box-shadow: 0 0 0 0.2rem rgba(178, 84, 44, 0.25);
}

/* Price Display */
.price-display {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    border-left: 4px solid #b2542c;
}

.price-display .text-danger {
    color: #b2542c !important;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1.5rem;
}

/* Modal Footer Buttons */
.modal-footer .btn {
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-width: 2px;
    border-style: solid;
}

.modal-footer .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.modal-footer .btn-secondary:hover {
    background-color: #5a6268;
    border-color: #5a6268;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.modal-footer .btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.2);
}

/* Modal Image */
#modalItemImage {
    border-radius: 8px;
    border: 2px solid #dee2e6;
}

/* Modal responsive layout - when image is hidden, content takes full width */
@media (min-width: 768px) {
    #modalImageContainer:not([style*="display: block"]) + #modalContentContainer {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* Toastr positioning - below header */
#toast-container {
    top: 100px !important;
    right: 20px !important;
    position: fixed !important;
    z-index: 9999 !important;
}

#toast-container > div {
    width: 300px !important;
    opacity: 0.95 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Promotional Pricing in Modal */
.promotional-pricing {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.promotional-pricing .original-price {
    font-size: 0.9em;
    opacity: 0.7;
}

.promotional-pricing .promo-price {
    color: #b2542c !important;
    font-size: 1.1em;
}

.promotional-pricing .promo-badge {
    background-color: #b2542c !important;
    border: none;
    font-size: 0.75em;
    padding: 4px 8px;
    border-radius: 12px;
}

/* Included Items Styles */
.included-category {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
    background-color: #f8f9fa;
}

.included-category h6 {
    color: #b2542c;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 6px;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.included-items-list .form-check {
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 8px 35px;
    margin-bottom: 6px;
    transition: all 0.2s ease;
}

.included-items-list .form-check:hover {
    background-color: #f1f3f4;
    border-color: #b2542c;
}

.included-items-list .form-check-input:checked ~ .form-check-label {
    color: #b2542c;
}

.included-items-list .form-check-input:checked {
    background-color: #b2542c;
    border-color: #b2542c;
}

.included-items-list .form-check-label {
    cursor: pointer;
    width: 100%;
    margin-bottom: 0;
}

.included-items-list .form-check-label strong {
    font-size: 0.95em;
}

.included-items-list .form-check-label small {
    line-height: 1.3;
    display: block;
    margin-top: 2px;
}

.included-items-list .text-success {
    font-size: 0.9em;
    white-space: nowrap;
}

/* Mobile responsiveness for included items */
@media (max-width: 767.98px) {
    .included-category {
        padding: 10px;
        margin-bottom: 12px;
    }
    
    .included-items-list .form-check {
        padding: 8px 35px;
        margin-bottom: 5px;
    }
    
    .included-items-list .form-check-label {
        font-size: 0.9em;
    }
}

/* Modal adjustments for included items */
#cartItemModal .modal-dialog {
    max-height: 90vh;
}

#cartItemModal .modal-content {
    max-height: 90vh;
    overflow: hidden;
}

#cartItemModal .modal-body {
    max-height: calc(90vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Payment Method and Change Amount Validation */
#changeAmountInput.is-invalid,
#customerNameInput.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.25 5.25 1.5 1.5m0-1.5-1.5 1.5'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

#changeAmountInput.is-valid,
#customerNameInput.is-valid {
    border-color: #198754;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='m2.3 6.73.4.4 2.83-2.83 3.54-3.54-.4-.4L6.17 3.2 4.37 5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

#changeAmountInput:focus.is-invalid,
#customerNameInput:focus.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

#changeAmountInput:focus.is-valid,
#customerNameInput:focus.is-valid {
    border-color: #198754;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

/* Payment method styling */
.form-check-input:checked[name="paymentMethod"] {
    background-color: #b2542c;
    border-color: #b2542c;
}

.form-check-input:focus[name="paymentMethod"] {
    border-color: #b2542c;
    box-shadow: 0 0 0 0.2rem rgba(178, 84, 44, 0.25);
}
