﻿/* Default Cart Componene*/
.restaurant-name {
    font-family: Calibri;
    font-size: 0.85em;
    font-weight: 400;
    color: #555;
    display: block;
    margin-top: 8px;
    margin-left: 28px;

}

/* Base Container Layout */
.crud-tempdata-container {
    min-width: 350px;
    max-width: 100%;
    width: 100%;
    margin: 65px auto;
    padding: 0 15px;
}

/* Header Styles */
.crud-tempdata-header {
    width: 100%!important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    align-content: center;
    margin-bottom: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

h1.crud-tempdata-title {
    font-family: OpenSans-SemiBold;
    font-size: 1.8em;
    color: #333;
}

/* Search Section */
.crud-search-section {
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.search-row {
    display: flex;
    gap: 16px;
    align-items: center;
    width: 100%;
}

.search-filter {
    display: flex;
    gap: 10px;
}

/* Select Inputs */
.filter-select {
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background-color: #fff;
    font-size: 14px;
    color: #1f2937;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 20px;
    width: auto;
    min-width: 100px;
}

/* Search Box */
.search-box {
    flex: 1;
}

.search-form {
    width: 100%;
}

.search-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input {
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    flex: 1;
    min-width: 200px;
}

.search-actions {
    display: flex;
    gap: 8px;
}

.search-btn {
    height: 40px;
    padding: 0 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    background-color: #3b82f6;
    cursor: pointer;
    white-space: nowrap;
    min-width: 80px;
}

    .search-btn.clear {
        background-color: #94a3b8;
    }




/* Table Styles */
.crud-tempdata-table-container {
    width: 100%;
    overflow-x: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px;
}

.crud-tempdata-table {
    width: 100%;
    border-collapse: collapse;
}

    .crud-tempdata-table th {
        padding: 12px 15px;
        font-family: Calibri;
        font-size: 0.85em;
        color: #555;
        text-transform: uppercase;
        background: #f8f9fa;
        text-align: left;
        border-bottom: 1px solid #eee;
        white-space: nowrap;
    }


    .crud-tempdata-table tr:hover {
        background: #f8f9fa;
    }

/* Sort Headers */
.crud-tempdata-sort {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

    .crud-tempdata-sort:hover {
        color: #0066cc;
    }

/* Quantity Controls */
.quantity-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-btn {
    width: 24px;
    height: 24px;
    border: thin solid #ddd;
    background: #fff !important;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

    .quantity-btn:hover {
        background: #666 !important;
        color: #fff;
    }


/* Mobile Card View */
.crud-tempdata-cards {
    display: none;
}

.crud-tempdata-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px;
    padding: 15px;
}

.crud-tempdata-card-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 15px;
}

.crud-tempdata-card-label {
    font-family: OpenSans-SemiBold;
    font-size: 0.85em;
    color: #666;
}

.crud-tempdata-card-value {
    font-size: 0.9em;
    color: #333;
}

.crud-tempdata-card-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-items: center;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
}



button.crud-action-btn-delete {
    background-color: transparent!important;   
    
}
img.icon-delete {
    width: 20px;
    opacity: 0.6;
}

    img.icon-delete:hover {
        opacity: 1;
    }

/* Utility Classes */





.search-row {
    width: 100%;
    display: flex;
    gap: 16px;
    align-items: center;
}

/* Adjusted width ratios */
.search-filter {
    display: flex;
    flex-flow: row wrap;
    gap: 10px;
}



select.filter-select {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background-color: #fff;
    font-size: 14px;
    color: #1f2937;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 20px;
}

    select.filter-select.restaurant {
        min-width: 250px;
        width: max-content;
    }

.filter-select.sort {
    min-width: 150px;
    width: max-content;
}
.search-box {
    width: 100%;
    display: flex!important;
    flex-direction: row;
}

.search-input {
    width: 300px!important;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
}

.search-actions {
    display: flex;
    justify-content: flex-end;
}

.search-btn {
    height: 40px;
    padding: 0 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    background-color: #3b82f6;
    cursor: pointer;
    white-space: nowrap;
    min-width: 80px;
    width: fit-content;
}

    .search-btn.clear {
        background-color: #94a3b8;
    }

/* Hover states */
.filter-select:hover,
.search-input:hover {
    border-color: #cbd5e1;
}

.search-btn:hover {
    opacity: 0.9;
}

/* Focus states */
.filter-select:focus,
.search-input:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 2px rgba(147, 197, 253, 0.25);
}


/* Responsive Breakpoints */
@media (max-width: 768px) {
    .crud-action-btn {
    }
    .crud-tempdata-search {
        width: 100%;
        flex-flow: column;
    }
        

    .crud-tempdata-title {
        font-size: 1.5em;
    }

    .crud-tempdata-search-input,
    .crud-tempdata-search-select {
        width: 100%;
    }
}

