/**
 * MhSys OS - Componente Nicho Mockups & Simulação de Painéis
 * public/css/components/nicho-mockups.css
 */

/* ========================================================
   MOCKUPS REALISTAS POR NICHO (.nicho-mockup-card)
   ======================================================== */
.nicho-mockup-card {
    background: var(--mockup-body-bg, rgba(15, 23, 42, 0.88));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border, rgba(255, 255, 255, 0.08));
    border-radius: 24px;
    box-shadow: var(--shadow-card, 0 20px 40px -15px rgba(0, 0, 0, 0.7)), 0 0 35px hsla(var(--accent-hsl, 243, 75%, 59%), 0.15);
    overflow: hidden;
    text-align: left;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.nicho-mockup-card:hover {
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.4), 0 0 45px hsla(var(--accent-hsl, 243, 75%, 59%), 0.25);
    transform: translateY(-3px);
}

.mockup-window-header {
    background: var(--mockup-header-bg, rgba(2, 6, 23, 0.85));
    padding: 12px 18px;
    border-bottom: 1px solid var(--card-border, rgba(255, 255, 255, 0.08));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.mockup-window-dots {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.mockup-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.mockup-dot-red { background: #ef4444; }
.mockup-dot-yellow { background: #f59e0b; }
.mockup-dot-green { background: #10b981; }

.mockup-window-title {
    font-size: 0.75rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: var(--text-muted, #94a3b8);
    background: var(--mockup-item-bg, rgba(255, 255, 255, 0.035));
    border: 1px solid var(--mockup-item-border, rgba(255, 255, 255, 0.06));
    padding: 3px 12px;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mockup-live-fps-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 99px;
    background: rgba(16, 185, 129, 0.14);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
    letter-spacing: 0.2px;
    flex-shrink: 0;
}

body.light-mode .mockup-live-fps-badge {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border-color: rgba(16, 185, 129, 0.3);
}

.mockup-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #10b981;
    display: inline-block;
    animation: pulse-live-dot 1.6s infinite ease-in-out;
}

@keyframes pulse-live-dot {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.mockup-window-body {
    padding: 18px;
    background: var(--mockup-body-bg, rgba(15, 23, 42, 0.88));
    transition: background-color 0.3s ease;
}

.mockup-kpi-chip {
    background: var(--mockup-item-bg, rgba(255, 255, 255, 0.035));
    border: 1px solid var(--mockup-item-border, rgba(255, 255, 255, 0.06));
    border-radius: 12px;
    padding: 10px 14px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.mockup-row-item {
    background: var(--mockup-item-bg, rgba(255, 255, 255, 0.035));
    border: 1px solid var(--mockup-item-border, rgba(255, 255, 255, 0.06));
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.mockup-row-item:hover {
    background: var(--card-hover-bg, rgba(15, 23, 42, 0.85));
}

.mockup-text-highlight {
    color: var(--mockup-text-highlight, #ffffff) !important;
}

.mockup-coupon-box {
    background: var(--mockup-item-bg, rgba(255, 255, 255, 0.035)) !important;
    border: 1px dashed var(--card-border, rgba(255, 255, 255, 0.08)) !important;
    border-radius: 16px;
    padding: 12px 14px;
    margin-top: 14px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* ========================================================
   BENTO GRID ESPECIALIZADO: NICHO DELIVERY (60% / 40%)
   Tríade: Operação Delivery + Retaguarda ERP + Mhax IA
   ======================================================== */
.delivery-bento-grid {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: 14px;
    align-items: stretch;
}

@media (max-width: 991.98px) {
    .delivery-bento-grid {
        grid-template-columns: 1fr;
    }
}

.delivery-bento-left,
.delivery-bento-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.delivery-layer-panel {
    background: var(--mockup-item-bg, rgba(255, 255, 255, 0.035));
    border: 1px solid var(--mockup-item-border, rgba(255, 255, 255, 0.07));
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.25s ease, background-color 0.25s ease;
}

.delivery-layer-panel:hover {
    border-color: hsla(var(--accent-hsl, 15, 95%, 55%), 0.35);
}

.delivery-layer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.delivery-layer-pill {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 6px;
    background: hsla(var(--accent-hsl, 15, 95%, 55%), 0.14);
    color: var(--accent, hsl(15, 95%, 55%));
    border: 1px solid hsla(var(--accent-hsl, 15, 95%, 55%), 0.28);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Card de Pedido Ativo (#1042) */
.delivery-order-card-live {
    background: var(--card-bg, rgba(15, 23, 42, 0.65));
    border: 1px solid var(--card-border, rgba(255, 255, 255, 0.09));
    border-left: 3px solid var(--accent, #f97316);
    border-radius: 14px;
    padding: 12px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.delivery-order-card-live:hover {
    transform: translateY(-1px);
}

.delivery-order-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.delivery-order-code {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--accent, #f97316);
    background: hsla(var(--accent-hsl, 15, 95%, 55%), 0.12);
    padding: 2px 8px;
    border-radius: 6px;
}

.delivery-order-price {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 0.96rem;
    color: #10b981;
    white-space: nowrap;
}

.delivery-order-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--mockup-text-highlight, #ffffff);
    line-height: 1.35;
    margin-bottom: 8px;
}

.delivery-order-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 8px;
}

.delivery-pix-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 99px;
    background: rgba(16, 185, 129, 0.14);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.delivery-timer-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 99px;
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

body.light-mode .delivery-timer-badge {
    color: #d97706;
}

.delivery-prep-progress-track {
    width: 100%;
    height: 6px;
    background: rgba(148, 163, 184, 0.2);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 4px;
}

.delivery-prep-progress-bar {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #f59e0b 0%, var(--accent, #f97316) 60%, #10b981 100%);
    transition: width 0.4s ease;
}

/* Radar / Alerta de Saída do Motoboy */
.delivery-motoboy-alert {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.24);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.delivery-radar-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.18);
    color: #10b981;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    position: relative;
    animation: radar-ping 2.2s infinite ease-in-out;
}

@keyframes radar-ping {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Camada 2: ERP Integrado (NFC-e + Baixa de Insumos + Caixa) */
.erp-nfce-microcard {
    background: rgba(14, 165, 233, 0.09);
    border: 1px solid rgba(14, 165, 233, 0.24);
    border-radius: 12px;
    padding: 9px 11px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.erp-insumos-box {
    background: var(--card-bg, rgba(15, 23, 42, 0.6));
    border: 1px solid var(--card-border, rgba(255, 255, 255, 0.08));
    border-radius: 12px;
    padding: 9px 11px;
}

.erp-insumo-chip {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(244, 63, 94, 0.11);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.22);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

body.light-mode .erp-insumo-chip {
    background: rgba(225, 29, 72, 0.08);
    color: #be123c;
    border-color: rgba(225, 29, 72, 0.2);
}

.erp-caixa-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.erp-caixa-cell {
    background: var(--card-bg, rgba(15, 23, 42, 0.6));
    border: 1px solid var(--card-border, rgba(255, 255, 255, 0.07));
    border-radius: 10px;
    padding: 6px 8px;
    text-align: center;
}

.erp-caixa-cell-label {
    display: block;
    font-size: 0.64rem;
    color: var(--text-muted, #94a3b8);
    font-weight: 600;
}

.erp-caixa-cell-val {
    display: block;
    font-size: 0.76rem;
    font-weight: 800;
    color: var(--mockup-text-highlight, #ffffff);
    font-family: 'Outfit', sans-serif;
}

/* Camada 3: Copiloto de Inteligência Artificial (Mhax IA) */
.mhax-ai-copilot-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.16) 0%, rgba(14, 165, 233, 0.12) 100%);
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: 16px;
    padding: 13px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

body.light-mode .mhax-ai-copilot-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(14, 165, 233, 0.08) 100%);
    border-color: rgba(139, 92, 246, 0.3);
}

.mhax-ai-icon-avatar {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: linear-gradient(135deg, #8b5cf6 0%, #0ea5e9 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
    flex-shrink: 0;
}

.mhax-ai-insight-text {
    font-size: 0.74rem;
    line-height: 1.45;
    color: var(--text-main, #f8fafc);
    margin: 0;
}

.btn-mhax-action-whatsapp {
    width: 100%;
    border: 1px solid rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(5, 150, 105, 0.28) 100%);
    color: #10b981;
    font-size: 0.74rem;
    font-weight: 800;
    padding: 7px 12px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-mhax-action-whatsapp:hover {
    background: #10b981;
    color: #022c22;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
}

body.light-mode .btn-mhax-action-whatsapp {
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
    border-color: rgba(16, 185, 129, 0.35);
}

body.light-mode .btn-mhax-action-whatsapp:hover {
    background: #10b981;
    color: #ffffff;
}
