/*
 * Touch/responsive overrides.
 */

/* Tablet */
@media (max-width: 1024px) {
  ui-icon, .icon {
    width: 72px;
  }
  .icon__image {
    width: 28px;
    height: 28px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --taskbar-height: 44px;
    --titlebar-height: 32px;
  }

  /* Maximize all windows on mobile */
  ui-dialog,
  .ui-dialog {
    left: 0 !important;
    top: 0 !important;
    width: 100vw !important;
    height: calc(100vh - var(--taskbar-height)) !important;
    border: none !important;
    box-shadow: none !important;
  }

  .ui-dialog__resize-handles {
    display: none;
  }

  /* Larger touch targets */
  .ui-dialog__btn {
    width: 32px;
    height: 32px;
  }

  .taskbar__program-btn {
    min-width: 44px;
    max-width: 44px;
    justify-content: center;
  }

  .taskbar__program-label {
    display: none;
  }

  .taskbar__start span {
    display: none;
  }

  /* Hide scrollbar buttons on mobile */
  ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }
  ::-webkit-scrollbar-button {
    display: none;
  }
  ::-webkit-scrollbar-track {
    border: none;
  }
  ::-webkit-scrollbar-thumb {
    border: none;
    border-radius: 3px;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  input, select, textarea {
    font-size: 16px !important; /* Prevents iOS zoom */
  }
  button {
    min-height: 36px;
  }
}

/* Touch devices */
@media (hover: none) and (pointer: coarse) {
  .ui-menu__menuitem {
    padding: 8px 24px 8px 24px;
  }

  .ui-dialog__btn {
    width: 36px;
    height: 36px;
  }
}
