/* Copyright (C) 2025 Dolires Development Team
 * CSS for Dolires module
 */

/* ============================================
   GENERAL STYLES
   ============================================ */

.dolires-page {
    padding: 20px;
}

.dolires-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ============================================
   SALON (DINING ROOM) STYLES
   ============================================ */

.salon-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.salon-tab {
    padding: 12px 24px;
    background: #f5f5f5;
    border: none;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
}

.salon-tab:hover {
    background: #e8e8e8;
}

.salon-tab.active {
    background: #fff;
    border-bottom: 3px solid #4CAF50;
    color: #4CAF50;
}

.mesas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.mesa-card {
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.mesa-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.mesa-libre {
    background: #E8F5E9;
    border: 2px solid #4CAF50;
}

.mesa-ocupada {
    background: #FFEBEE;
    border: 2px solid #F44336;
}

.mesa-reservada {
    background: #FFF3E0;
    border: 2px solid #FF9800;
}

.mesa-numero {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.mesa-info {
    font-size: 14px;
    color: #666;
}

.mesa-mesero {
    margin: 5px 0;
    font-weight: 500;
}

.mesa-tiempo {
    color: #999;
    font-size: 12px;
}

.mesa-total {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-top: 8px;
}

.mesa-capacidad {
    color: #888;
}

/* ============================================
   POS STYLES
   ============================================ */

.pos-container {
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 20px;
    height: calc(100vh - 120px);
}

.pos-left, .pos-right {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow-y: auto;
}

.pos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
    margin-left: 20px;
}

.search-box input {
    width: 100%;
    padding: 10px 10px 10px 40px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.categorias-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.cat-tab {
    padding: 10px 20px;
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
}

.cat-tab:hover {
    background: #e8e8e8;
}

.cat-tab.active {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.cat-tab i {
    margin-right: 8px;
}

.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.producto-card {
    padding: 15px;
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
}

.producto-card:hover {
    background: #fff;
    border-color: #4CAF50;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.producto-nombre {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.producto-precio {
    color: #4CAF50;
    font-weight: bold;
    font-size: 16px;
}

.orden-items {
    margin-bottom: 20px;
}

.orden-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.orden-item.comandado {
    background-color: #f0f8ff;
    border-left: 3px solid #4CAF50;
}

.orden-item-info {
    flex: 1;
}

.orden-item-nombre {
    font-weight: 600;
    margin-bottom: 4px;
}

.orden-item-notas {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.orden-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.orden-item-qty button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #4CAF50;
    color: white;
    cursor: pointer;
    font-size: 16px;
}

.orden-item-qty span {
    min-width: 30px;
    text-align: center;
    font-weight: bold;
}

.orden-item-precio {
    font-weight: bold;
    color: #333;
    margin-left: 15px;
}

.orden-totales {
    border-top: 2px solid #e0e0e0;
    padding-top: 15px;
    margin-top: 20px;
}

.orden-total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 16px;
}

.orden-total-row.total {
    font-size: 20px;
    font-weight: bold;
    color: #4CAF50;
    border-top: 2px solid #4CAF50;
    padding-top: 12px;
    margin-top: 8px;
}

.orden-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.orden-actions button {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-comandar {
    background: #FF9800;
    color: white;
}

.btn-comandar:hover {
    background: #F57C00;
}

.btn-cobrar {
    background: #4CAF50;
    color: white;
}

.btn-cobrar:hover {
    background: #388E3C;
}

/* ============================================
   MONITOR COCINA STYLES
   ============================================ */

.monitor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.monitor-tabs {
    display: flex;
    gap: 10px;
}

.monitor-tab {
    padding: 12px 24px;
    background: #f5f5f5;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.monitor-tab.active {
    background: #4CAF50;
    color: white;
}

.comandas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.comanda-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 5px solid #4CAF50;
}

.comanda-card.warning {
    border-left-color: #FF9800;
}

.comanda-card.danger {
    border-left-color: #F44336;
}

.comanda-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.comanda-mesa {
    font-size: 18px;
    font-weight: bold;
}

.comanda-tiempo {
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
}

.comanda-tiempo.success {
    background: #E8F5E9;
    color: #4CAF50;
}

.comanda-tiempo.warning {
    background: #FFF3E0;
    color: #FF9800;
}

.comanda-tiempo.danger {
    background: #FFEBEE;
    color: #F44336;
}

.comanda-items {
    margin: 15px 0;
}

.comanda-item {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.comanda-item-qty {
    font-weight: bold;
    color: #4CAF50;
}

.comanda-item-notas {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-top: 4px;
}

.comanda-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.comanda-actions button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .pos-container {
        grid-template-columns: 1fr;
    }
    
    .mesas-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .comandas-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.loading i {
    font-size: 48px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
