/* Mobile contact shortcuts and price cards; calculator controls keep their own state. */
.mobile-contact-bar,
.mobile-price-label {
  display: none;
}

#photo-dialog .dialog-close {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  line-height: 1;
  border: 1px solid #805d12;
}

@media screen and (max-width: 800px) {
  html.mobile-contact-enabled {
    scroll-padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }

  body.has-mobile-contact-actions {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }

  .site-main.mobile-calculator-outside .mobile-calc,
  .site-main.mobile-actions-suspended .mobile-calc,
  .site-bathroom.mobile-calculator-outside .mobile-bar,
  .site-bathroom.mobile-actions-suspended .mobile-bar {
    display: none;
  }

  .has-mobile-contact-actions .mobile-contact-bar:not([hidden]) {
    position: fixed;
    inset: auto 0 0;
    z-index: 35;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 8px max(12px, env(safe-area-inset-right, 0px))
      calc(8px + env(safe-area-inset-bottom, 0px))
      max(12px, env(safe-area-inset-left, 0px));
    border-top: 1px solid #d5cfc3;
    background: #fffefb;
    color: #232725;
    box-shadow: 0 -4px 18px #0002;
  }

  .has-mobile-contact-actions .mobile-contact-bar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    min-height: 52px;
    padding: 5px 6px;
    border: 1px solid #d5cfc3;
    border-radius: 8px;
    color: inherit;
    background: #fffefb;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    overflow-wrap: anywhere;
  }

  .has-mobile-contact-actions .mobile-contact-bar a:last-child {
    border-color: #805d12;
    background: #f2c45e;
  }

  .has-mobile-contact-actions .mobile-contact-bar a:hover {
    background: #f8edd3;
  }

  .has-mobile-contact-actions .mobile-contact-bar a:focus-visible {
    outline: 3px solid #805d12;
    outline-offset: 2px;
  }

  .mobile-contact-bar .point-icon {
    width: 21px;
    height: 21px;
    flex: none;
  }
}

@media screen and (max-width: 600px) {
  #cennik .mobile-price-table-scroll {
    overflow: visible;
    border-radius: 0;
  }

  #cennik .mobile-price-table {
    display: block;
    width: 100%;
  }

  /* Column headers remain available to assistive technology. */
  #cennik .mobile-price-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  #cennik .mobile-price-table tbody {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  #cennik .mobile-price-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
    border: 1px solid #d5cfc3;
    border-radius: 10px;
    color: #232725;
    background: #fffefb;
  }

  #cennik .mobile-price-table tbody td {
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
    font-size: 14px;
    line-height: 1.55;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #cennik .mobile-price-table tbody td:first-child .point-label {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
  }

  #cennik .mobile-price-table tbody td small {
    margin-top: 8px;
    font-size: 13px;
    color: #555e55;
    line-height: 1.55;
  }

  #cennik .mobile-price-table tbody td:nth-child(2) {
    font-size: 18px;
    font-weight: 700;
  }

  #cennik .mobile-price-table .mobile-price-label {
    display: block;
    margin-bottom: 4px;
    color: #555e55;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
  }

  #cennik .mobile-price-table tbody td a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    max-width: 100%;
    font-size: 14px;
    line-height: 1.5;
    white-space: normal;
    text-decoration: underline;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
  }
}

@media print {
  .mobile-contact-bar,
  .mobile-price-label {
    display: none !important;
  }
}
