/* EXAMS-ADMIN-RTL-TOGGLES-1 (29 Oct 2026, Marc: "the yes/no buttons ... the buttons are open"): every PrimeVue SelectButton
 * (yes / no, auto / manual, fixed / percentage, free / paid) drawn as one framed two-state switch: both halves framed and the
 * same width, the selected half filled blue (the PrimeVue primary the app already uses), the other half outlined.
 * Linked on every page by resources/views/app.blade.php. CSS only: the component, its options and the posted values are untouched.
 * Logical properties (inline-start / end), so the first option (Yes, Auto) sits on the left in English and on the right in Arabic.
 * Why: app.css drops border-right on every half but the last and squares the inner corners physically; under dir="rtl" that
 * removes the OUTER edge of the first half and leaves the selected half looking like a lone button. Rollback: remove the link. */

.p-selectbutton.p-buttonset {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  max-width: 100%;
  vertical-align: middle;
}

.p-selectbutton.p-buttonset > .p-button.p-component {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 6rem;
  margin: 0;
  padding: .5rem 1rem;
  text-align: center;
  background: #fff;
  color: #1769aa;
  border: 1px solid #2196f3;
  border-radius: 0;
}

.p-selectbutton.p-buttonset > .p-button.p-component + .p-button.p-component {
  border-inline-start-width: 0;
}

.p-selectbutton.p-buttonset > .p-button.p-component:first-child {
  border-start-start-radius: 6px;
  border-end-start-radius: 6px;
}

.p-selectbutton.p-buttonset > .p-button.p-component:last-child {
  border-start-end-radius: 6px;
  border-end-end-radius: 6px;
}

.p-selectbutton.p-buttonset > .p-button.p-component:not(.p-disabled):not(.p-highlight):hover {
  background: #e3f2fd;
  border-color: #2196f3;
  color: #1769aa;
}

.p-selectbutton.p-buttonset > .p-button.p-component.p-highlight,
.p-selectbutton.p-buttonset > .p-button.p-component.p-highlight:hover {
  background: #2196f3;
  border-color: #2196f3;
  color: #fff;
}

.p-selectbutton.p-buttonset > .p-button.p-component:focus {
  box-shadow: none;
}

.p-selectbutton.p-buttonset > .p-button.p-component:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid #0d47a1;
  outline-offset: 2px;
}

.p-selectbutton.p-buttonset.p-invalid > .p-button.p-component,
.p-selectbutton.p-buttonset.p-error > .p-button.p-component {
  border-color: #f44336;
}
