/* 
    TACOTIC COMPONENTS CSS 
    Este archivo centraliza la estética visual del sistema usando las variables del MudTheme.
*/

:root {
    /* Utilidades de fuente */
    --tacotic-font-bold: 700;
    --tacotic-font-black: 900;
}

/* --- TARJETAS Y CONTENEDORES --- */
.tacotic-card {
    border: 1px solid var(--mud-palette-lines-default) !important;
    border-radius: 12px !important;
    background-color: var(--mud-palette-surface) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tacotic-card-header {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    padding: 1rem;
    background-color: var(--mud-palette-surface);
}

/* --- TABLAS --- */
.tacotic-table {
    border: 1px solid var(--mud-palette-lines-default) !important;
    border-radius: 12px !important;
    background: transparent !important;
    overflow: hidden;
}

.tacotic-table .mud-table-head {
    background-color: var(--mud-palette-background-grey) !important;
}

.tacotic-table .mud-table-head .mud-table-cell {
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--mud-palette-text-primary);
}

.tacotic-table .mud-table-cell {
    border-bottom: 1px solid var(--mud-palette-divider) !important;
}

/* --- ESTADOS Y BADGES --- */
.status-badge {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.completed, .status-badge.ready, .status-badge.success {
    background: var(--mud-palette-success-hover);
    color: var(--mud-palette-success);
}

.status-badge.paid, .status-badge.info {
    background: var(--mud-palette-info-hover);
    color: var(--mud-palette-info);
}

.status-badge.pending, .status-badge.warning, .status-badge.shipped {
    background: var(--mud-palette-warning-hover);
    color: var(--mud-palette-warning);
}

.status-badge.cancelled, .status-badge.error, .status-badge.delivered {
    background: var(--mud-palette-error-hover);
    color: var(--mud-palette-error);
}

/* --- PUNTOS DE ESTADO (DOTS) --- */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.completed, .status-dot.success { background-color: var(--mud-palette-success); }
.status-dot.cancelled, .status-dot.error { background-color: var(--mud-palette-error); }
.status-dot.pending, .status-dot.warning { background-color: var(--mud-palette-warning); }

/* --- UTILIDADES --- */
.font-bold { font-weight: 700 !important; }
.font-black { font-weight: 900 !important; }
.opacity-60 { opacity: 0.6; }

.gradient-text {
    background: linear-gradient(90deg, var(--mud-palette-primary) 0%, var(--mud-palette-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.uppercase { text-transform: uppercase; }
.lh-1 { line-height: 1; }
.d-grid { display: grid; }

.glass-drawer {
    background: var(--mud-palette-drawer-background) !important;
}

/* --- TOUCH POS & MOBILE --- */
.sticky-cart {
    position: sticky;
    top: 100px; /* Ajustado para que no choque con el AppBar */
    height: calc(100vh - 140px);
    display: flex;
    flex-direction: column;
}

.cart-items-container {
    flex-grow: 1;
    overflow-y: auto;
    margin-right: -8px;
    padding-right: 8px;
}

.mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--mud-palette-surface);
    border-top: 1px solid var(--mud-palette-divider);
    z-index: 1000;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}

.touch-manipulation {
    touch-action: manipulation !important;
}

.tacotic-card:active {
    transform: scale(0.98);
}

.bg-success-light {
    background-color: var(--mud-palette-success-hover) !important;
}
.border-l-success {
    border-left: 4px solid var(--mud-palette-success) !important;
}

.primary-text { color: var(--mud-palette-primary); }

/* Contenedores de iconos */
.header-icon-box {
    background: var(--mud-palette-primary-hover);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animaciones */
.animate-fade-in {
    animation: fadeIn 0.2s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- RESPONSIVE (Móvil / Tablet) --- */
@media (max-width: 600px) {
    .tacotic-card {
        border-radius: 8px !important;
    }

    .tacotic-table .mud-table-cell {
        padding: 8px !important;
        font-size: 0.8rem;
    }
}

@media (max-width: 960px) {
    .tacotic-card {
        border-radius: 10px !important;
    }
}

/* --- KDS (Monitor de Cocina) --- */
.kds-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 420px;
    transition: all 0.2s ease-out;
}

.kds-card:hover { transform: translateY(-4px); }

.status-strip {
    border-radius: 8px 8px 0 0;
}

.status-pending { border-left: 8px solid var(--mud-palette-info); }
.status-preparing { border-left: 8px solid var(--mud-palette-warning); }
.status-ready { border-left: 8px solid var(--mud-palette-success); }

.order-sequence-number {
    background: var(--mud-palette-primary);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 900;
    box-shadow: 0 4px 12px rgba(var(--mud-palette-primary-rgb), 0.3);
}

.qty-circle {
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    border: 1px solid var(--mud-palette-divider);
}

.timer-badge { background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1); }
.order-type-badge { background: rgba(var(--mud-palette-primary-rgb), 0.1); color: var(--mud-palette-primary); padding: 4px 8px; border-radius: 6px; font-size: 0.75rem; font-weight: 800; }

/* --- DELIVERY BOARD --- */
.stat-card-mini {
    background: var(--mud-palette-surface);
    padding: 8px 16px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--mud-palette-divider);
    min-width: 80px;
}

.delivery-info-box {
    background: rgba(var(--mud-palette-primary-rgb), 0.05);
    border-radius: 12px;
    padding: 12px;
}

.animate-pulse-gps {
    animation: pulse-gps 2s infinite;
}

@keyframes pulse-gps {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}