@media (max-width: 640px) {

    .search-filter {
        width: 100%!important;        
    }
    .filter-select.restaurant, .filter-select.sort {
        width: 100%!important;
    }
    .search-btn {
        
        width: 40px!important;
    }

    .crud-tempdata-table {
        display: none;
    }

    .crud-tempdata-cards {
        display: grid;
        gap: 15px;
    }
}



/* Responsive styles */
@media (max-width: 1200px) {
    .search-row {
        flex-wrap: wrap;
    }

    .search-filter {
        width: calc(33.33% - 11px); /* Adjust for gap */
    }


}

@media (max-width: 900px) {
    .search-filter {
        width: calc(50% - 8px);
    }
}



/* Main table container */
.crud-tempdata-table-container {
    width: 100%;
    overflow-x: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px;
}

/* Table styles */
.crud-tempdata-table {
    width: 100%;
    border-collapse: collapse;
}

    .crud-tempdata-table th {
        padding: 12px 15px;
        font-size: 0.85em;
        color: #555;
        text-transform: uppercase;
        background: #f8f9fa;
        text-align: left;
        border-bottom: 1px solid #eee;
        white-space: nowrap;
    }

    .crud-tempdata-table td {
        padding: 12px 15px;
        font-size: 0.9em;
        border-bottom: 1px solid #eee;
        vertical-align: middle;
    }

    .crud-tempdata-table tr:hover {
        background: #f8f9fa;
    }

/* Quantity control styles */
.quantity-control {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}

.quantity-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.2s;
}

    .quantity-btn:hover {
        background: #f1f5f9;
    }

.quantity-input {
    width: 40px;
    height: 28px;
    text-align: center;
    border: none;
    font-family: OpenSans-SemiBold;
    text-align: center;

}

/* Card view for mobile */
.crud-card-view {
    display: none;

}

/* Totals section */
.overall-total {
    width: 100%;
    display: flex;
    flex-flow: row wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.total-row {
    width: 100%;
    text-align: right;
    font-size: 1em;
    color: #333;
}

    .total-row-total {
        width: 100%;
        text-align: right;
        font-weight: 600;
        font-size:1em;
        color: #000;
    }

/* Responsive breakpoints */
@media (max-width: 1024px) {
    .crud-tempdata-table {
        font-size: 14px;
    }

        /* Hide less important columns */
        .crud-tempdata-table th:nth-child(4),
        .crud-tempdata-table td:nth-child(4),
        .crud-tempdata-table th:nth-child(6),
        .crud-tempdata-table td:nth-child(6),
        .crud-tempdata-table th:nth-child(7),
        .crud-tempdata-table td:nth-child(7),
        .crud-tempdata-table th:nth-child(8),
        .crud-tempdata-table td:nth-child(8) {
            display: none;
            
        }
}

@media (max-width: 768px) {
    /* Hide table and show card view */
    .crud-tempdata-table-container table {
        display: none;
    }

    .crud-card-view {
        display: block;
    }

    .order-card-content {
        background: #fff;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        padding: 10px;
        margin-bottom: 7px;
    }

    .order-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
        padding-bottom: 12px;
        border-bottom: 1px solid #e2e8f0;
    }
    .order-card-title {
        line-height: 1.6;
    }

    .order-card-body {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        
    }

    .order-card-field {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .field-label {
        font-size: 0.75em;
        color: #6b7280;
        text-transform: uppercase;
    }

    .field-value {
        font-size: 0.9em;
        color: #1f2937;
    }
    .field-value-condition {
        display: none;
    }
    .field-value-condition:not(:empty){
        display: flex;
        flex-direction: column;

    }
    .field-value-condition:before {
        content: 'condition';
        padding-bottom: 6px;
        color: #777;
    }

    .order-card-actions {
        display: flex;
        gap: 8px;
        margin-top: 18px;
        padding-top: 18px;
        border-top: thin solid #ccc;
    }

    /* Adjust totals for mobile */


    .total-row {
        justify-content: space-between;
    }
    .order-card-actions {
        display: flex;
        flex-flow: row nowrap!important;
        justify-content: space-between;
        padding: 7px 20px 0;
        align-items: center;
        border-top: 1px solid #e5e7eb;
    }

    .crud-action-btn-delete {
        background-color: #666!important;
    }

}

@media (max-width: 480px) {
    .crud-tempdata-container, .crud-tempdata-header, .crud-search-section, .search-row, .search-filter {
        width: 100%!important;
        align-items: center;
        border: none;
    }
    .order-card-body {
        grid-template-columns: 1fr;
    }

    .order-card-actions {
        flex-direction: column;
    }

    .crud-action-btn {
        text-align: center;
    }

}

.order-card {
    position: relative;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
}



.quantity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    padding: 0.25rem 0.5rem;
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
}



