@charset "utf-8";

.mobile-tools-shell {
  display: none;
}

.offline-global-panel[hidden] {
  display: none !important;
}

@media (max-width: 767px) {
  body.has-mobile-tools {
    padding-bottom: 78px;
  }

  .mobile-tools-shell {
    display: block;
  }

  .mobile-bottom-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 119000;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    min-height: 62px;
    padding: 6px 6px max(6px, env(safe-area-inset-bottom));
    border-top: 1px solid #d8e0e7;
    background: rgba(255,255,255,.98);
    box-shadow: 0 -10px 28px rgba(15,23,42,.16);
  }

  .mobile-bottom-item {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 48px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #334155;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    text-decoration: none !important;
  }

  .mobile-bottom-item:hover,
  .mobile-bottom-item:focus,
  .mobile-bottom-item.is-active {
    background: #eef6ff;
    color: #0f4c81;
    outline: none;
  }

  .mobile-bottom-item.is-warning {
    background: #fffbeb;
    color: #92400e;
  }

  .mobile-bottom-item.is-danger {
    background: #fff1f2;
    color: #be123c;
  }

  .mobile-bottom-item.is-offline {
    background: #fef3c7;
    color: #78350f;
  }

  .mobile-bottom-icon {
    display: block;
    font-size: 18px;
    line-height: 1;
  }

  .mobile-bottom-badge {
    position: absolute;
    top: 2px;
    right: 13px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 19px;
    text-align: center;
  }

  .mobile-bottom-item.is-warning .mobile-bottom-badge,
  .mobile-bottom-item.is-offline .mobile-bottom-badge {
    background: #f59e0b;
  }

  .offline-global-panel {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(72px + env(safe-area-inset-bottom));
    z-index: 120500;
    max-height: min(68vh, 520px);
    overflow: auto;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(15,23,42,.28);
  }

  .offline-global-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
  }

  .offline-global-title {
    margin: 0;
    color: #0f172a;
    font-size: 15px;
    font-weight: 800;
  }

  .offline-global-sub {
    margin-top: 3px;
    color: #475569;
    font-size: 12px;
    line-height: 1.35;
  }

  .offline-global-close {
    min-width: 34px;
    height: 34px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    font-weight: 800;
  }

  .offline-global-body {
    padding: 12px;
  }

  .offline-global-status {
    margin-bottom: 10px;
    padding: 9px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 13px;
    line-height: 1.35;
  }

  .offline-global-panel.is-offline .offline-global-status {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
  }

  .offline-global-list {
    display: grid;
    gap: 8px;
  }

  .offline-global-item {
    display: grid;
    grid-template-columns: 10px 1fr;
    gap: 8px;
    padding: 9px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
  }

  .offline-global-dot {
    width: 10px;
    height: 10px;
    margin-top: 4px;
    border-radius: 999px;
    background: #f59e0b;
  }

  .offline-global-item-title {
    color: #0f172a;
    font-size: 13px;
    font-weight: 800;
  }

  .offline-global-item-meta {
    margin-top: 2px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
  }

  .offline-global-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
  }
}
