html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* ====================
   Estilos Base - Escritorio
==================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

h2 {
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
}

.mesa-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    /* justify-content: center; */
    justify-content: flex-start;
}

/* Tarjetas de mesa */
.mesa-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    width: 250px;
    padding: 1rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    color: #212529; /* texto oscuro */
}

    .mesa-card:hover {
        background-color: #f5f5f5;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

/* Colores según estado (borde izquierdo + fondo suave) */
.green {
    border-left: 5px solid #28a745; /* verde */
    background-color: #e6f4ea; /* fondo verde claro */
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.yellow {
    border-left: 5px solid #ffc107; /* amarillo */
    background-color: #fff8e1; /* fondo amarillo claro */
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.red {
    border-left: 5px solid #dc3545; /* rojo */
    background-color: #f9d6d5; /* fondo rojo claro */
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Efecto blink para actualización visual */
@keyframes blinkAnim {
    0% {
        box-shadow: 0 0 8px 3px rgba(255, 193, 7, 0.8);
        background-color: #fff9c4;
    }

    50% {
        box-shadow: 0 0 12px 5px rgba(255, 193, 7, 1);
        background-color: #fff59d;
    }

    100% {
        box-shadow: none;
        background-color: inherit;
    }
}

.blink {
    animation: blinkAnim 2s ease forwards;
}

/* Modal */
#detalleModal.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    max-width: 90vw;
    background: white;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    overflow: hidden;
    z-index: 1000;
}

.modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.close {
    align-self: flex-end;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem 1rem;
    position: absolute;
    right: 10px;
    top: 10px;
    user-select: none;
}

.modal-info-strip {
    background: #e9ecef;
    padding: 1rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    border-bottom: 1px solid #ced4da;
}

/* Para tu estructura interna del header con dos líneas */
.modal-info-header .linea-arriba,
.modal-info-header .linea-abajo {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

    /* Ajusta para que cada grupo ocupe similar espacio */
    .modal-info-header .linea-arriba > div,
    .modal-info-header .linea-abajo > div {
        flex: 1;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.modal-body-custom {
    padding: 1rem 2rem;
    overflow-y: auto;
    flex-grow: 1;
    font-size: 0.95rem;
}

.modal-footer-info {
    background: #e9ecef;
    padding: 1rem 2rem;
    font-weight: 700;
    font-size: 1.1rem;
    border-top: 1px solid #ced4da;
    text-align: right;
}

/* ====================
   Media Queries Tablets
==================== */

@media (max-width: 768px) {
    .mesa-card {
        width: 45vw;
    }

    #detalleModal.modal {
        width: 90vw;
        max-width: none;
    }

    .modal-info-strip {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .modal-info-header .linea-arriba,
    .modal-info-header .linea-abajo {
        flex-direction: column;
        gap: 0.25rem;
    }

    .modal-body-custom {
        padding: 1rem;
    }

    .modal-footer-info {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
}

/* ====================
   Media Queries Móviles
==================== */

@media (max-width: 480px) {
    .mesa-card {
        width: 90vw;
        margin: 0.5rem auto;
    }

    #detalleModal.modal {
        width: 95vw;
        max-width: none;
        border-radius: 6px;
    }

    .modal-info-strip {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }

    .modal-info-header .linea-arriba,
    .modal-info-header .linea-abajo {
        flex-direction: column;
        gap: 0.25rem;
    }

    .modal-body-custom {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .modal-footer-info {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }

    .close {
        font-size: 1.25rem;
        right: 8px;
        top: 8px;
    }
}
/* ====================
   Table Details
==================== */
/* Estilo base */
.table.detalle-items td,
.table.detalle-items th {
    font-size: 0.95rem;
}

/* Para móviles: aumentar un poco más el tamaño */
@media (max-width: 576px) {
    .table.detalle-items td,
    .table.detalle-items th {
        font-size: 1.1rem;
    }
}

