/* ═══════════════════════════════════════
   MOCKUP UI SYSTEM
   Used for replacing static PNG images
   with high-fidelity HTML/CSS dashboards
   ═══════════════════════════════════════ */

/* Container */
.mu-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 240px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', -apple-system, sans-serif;
    padding: 24px;
}

/* Base Window (MacOS style) */
.mu-window {
    width: 100%;
    height: 100%;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.4);
    position: relative;
}

.mu-wrapper.dark .mu-window {
    background: #1e293b;
    border-color: rgba(255,255,255,0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Topbar */
.mu-topbar {
    height: 32px;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    padding: 0 14px;
    gap: 6px;
    flex-shrink: 0;
}

.mu-wrapper.dark .mu-topbar {
    background: #0f172a;
    border-bottom-color: #334155;
}

.mu-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cbd5e1;
}

.mu-dot.red { background: #ff5f56; }
.mu-dot.yellow { background: #ffbd2e; }
.mu-dot.green { background: #27c93f; }

/* Layouts */
.mu-body {
    flex: 1;
    display: flex;
    padding: 16px;
    gap: 16px;
    position: relative;
    background: #f8fafc;
}

.mu-wrapper.dark .mu-body { background: #1e293b; }

.mu-sidebar {
    width: 32%;
    background: #ffffff;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    border: 1px solid #e2e8f0;
}

.mu-wrapper.dark .mu-sidebar {
    background: #0f172a;
    border-color: #334155;
}

.mu-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Blocks & Skeleton */
.mu-block {
    background: #f1f5f9;
    border-radius: 6px;
    height: 14px;
}

.mu-wrapper.dark .mu-block { background: #334155; }

.mu-block.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: mu-skeleton 2s infinite linear;
}

.mu-wrapper.dark .mu-block.skeleton {
    background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%);
    background-size: 200% 100%;
}

@keyframes mu-skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Functional Cards */
.mu-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mu-wrapper.dark .mu-card {
    background: #0f172a;
    border-color: #334155;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.mu-card-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mu-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    flex-shrink: 0;
    overflow: hidden;
}

.mu-wrapper.dark .mu-avatar { background: #475569; }

.mu-avatar img {
    width: 100%; height: 100%; object-fit: cover;
}

/* Typography Specifics */
.mu-title {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
}

.mu-wrapper.dark .mu-title { color: #f8fafc; }

.mu-subtitle {
    font-size: 10px;
    color: #64748b;
    margin: 0;
}

.mu-wrapper.dark .mu-subtitle { color: #94a3b8; }

.mu-price {
    font-size: 16px;
    font-weight: 700;
    color: #3b82f6;
    margin: 0;
}

.mu-price.small {
    font-size: 13px;
}

.mu-status {
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    width: fit-content;
}
.mu-status.success { background: #dcfce7; color: #16a34a; }
.mu-status.processing { background: #fef9c3; color: #ca8a04; }

/* Floating Elements for Depth */
.mu-float-panel {
    position: absolute;
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0,0,0,0.05);
    z-index: 10;
}

.mu-wrapper.dark .mu-float-panel {
    background: #1e293b;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255,255,255,0.1);
}

.mu-badge-floating {
    position: absolute;
    background: #10b981;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 6px;
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
    z-index: 20;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mu-noti-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    background: #ef4444;
    color: #ffffff;
    border-radius: 50%;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.4);
}

.mu-wrapper.dark .mu-noti-badge { border-color: #1e293b; }

/* Chart Bars */
.mu-chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 40px;
}
.mu-chart-bar {
    flex: 1;
    background: #3b82f6;
    border-radius: 3px 3px 0 0;
    min-height: 4px;
}
.mu-chart-bar.light { background: #bfdbfe; }
.mu-wrapper.dark .mu-chart-bar.light { background: #1e3a8a; }

/* Chatbot Specific */
.mu-chat-msg {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 11px;
    max-width: 85%;
    line-height: 1.5;
}
.mu-chat-msg.user {
    background: #f1f5f9;
    color: #0f172a;
    border-bottom-right-radius: 4px;
    align-self: flex-end;
}
.mu-chat-msg.bot {
    background: #3b82f6;
    color: #ffffff;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}
.mu-wrapper.dark .mu-chat-msg.user {
    background: #334155;
    color: #f8fafc;
}

/* Typing Indicator */
.mu-typing {
    display: flex;
    gap: 4px;
    padding: 6px 4px;
}
.mu-typing span {
    width: 6px;
    height: 6px;
    background: rgba(255,255,255,0.6);
    border-radius: 50%;
    animation: mu-bounce 1.4s infinite ease-in-out both;
}
.mu-typing span:nth-child(1) { animation-delay: -0.32s; }
.mu-typing span:nth-child(2) { animation-delay: -0.16s; }
@keyframes mu-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* ── Overrides for svc overview layout ── */
.svc-ov-img {
    height: 240px; /* fix height so mockups have space */
    position: relative;
    padding: 0 !important; /* override to fit full */
}
.svc-ov-img .mu-wrapper {
    border-radius: 10px;
}
