/* ----------------------
   Tipografía y colores base
----------------------- */
body {
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    background-color: #f8f9fa;
}
.with-bottom-navbar + main,
.container.pb-5 {
    padding-bottom: 5rem; /* o el alto real de la barra */
}

/* Aplica espacio para la bottom bar */
.has-bottom-bar { padding-bottom: 60px; } /* exacto al alto de la bottom bar */
body.modal-open { overflow: hidden; }

/* ----------------------
   Imágenes miniatura
----------------------- */
.thumb-cuadrada {
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 4px;
    max-width: 48px;
    height: 48px;
}
.estrellas, .iconos { font-size: 0.7rem; line-height: 1; }

/* ----------------------
   Navbar con degradado
----------------------- */
.navbar {
    background: linear-gradient(90deg, #0069d9, #0056b3);
}
.navbar-brand {
    font-size: 1.4rem;
    font-weight: 600;
    transition: transform 0.2s ease;
}
.navbar-brand img { transition: transform 0.2s ease; }
.navbar-brand:hover img { transform: scale(1.1); }

/* ----------------------
   Barra inferior estilo iOS
----------------------- */
.navbar.fixed-bottom {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9) !important;
    height: 60px;
}
.navbar.fixed-bottom a {
    color: #495057;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.2s ease;
}
.navbar.fixed-bottom .nav-link { position: relative; }
.navbar.fixed-bottom .nav-link.active-bottom {
    color: #0d6efd !important;
    font-weight: 600;
}
.navbar.fixed-bottom .nav-link.active-bottom::after {
    content: "";
    display: block;
    width: 50%;
    height: 3px;
    background: #0d6efd;
    border-radius: 3px;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}
.navbar.fixed-bottom a:active i { transform: scale(1.2); }

.nav-link.active-bottom {
    color: #dc3545 !important; /* tu color principal */
    font-weight: 600;
}
.nav-link.active-bottom i {
    color: #dc3545;
}


