/* ============================================
   slap-map-tablet.css — Slap Map on a touch tablet (B11, Oct 2026)
   Touch screens wider than a phone (pointer: coarse) can make spots too.
   These are the phone's Create Spot styles from slap-map.css (its
   max-width: 767px blocks), for the bigger screen:
   - the Create Spot pill in the map's top right corner
   - the pin you drag the map under (controls.js centers it on the map)
   - the "use one of your backgrounds" sheet, capped and centered
   A computer with a mouse is unchanged: no Create Spot.
   ============================================ */

@media (min-width: 768px) and (pointer: coarse) {
  #slap-map-create-btn {
    display: flex;
  }

  #slap-map-create-btn.slap-map-create-corner {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    align-items: center;
    width: auto;
    height: 44px;
    padding: 0 16px 0 13px;
    gap: 7px;
    border: none;
    border-radius: 999px;
    background: #6D28D9;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(109, 40, 217, 0.45);
    font-family: var(--font-display, 'Poppins', sans-serif);
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
  }

  #slap-map-create-btn.slap-map-create-corner svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }

  /* Tip of the pin sits on the middle of the map (left/top set in controls.js) */
  .slap-map-center-pin {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -100%);
    z-index: 200;
    pointer-events: none;
    filter: drop-shadow(0 2px 8px rgba(109, 40, 217, 0.45));
  }

  /* Pick one of your backgrounds */
  .slap-map-create-bg-sheet {
    position: fixed;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
    left: 0;
    right: 0;
    margin: 0 auto;
    max-width: 640px;
    z-index: 2000;
    background: rgba(20, 10, 40, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    max-height: calc(100dvh - 140px);
    display: flex;
    flex-direction: column;
  }

  .slap-map-create-bg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    flex-shrink: 0;
  }

  .slap-map-create-bg-title {
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
  }

  .slap-map-create-bg-close {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    padding: 4px;
  }

  .slap-map-create-bg-grid {
    flex: 1;
    overflow-y: auto;
    padding: 8px 16px 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    align-content: start;
  }

  .slap-map-create-bg-tile {
    aspect-ratio: 9 / 16;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.15s;
  }

  .slap-map-create-bg-tile:active {
    border-color: #14B8A6;
  }

  .slap-map-create-bg-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .slap-map-create-bg-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 32px 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
  }
}
