/* Restaurant Modal Styles - Extracted from menu.blade.php */

/* Fix modal z-index to appear above navbar */
.modal {
    z-index: 10001 !important;
}

.modal-backdrop {
    z-index: 10000 !important;
}

.modal-dialog {
    z-index: 10001 !important;
    position: relative;
}

/* Ensure modal appears above sticky navbar */
.modal.show {
    z-index: 10001 !important;
}

.modal.show .modal-dialog {
    z-index: 10001 !important;
}

/* Fix for Bootstrap modal stacking */
body.modal-open {
    overflow: hidden;
}

/* Ensure modal backdrop covers navbar */
.modal-backdrop.show {
    z-index: 10000 !important;
    opacity: 0.5;
}

/* Additional fixes for modal stacking */
.modal.fade .modal-dialog {
    z-index: 10001 !important;
}

/* Override any navbar z-index conflicts */
.modal-open .ftco_navbar,
.modal-open .navbar,
.modal-open .navbar-toggler {
    z-index: 9999 !important;
}

/* Ensure modal is always on top */
#specialInstructionsModal {
    z-index: 10001 !important;
}

#specialInstructionsModal .modal-dialog {
    z-index: 10001 !important;
}

#specialInstructionsModal .modal-content {
    z-index: 10001 !important;
}

/* Professional Modal Styles */
.modal-content {
    border: none;
    border-radius: 25px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    max-height: 90vh;
    margin: 10px;
    z-index: 10001;
    position: relative;
}

/* Responsive modal sizing */
.modal-lg {
    max-width: 900px;
    width: 95%;
}

@media (max-width: 768px) {
    .modal-lg {
        max-width: 95%;
        width: 95%;
        margin: 5px;
    }
    
    .modal-content {
        border-radius: 20px;
        max-height: 95vh;
        margin: 5px;
    }
}

@media (max-width: 480px) {
    .modal-lg {
        max-width: 98%;
        width: 98%;
        margin: 2px;
    }
    
    .modal-content {
        border-radius: 15px;
        max-height: 98vh;
        margin: 2px;
    }
}

/* Compact modal body */
.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .modal-body {
        padding: 15px;
        max-height: 65vh;
    }
}

@media (max-width: 480px) {
    .modal-body {
        padding: 12px;
        max-height: 70vh;
    }
}

/* Compact form groups */
.form-group {
    margin-bottom: 15px;
}

/* Compact related products section */
.related-products-section {
    padding-top: 15px;
    margin-top: 15px;
}

.related-products-grid {
    gap: 12px;
    margin-top: 12px;
}

.modal-header {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    border: none;
    padding: 25px 30px;
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .modal-header {
        padding: 20px 20px;
    }
}

@media (max-width: 480px) {
    .modal-header {
        padding: 15px 15px;
    }
}

.modal-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.modal-header .modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {
    .modal-header .modal-title {
        font-size: 1.3rem;
        letter-spacing: 0.5px;
    }
}

@media (max-width: 480px) {
    .modal-header .modal-title {
        font-size: 1.1rem;
        letter-spacing: 0.3px;
    }
}

.modal-header .close {
    color: white;
    opacity: 0.9;
    font-size: 1.5rem;
    font-weight: 300;
    text-shadow: none;
    padding: 0;
    margin: 0;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    transition: none !important;
    animation: none !important;
    transform: none !important;
}

@media (max-width: 480px) {
    .modal-header .close {
        width: 25px;
        height: 25px;
        font-size: 1.2rem;
    }
}

.modal-header .close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    transition: none !important;
    animation: none !important;
    transform: none !important;
}

.modal-header .close:focus {
    outline: none;
    border: none;
    box-shadow: none;
}

.modal-header .close:active {
    border: none;
    outline: none;
}

/* Override Bootstrap default close button styling */
.modal-header .close,
.modal-header .close.btn,
.modal-header .close[type="button"] {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.modal-header .close::before,
.modal-header .close::after {
    border: none !important;
}

.modal-body {
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

@media (max-width: 768px) {
    .modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .modal-body {
        padding: 15px;
    }
}

.product-info {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 107, 53, 0.1);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.1);
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .product-info {
        padding: 20px;
        margin-bottom: 20px;
        border-radius: 15px;
    }
}

@media (max-width: 480px) {
    .product-info {
        padding: 15px;
        margin-bottom: 15px;
        border-radius: 12px;
    }
}

.product-info::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
}