/* ----------------------
   Botones
----------------------- */
.btn-primary {
    background-color: #0069d9;
    border: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.btn-outline-primary, 
.btn-outline-success, 
.btn-outline-secondary {
    transition: all 0.2s ease;
}
.active-bottom {
    color: var(--bs-primary) !important;
    font-weight: 600;
}

.fake-disabled {
  opacity: 0.65;
  /* pointer-events: none; */ /* Elimina esta línea */
}

/* ----------------------
   Estrellas (hover animado)
----------------------- */
.star-rating i {
    color: #ccc;
    cursor: pointer;
    font-size: 1.1rem;
    transition: transform 0.2s ease, color 0.2s ease;
}
.star-rating i.active,
.star-rating i:hover { 
    color: #ffc107;
}
.star-rating i.voted {
    transform: scale(1.3);
    color: #f39c12 !important;
}

/* ---------------------- 
   Botón Favorito
----------------------- */
.toggle-favorito,
.toggle-favorito-restaurante {
    background: none !important;
    border: none !important;
    padding: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.toggle-favorito:focus,
.toggle-favorito-restaurante:focus {
    outline: none;
    box-shadow: none;
}
.toggle-favorito i,
.toggle-favorito-restaurante i {
    font-size: 1.4rem;
    color: #e0245e;
    transition: color 0.2s ease-in-out, transform 0.2s ease-in-out;
}
.toggle-favorito:hover i,
.toggle-favorito-restaurante:hover i { color: #ff6b81; }
.toggle-favorito .bi-heart-fill,
.toggle-favorito-restaurante .bi-heart-fill { color: #e0245e; }
.toggle-favorito:focus i,
.toggle-favorito:active i,
.toggle-favorito-restaurante:focus i,
.toggle-favorito-restaurante:active i { transform: scale(1.15); }

/* ----------------------
   Tarjetas
----------------------- */
.card { border-radius: 12px; transition: box-shadow 0.3s ease; }
.tarjetas .card.hover-card {
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tarjetas .card.hover-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}
.tarjetas .card-body { flex-grow: 1; }
.plato-img { height: 180px; object-fit: cover; }

/* Botón favorito flotante en tarjetas */
.tarjetas .toggle-favorito {
    background: #fff !important;
    border: none !important;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tarjetas .toggle-favorito:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}
.tarjetas .toggle-favorito i { font-size: 1.2rem; color: #e0245e; }
.tarjetas .star-rating i { font-size: 1.4rem; }
.tarjetas [id^="feedback-"] { font-size: 0.8rem; }

/* ----------------------
   Formularios
----------------------- */
input, select, textarea { border-radius: 6px !important; }

/* ----------------------
   Footer
----------------------- */
footer {
    background-color: #fff;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
    color: #6c757d;
    font-size: 0.9rem;
}

/* ----------------------
   Tablas con scroll
----------------------- */
.table-responsive::-webkit-scrollbar { height: 6px; }
.table-responsive::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.2);
    border-radius: 3px;
}
.table-responsive { -webkit-overflow-scrolling: touch; }
.table { border-radius: 8px; overflow: hidden; }
.table thead th { border-bottom-width: 2px; }
.table td, .table th { vertical-align: middle; }
.table thead.sticky-top th { background-color: #f8f9fa; z-index: 2; }
#filtro-container { background-color: #f8f9fa; padding: 0.5rem; z-index: 1000; }

/* ----------------------
   Boton flotante
----------------------- */

/* Botón flotante */
.btn-float {
    position: fixed;
    bottom: 70px; /* 70px para dejar espacio sobre la barra inferior */
    right: 20px;
    background-color: #0d6efd; /* Azul Bootstrap */
    color: white;
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    z-index: 9999;
    transition: background 0.3s;
    text-decoration: none;
}

.btn-float:hover {
    background-color: #0b5ed7;
}

/* ----------------------
   Mejoras móviles
----------------------- */
@media (max-width: 576px) {
    h1, .h1, h2, .h2, h3, .h3 { font-size: 1.4rem; }
    .btn { font-size: 1rem; padding: 0.6rem 1rem; }
    .navbar-brand img { width: 28px; height: 28px; }
    table td, table th { font-size: 0.9rem; padding: 0.5rem; }
    .table img { width: 40px; height: 40px; }
    h1.h3 { margin-bottom: 0.5rem; }
    .btn-group { width: 100%; }
    .btn-group .btn { flex: 1; }
    .btn-group-sm .btn { padding: 0.25rem 0.4rem; font-size: 0.85rem; }
    td.text-center .btn-group { flex-wrap: nowrap; gap: 2px; }
}

/* ----------------------
   Modal inferior
----------------------- */
#menuModal {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: #fff;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -2px 15px rgba(0,0,0,0.2);
    z-index: 1055;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                visibility 0s linear 0.3s;
    padding: 20px;
    visibility: hidden;
    pointer-events: none;
}
#menuModal.show {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                visibility 0s linear 0s;
}
#menuModal.d-none { display: none !important; }

/* Overlay */
#overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0);
    backdrop-filter: blur(0px);
    z-index: 1050;
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
    visibility: hidden;
    pointer-events: none;
}
#overlay.show {
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    visibility: visible;
    pointer-events: auto;
}
#overlay.d-none { display: none !important; }

/* Indicador para arrastrar */
.drag-indicator {
    width: 40px; height: 5px;
    background: #dee2e6;
    border-radius: 3px;
    margin: 0 auto 20px auto;
}

/* Botones dentro del modal */
#menuModal .btn {
    padding: 16px 20px;
    font-size: 1.1rem;
    border-radius: 12px;
    font-weight: 500;
    margin-bottom: 10px;
    touch-action: manipulation;
    /*-webkit-user-select: none;*/
    -webkit-tap-highlight-color: transparent;
    min-height: 50px;
}
#menuModal .btn:last-child { margin-bottom: 0; }
#menuModal .btn i { margin-right: 12px; font-size: 1.2rem; }

/* Prevenir zoom en inputs en iOS */
input[type="file"] { font-size: 16px; }

/* Responsive modal */
@media (max-width: 768px) {
    #menuModal { padding: 25px 20px 30px; }
    #menuModal .btn {
        padding: 20px;
        font-size: 1.2rem;
        line-height: 1.2;
    }
    #drop-zone { min-height: 140px; padding: 20px; }
}

/* Asegura espacio para la barra inferior fija solo en móviles */
@media (max-width: 768px) {
    .with-bottom-navbar {
        padding-top: 10px !important; /* Ajusta el valor si tu barra es más alta */
    }
}