/* 8.3.0 — structural phone cards + overlay lock. Last file in chain. */

html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

@media (max-width: 899px) {
  html body.bu-board-page .bu-feed .bu-item.compact,
  html body.bu-board-page .bu-feed .bu-item.bu-row.compact {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    grid-template-columns: none !important;
    grid-template-areas: none !important;
    width: calc(100% - 16px) !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 8px 10px !important;
    padding: 12px !important;
    background: #fff !important;
    border: 1px solid #d5e4ea !important;
    border-radius: 16px !important;
    position: relative !important;
  }
  html body.bu-board-page .bu-feed .bu-item.compact > .bu-c,
  html body.bu-board-page .bu-feed .bu-item.compact > .bu-driver-card-cta {
    display: none !important;
  }
  html body .bu-pcard {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  html body .bu-pcard .bu-mcard-route {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    color: #0b131f !important;
  }
  html body .bu-pcard .bu-mcard-route b {
    overflow: visible !important;
    text-overflow: unset !important;
    white-space: nowrap !important;
    min-width: 0 !important;
    max-width: none !important;
    font-size: 16px !important;
    color: #0b131f !important;
  }
  html body .bu-pcard .bu-mcard-meta {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 5px !important;
    width: 100% !important;
  }
  html body .bu-pcard .bu-mcard-foot {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
  }
  html body .bu-item.is-demo .bu-demo-ribbon,
  html body .bu-pcard .bu-demo-ribbon {
    display: inline-flex !important;
    background: #f59e0b !important;
    color: #1f1300 !important;
    font-weight: 900 !important;
    font-size: 10px !important;
    letter-spacing: .04em;
    padding: 3px 8px;
    border-radius: 999px;
    align-self: flex-start;
  }

  html body #bu-dispo.bu-ai-portal,
  html body.bu-ai-open #bu-dispo,
  html body.bu-board-page.bu-ai-open #bu-dispo {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    z-index: 2147483000 !important;
    transform: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    background: #070d14 !important;
    color: #e2e8f0 !important;
    padding-top: env(safe-area-inset-top, 0px) !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    pointer-events: auto !important;
  }
  html body.bu-ai-open .bu-mshell,
  html body.bu-ai-open .bu-mobchrome,
  html body.bu-ai-open .bu-dispo-fab,
  html body.bu-ai-open .bu-phonedock,
  html body.bu-mobile-detail-open .bu-mshell,
  html body.bu-mobile-detail-open .bu-mobchrome,
  html body.bu-mobile-detail-open .bu-phonedock {
    display: none !important;
  }
  html body #bu-dispo .bu-dispo-head {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 56px;
    padding: 8px 12px;
    background: #0b131f;
    border-bottom: 1px solid #1e293b;
  }
  html body #bu-dispo .bu-dispo-brand {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  html body #bu-dispo .bu-dispo-av {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }
  html body #bu-dispo .bu-dispo-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #34d399;
    font-weight: 800;
  }
  html body #bu-dispo .bu-dispo-live i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 4px rgba(52, 211, 153, .25);
  }
  html body #bu-dispo .bu-ai-close {
    min-width: 44px;
    min-height: 44px;
    background: rgba(255,255,255,.12) !important;
    color: #fff !important;
    font-size: 18px;
  }
  html body #bu-dispo .bu-dispo-log,
  html body #bu-dispo .bu-chat-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    font-size: 14px !important;
    line-height: 1.5 !important;
    padding: 12px;
  }
  html body #bu-dispo .bu-bubble {
    font-size: 14px !important;
    line-height: 1.5 !important;
    max-width: 85%;
    background: #1e293b;
    color: #f1f5f9;
    border-radius: 16px 16px 16px 4px;
    padding: 10px 12px;
    overflow-wrap: anywhere;
  }
  html body #bu-dispo .bu-dispo-form {
    flex: 0 0 auto;
    display: flex !important;
    gap: 8px;
    padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px));
    background: #0b131f;
    border-top: 1px solid #1e293b;
    position: sticky;
    bottom: 0;
  }
  html body #bu-dispo .bu-dispo-form input {
    flex: 1;
    min-height: 44px;
    font-size: 16px !important;
    background: #111827;
    color: #fff;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 0 12px;
  }

  html body #bu-mobile-detail-sheet,
  html body.bu-mobile-detail-open #bu-mobile-detail-sheet {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    z-index: 2147482900 !important;
    transform: none !important;
    border-radius: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    background: #0b131f !important;
    color: #e2e8f0 !important;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  html body #bu-mobile-detail-backdrop {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147482800 !important;
    background: rgba(2, 6, 12, .72) !important;
    backdrop-filter: blur(8px);
  }
  html body .bu-mdetail-head {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 10px 12px;
    border-bottom: 1px solid #1e293b;
  }
  html body .bu-mdetail-x {
    min-width: 44px;
    min-height: 44px;
    border: 0;
    border-radius: 12px;
    background: #1e293b;
    color: #fff;
    font-size: 22px;
  }
  html body .bu-mdetail-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 12px;
  }
  html body .bu-mdetail-foot {
    flex: 0 0 auto;
    padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #1e293b;
    background: #0b131f;
  }
  html body .bu-dpro-route-pair {
    display: grid !important;
    grid-template-columns: 1fr 20px 1fr !important;
    gap: 8px;
    align-items: stretch;
  }
  html body .bu-mshell-bar { background: #042f2e !important; }
  html body .bu-mobdock { background: #0b131f !important; border-top: 1px solid #1e293b; }
}

@media (min-width: 900px) {
  html body .bu-pcard { display: none !important; }
  html body.bu-board-page #bu-dispo .bu-bubble {
    font-size: 14px !important;
    line-height: 1.45 !important;
    max-width: 42rem;
  }
  html body.bu-board-page .bu-item.is-demo::before {
    content: "DEMO OGLAS";
    position: absolute;
    left: 8px;
    top: 5px;
    z-index: 3;
    background: #f59e0b;
    color: #1f1300;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .04em;
    padding: 2px 8px;
    border-radius: 999px;
  }
  html body.bu-board-page .bu-item.is-demo { position: relative; padding-top: 22px !important; }
}