.product-name {
    color: #2c3e50;
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 10px;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .product-name {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {
    .product-name {
        font-size: 1.1rem;
        margin-bottom: 6px;
    }
}

.product-price {
    color: #ff6b35;
    font-weight: 800;
    font-size: 1.8rem;
    text-shadow: 0 2px 4px rgba(255, 107, 53, 0.2);
}

@media (max-width: 768px) {
    .product-price {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .product-price {
        font-size: 1.4rem;
    }
}

.product-description {
    margin-top: 8px;
}

.product-description p {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0;
    font-style: italic;
}

/* Related Products Styling */
.related-products-section {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-bottom: 20px;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.related-product-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.related-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-color: #007bff;
}

.related-product-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    line-height: 1.3;
}

.related-product-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ff6b35;
    margin-bottom: 8px;
}

.quick-add-btn {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    width: 100%;
}

.form-group {
    margin-bottom: 25px;
}

@media (max-width: 768px) {
    .form-group {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .form-group {
        margin-bottom: 15px;
    }
}

.form-group label {
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    display: block;
}

@media (max-width: 768px) {
    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .form-group label {
        font-size: 0.85rem;
        margin-bottom: 8px;
    }
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 15px 20px;
    font-size: 1rem;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .form-control {
        padding: 12px 16px;
        font-size: 0.95rem;
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    .form-control {
        padding: 10px 14px;
        font-size: 0.9rem;
        border-radius: 10px;
    }
}

.form-control:focus {
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.input-group {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.input-group .btn {
    border: none;
    padding: 15px 12px;
    font-weight: 600;
    font-size: 1.1rem;
    background: #f8f9fa;
    color: #6c757d;
    min-width: 45px;
    width: 45px;
}

@media (max-width: 768px) {
    .input-group .btn {
        padding: 12px 10px;
        font-size: 1rem;
        min-width: 40px;
        width: 40px;
    }
}

@media (max-width: 480px) {
    .input-group .btn {
        padding: 10px 8px;
        font-size: 0.9rem;
        min-width: 35px;
        width: 35px;
    }
}

.input-group .btn:hover {
    background: #ff6b35;
    color: white;
}

.input-group .btn.btn-pressed {
    background: #ff6b35;
    color: white;
    transform: scale(0.95);
    transition: all 0.1s ease;
}

#quantity {
    border: none;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    background: #fff;
    min-width: 80px;
    width: 80px;
}

@media (max-width: 768px) {
    #quantity {
        font-size: 1rem;
        min-width: 70px;
        width: 70px;
    }
}

@media (max-width: 480px) {
    #quantity {
        font-size: 0.9rem;
        min-width: 60px;
        width: 60px;
    }
}

.modal-footer {
    border: none;
    padding: 25px 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .modal-footer {
        padding: 20px 20px;
    }
}

@media (max-width: 480px) {
    .modal-footer {
        padding: 15px 15px;
        flex-direction: column;
        gap: 10px;
    }
}

.btn {
    padding: 15px 30px;
    font-weight: 600;
    border-radius: 25px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    font-size: 0.9rem;
    min-width: 120px;
}

@media (max-width: 768px) {
    .btn {
        padding: 12px 25px;
        font-size: 0.85rem;
        min-width: 100px;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 10px 20px;
        font-size: 0.8rem;
        min-width: 90px;
        width: 100%;
    }
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #495057, #6c757d);
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    box-shadow: 0 5px 20px rgba(255, 107, 53, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #f7931e, #ff6b35);
}

.price-display {
    font-weight: 800;
    font-size: 1.2rem;
    margin-right: 10px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Enhanced focus states */
.form-control:focus,
.input-group .btn:focus {
    outline: none;
}

/* Loading state for buttons */
.btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

/* Related Products Styling */
.related-products-section {
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 15px;
    justify-items: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.related-product-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
}

.related-product-card:hover {
    border-color: #ff6b35;
}

.related-product-card img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 10px;
}

.related-product-card .related-product-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #495057;
    line-height: 1.2;
}

.related-product-card .related-product-price {
    font-size: 0.85rem;
    color: #ff6b35;
    font-weight: 700;
    margin-bottom: 10px;
}

.quick-add-btn {
    font-size: 0.8rem;
    padding: 5px 10px;
    border-radius: 20px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border: none;
    color: white;
}

.quick-add-btn:hover {
    background: linear-gradient(135deg, #f7931e, #ff6b35);
}

/* Success state for quick add button */
.quick-add-btn.btn-success {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    border-color: #28a745 !important;
    color: white !important;
}

.quick-add-btn.btn-success:hover {
    background: linear-gradient(135deg, #20c997, #28a745) !important;
}

/* Enhanced Responsive Design for Related Products */
@media (max-width: 768px) {
    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        max-width: 100%;
        margin: 10px auto;
    }

    .related-product-card {
        padding: 10px;
        border-radius: 10px;
    }

    .related-product-card img {
        width: 45px;
        height: 45px;
        border-radius: 6px;
    }

    .related-product-card .related-product-name {
        font-size: 0.8rem;
        margin-bottom: 4px;
    }

    .related-product-card .related-product-price {
        font-size: 0.75rem;
        margin-bottom: 8px;
    }

    .quick-add-btn {
        font-size: 0.7rem;
        padding: 4px 8px;
        border-radius: 15px;
    }
}

@media (max-width: 480px) {
    .related-products-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 10px;
        max-width: 200px;
        margin: 8px auto;
    }

    .related-product-card {
        padding: 8px;
        border-radius: 8px;
    }

    .related-product-card img {
        width: 40px;
        height: 40px;
        border-radius: 5px;
    }

    .related-product-card .related-product-name {
        font-size: 0.75rem;
        margin-bottom: 3px;
    }

    .related-product-card .related-product-price {
        font-size: 0.7rem;
        margin-bottom: 6px;
    }

    .quick-add-btn {
        font-size: 0.65rem;
        padding: 3px 6px;
        border-radius: 12px;
    }
}

/* Responsive modal */
@media (max-width: 576px) {
    .modal-content {
        margin: 10px;
        border-radius: 20px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }

    .product-name {
        font-size: 1.1rem;
    }

    .product-price {
        font-size: 1.5rem;
    }
}
