/* ============================================================
   mobile.css -- Online Tip Calculator
   Mobile overrides (max-width: 768px) and extra-small tweaks
   ============================================================ */

@media (max-width: 768px) {

  /* ----- Header --------------------------------------------- */
  .site-header { padding: var(--sp-sm) var(--sp-md); }
  .site-title  { font-size: 1.125rem; }

  /* ----- Calculator: single column -------------------------- */
  .calculator-layout {
    grid-template-columns: 1fr;
    padding: 0 var(--sp-md);
    margin: var(--sp-md) auto;
    gap: var(--sp-md);
  }

  /* ----- Service type: swap to native select on mobile ------ */
  .custom-select-wrapper { display: none; }

  .native-select {
    display: block;
    width: 100%;
    height: 56px;
    border: 1px solid var(--color-outline);
    border-radius: var(--r-sm);
    padding: 0 40px 0 var(--sp-md);
    font-size: var(--fs-body);
    font-family: var(--font);
    color: var(--color-on-surface);
    background-color: var(--color-surface);
    -webkit-appearance: none;
    appearance: none;
    /* Chevron arrow drawn inline as data URI to avoid extra file dependency */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2385736E' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    outline: none;
    cursor: pointer;
  }

  .native-select:focus {
    border-color: var(--color-primary);
    border-width: 2px;
    box-shadow: 0 0 0 3px rgba(230,81,0,.12);
  }

  /* ----- Preset chips: hidden on mobile --------------------- */
  .preset-chips { display: none; }

  /* ----- Slider section ------------------------------------- */
  .slider-section { padding: var(--sp-sm) var(--sp-md); }

  /* ----- Results card --------------------------------------- */
  .results-card { padding: var(--sp-md); }

  /* ----- SEO content ---------------------------------------- */
  .seo-content {
    padding: 0 var(--sp-md);
    margin: var(--sp-xl) auto;
  }

  .tip-guide-grid { grid-template-columns: 1fr; }

  /* ----- Footer --------------------------------------------- */
  .site-footer {
    padding: var(--sp-md);
    /* Extra bottom clearance for sticky ad when activated */
    padding-bottom: calc(var(--sp-md) + 60px);
  }

  /* ----- Mobile sticky ad banner (shown when activated) ----- */
  .ad-sticky-mobile {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-outline-variant);
    z-index: 500;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

}

/* ----- Extra-small screens (< 400px) ----------------------- */
@media (max-width: 400px) {

  .action-buttons { flex-direction: column; }

  .result-per-person .result-value { font-size: 1.125rem; }

}
