/* Hide the native WooCommerce variations table once the custom UI takes
   over. Kept in the DOM (not display:none) so WooCommerce's own script
   can still read/write the underlying selects. */
.vs-native-table-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
}

.vs-variations-ui {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

/* ---------- Subscription type: two buttons ---------- */
.vs-subscription-type {
  display: flex;
  gap: 0.75rem;
}

.vs-type-btn {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  text-align: center;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.vs-type-btn input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.vs-type-btn:hover {
  border-color: #999;
}

.vs-type-btn:has(input:checked) {
  border-color: #000;
  background: #000;
  color: #fff;
}

.vs-type-btn:has(input:focus-visible) {
  outline: 2px solid #000;
  outline-offset: 2px;
}

/* ---------- Interval: toggle ---------- */
.vs-interval-toggle {
  display: inline-flex;
  border: 1px solid #ccc;
  border-radius: 999px;
  padding: 3px;
  width: fit-content;
}

.vs-toggle-option {
  position: relative;
  padding: 0.5rem 1.1rem;
  margin-bottom:0 !important;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.vs-toggle-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.vs-toggle-option:has(input:checked) {
  background: #000;
  color: #fff;
}

.vs-toggle-option:has(input:focus-visible) {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.vs-toggle-option:has(input:disabled) {
  opacity: 0.4;
  cursor: not-allowed;
}

.vs-interval-note {
  font-size: 0.8rem;
  color: #666;
  line-height: 1.5;
  margin-top: -0.75rem;
}

.vs-interval-note a {
  color: inherit;
  text-decoration: underline;
}

/* ---------- Format: table (radio | name | price) ---------- */
.vs-format-table {
  width: 100%;
  border-collapse: collapse;
}

.vs-format-row {
  cursor: pointer;
}

.vs-format-row td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid #eee;
  transition: background-color 0.15s ease;
}

.vs-format-row:hover td {
  background: #fafafa;
}

.vs-format-row:has(input:checked) td {
  background: #f5f5f5;
}

.vs-format-row:has(input:checked) td:first-child {
  box-shadow: inset 3px 0 0 #000;
}

.vs-format-radio {
  width: 2.5rem;
}

.vs-format-radio input[type="radio"] {
  width: 1.6em;
  height: 1.6em;
  cursor: pointer;
  margin-top:0;
}



.vs-format-name label,
.vs-format-price label {
  cursor: pointer;
  display: block;
  margin-top:10px;
}

.vs-format-price {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.vs-format-unavailable {
  opacity: 0.4;
}

.vs-format-unavailable td {
  cursor: not-allowed;
}

.vs-format-unavailable label {
  cursor: not-allowed;
}

/* ---------- Print shipping notice ---------- */
p.vs-shipping-notice,
td.vs-shipping-notice {
  font-size: 0.85rem;
  color: #444;
  background: #f7f4ea;
  border-left: 3px solid #b8860b;
  padding: 0.65rem 0.9rem;
  line-height: 1.5;
}

tr.vs-shipping-notice-row td {
  padding: 0;
  border-bottom: none;
}

tr.vs-shipping-notice-row td.vs-shipping-notice {
  padding: 0.65rem 0.9rem;
}
