/*! (c) 2025 @meteobezana - Bezana Explorer · Floating Controls (desktop) */

/* ══════════════════════════════════════════════════════════════
   Solo activo en desktop (≥ 1025px)
   En tablet/móvil los botones siguen en el topbar sin cambios
   ══════════════════════════════════════════════════════════════ */

@media (min-width: 1025px) {

  /* ── Ocultar los botones de capas e info del header en desktop ── */
  .tb-right--desktop-only {
    display: none !important;
  }

  /* ══════════════════════════════════════════════
     PANEL FLOTANTE — fondo oscuro igual que el topbar
  ══════════════════════════════════════════════ */
  #floating-controls {
    position: fixed;
    top: 76px;
    right: 18px;
    z-index: 7500;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;

    background: #111418;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.50), 0 2px 8px rgba(0, 0, 0, 0.30);

    padding: 10px 8px;
    min-width: 50px;

    user-select: none;
    touch-action: none;
    cursor: grab;

    animation: fcSlideIn .28s cubic-bezier(.34, 1.2, .64, 1) both;
  }

  #floating-controls:active { cursor: grabbing; }

  #floating-controls.fc-dragging {
    cursor: grabbing;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.60), 0 4px 16px rgba(0, 0, 0, 0.35);
    transform: scale(1.04);
    transition: box-shadow .12s, transform .12s;
  }

  @keyframes fcSlideIn {
    from { opacity: 0; transform: translateX(14px) scale(.95); }
    to   { opacity: 1; transform: translateX(0)    scale(1);   }
  }

  /* ── Handle de arrastre ── */
  #fc-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 12px;
    margin-bottom: 4px;
    cursor: grab;
    flex-shrink: 0;
  }

  #fc-handle:active { cursor: grabbing; }

  #fc-handle::before {
    content: '';
    display: block;
    width: 20px;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.20);
    box-shadow: 0 5px 0 rgba(255, 255, 255, 0.20);
  }

  /* ── Separador ── */
  .fc-sep {
    width: 28px;
    height: 1px;
    background: rgba(255, 255, 255, 0.10);
    margin: 1px 0;
    flex-shrink: 0;
  }

  /* ── Botones ── */
  .fc-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1.5px solid rgba(111, 163, 232, 0.50);
    background: rgba(59, 125, 216, 0.22);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    transition:
      background .15s,
      border-color .15s,
      transform .16s cubic-bezier(.34, 1.4, .64, 1),
      box-shadow .15s;
    pointer-events: auto;
  }

  .fc-btn .material-icons-round {
    font-size: 20px !important;
    color: #6fa3e8;
    pointer-events: none;
    transition: color .15s;
  }

  .fc-btn:hover {
    background: rgba(59, 125, 216, 0.40) !important;
    border-color: rgba(111, 163, 232, 0.85) !important;
    transform: scale(1.09);
    box-shadow: 0 4px 16px rgba(59, 125, 216, 0.38);
  }

  .fc-btn:hover .material-icons-round {
    color: #d0e6ff !important;
  }

  .fc-btn.active {
    background: linear-gradient(135deg, #3b7dd8 0%, #1d4ed8 100%) !important;
    border-color: rgba(111, 163, 232, 0.70) !important;
    box-shadow: 0 3px 14px rgba(59, 125, 216, 0.48) !important;
  }

  .fc-btn.active .material-icons-round {
    color: #fff !important;
  }

  /* ── Tooltip lateral ── */
  .fc-tooltip {
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%) translateX(5px);
    background: rgba(15, 18, 23, 0.95);
    color: #f0f2f5;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-ui, 'Inter', sans-serif);
    padding: 5px 10px;
    border-radius: 8px;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.10);
    opacity: 0;
    transition: opacity .16s ease, transform .16s ease;
    z-index: 1;
  }

  .fc-tooltip::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: rgba(15, 18, 23, 0.95);
    border-right: none;
  }

  .fc-btn:hover .fc-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }

} /* end @media desktop */
