.prices-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: -100vh;
  top: auto;
  z-index: 4000;
  transition: bottom 0.5s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
  background: transparent;
}

.prices-sheet.open {
  bottom: 0;
  pointer-events: auto;
}

.prices-sheet-backdrop {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background: rgba(0,30,60,0.6);
  z-index: 0;
  transition: opacity 0.3s;
  opacity: 0;
  pointer-events: none;
}

.prices-sheet.open .prices-sheet-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.prices-sheet-content {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: auto;
  min-width: 650px; /* Increased minimum width to avoid overlap */
  max-width: 98vw;
  background: #fff;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 0 40px #37A8;
  padding: 32px 24px 24px 24px;
  z-index: 1;
  text-align: center;
  display: block;
}

.prices-sheet-title {
  color: #37A;
  margin-bottom: 1.5rem;
}

.prices-sheet-close {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 2rem;
  background: none;
  color: #369;
  border: none;
  cursor: pointer;
  box-shadow: none;
  width: 44px;
  height: 44px;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prices-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 0;
}

.prices-tab {
  background: #369;
  color: #fff;
  border: none !important;
  outline: none !important;
  box-shadow: 0 2px 8px #37A2;
  border-radius: 8px;
  padding: 12px 32px;
  font-size: 1.1em;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
  margin-bottom: 0;
  position: relative;
  z-index: 2;
  font-family: "Raleway", sans-serif;
  font-weight: 500;
  display: inline-block;
}

.prices-tab.active,
.prices-tab:focus,
.prices-tab:hover {
  background: #38B;
  color: #fff;
  box-shadow: 0 4px 16px #37A2;
  border: none !important;
  outline: none !important;
}

.prices-tab-content {
  margin-top: 0;
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.5s, transform 0.5s;
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1;
  pointer-events: none;
}

.prices-tab-content.active {
  opacity: 1;
  transform: scale(1);
  position: static;
  pointer-events: auto;
}

.prices-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0;
  font-size: 1.1em;
  background: #f8faff;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px #37A2;
  border-top: none !important;
  table-layout: auto;
  word-break: keep-all;
  white-space: nowrap;
}

.prices-table th, .prices-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #e9ecef;
  text-align: left;
  white-space: nowrap;
}

.prices-table th {
  background: #37A;
  color: #fff;
  font-weight: 600;
}

.prices-table tr:last-child td {
  border-bottom: none;
}

/* Business tab header only (not a table row) */
.prices-table thead {
  font-size: 0.6em;
  text-align: left;
  padding: 0;
  background: none;
  color: #333;
  font-weight: 300;
  line-height: 1.6;
}

@media (max-width: 1400px) {
  .prices-sheet-content {
    max-width: 98vw;
    min-width: 350px;
    font-size: 0.7em; /* Scale down business tab header */
    padding: 12px 2vw 12px 2vw; /* Reduce padding for more space */
  }
  .prices-table th, .prices-table td {
    padding: 7px 4px;
    font-size: 0.8em; /* Scale down to half */
    white-space: normal;
  }
  .prices-tabs {
    gap: 4px;
  }
  .prices-tab {
    padding: 6px 6px;
    font-size: 0.8em; /* Scale down to half */
    min-width: 70px;
  }
  .prices-table {
    white-space: normal;
  }
  .prices-table thead {
    line-height: 1.4;
  }
  .prices-sheet-close {
    top: 8px;
    right: 8px;
    font-size: 1.2rem;
    width: 32px;
    height: 32px;
  }
}

body.prices-blur > :not(.prices-sheet) {
  filter: blur(6px) brightness(0.95);
  transition: filter 0.5s cubic-bezier(.4,0,.2,1);
}