/* ================================
   VoIPstudio Termination Pricing UI
   (alignment-safe + long-prefix safe)
   ================================ */

.vtp { max-width: 100%; }

/* Controls row: keep it simple and non-invasive */
.vtp .vtp-controls {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

/* Labels: do NOT force min-height here (it can misalign layouts that include buttons/extra UI) */
.vtp .vtp-controls label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 16px;
  margin: 0;
  padding: 0;
}

/* Select fix: wider + reserve space for chevron + ellipsis */
.vtp .vtp-controls select {
  min-width: 260px;         /* slightly wider to avoid chevron overlap */
  box-sizing: border-box;
  border-radius: 8px;
  border-color: #9595954F;

  height: 44px;
  line-height: 44px;

  padding: 0 40px 0 12px;   /* right padding protects the chevron */
  margin: 0;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  font-size: 16px;
  font-weight: 400;
}

/* Status line */
.vtp-status { margin: 8px 0 12px; font-size: 14px; opacity: 0.85; }

/* Table baseline */
.vtp-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed; /* helps prevent one huge cell from stretching the whole table */
}

.vtp-table th, .vtp-table td {
  border-bottom: 1px solid #eee;
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;

  /* critical: allow long, comma-separated prefixes to wrap instead of breaking layout */
  overflow-wrap: anywhere;
  word-break: break-word;
}

.vtp-table thead th { border-bottom: 2px solid #ddd; }

/* If the prefixes block is inside a div/span, make sure it wraps too */
.vtp-table td * {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Mobile: stack controls and allow horizontal table scroll if needed */
@media (max-width: 768px) {
  .vtp .vtp-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .vtp .vtp-controls select {
    width: 100%;
    min-width: 100%;
  }

  /* Optional: keep table readable on small screens */
  .vtp-table {
    display: block;
    overflow-x: auto;
  }
}
