/* Education application form (member / non-member split, review and confirmation).
   Contrast pairs (WCAG AAA):
   #262f3e on #eef1f4 11.9:1 · #3d2a00 on #fff4d6 12.5:1 · #0b3d1f on #e3f4e8 10.8:1
   #262f3e on #AFDA00 8.2:1 · #fff on #262f3e 13.5:1 · #262f3e on #e3e6e8 10.6:1 */

#sectionPravneOsebe [hidden],
#sectionFizicneOsebe [hidden] {
  display: none !important;
}

/* Instructions above both application types */
.applicationNotice {
  color: #262f3e;
  background: #eef1f4;
  border-left: 0.25rem solid #262f3e;
  padding: 1em 1.25em;
  margin: 0 0 1.5rem;
}
.applicationNotice h4 {
  margin: 0 0 0.5em;
  text-wrap: balance;
}
.applicationNotice ul {
  margin: 0;
  padding-left: 1.25em;
  display: grid;
  gap: 0.5em;
}
.applicationNotice li {
  text-wrap: pretty;
}

/* Member / non-member choice */
.applicationChoice {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin: 0 0 1.5rem;
}
.applicationChoice > p {
  margin: 0;
}
/* Each option is one button (title + description): a <button> for legal persons, a radio <label> for individuals */
.applicationChoiceButton {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5em;
  min-width: 0;
  width: 100%;
  min-height: 2.75rem;
  color: #262f3e;
  background: #fff;
  border: 0.125rem solid #262f3e;
  border-radius: 0.375rem;
  padding: 1em 1.25em;
  font: inherit;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
}
.applicationChoiceButton > strong {
  font-size: 1.125rem;
  text-wrap: balance;
}
.applicationChoiceButton > span {
  text-wrap: pretty;
}
.applicationChoiceButton:hover {
  background: #eef1f4;
}
.applicationChoiceButton[aria-expanded="true"],
.applicationChoiceButton:has(input:checked) {
  color: #fff;
  background: #262f3e;
}
/* The radio stays in the DOM (keyboard, screen readers, fizicneIsMember) but the whole card shows its state */
.applicationChoiceButton > input[type=radio] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
@media (min-width: 768px) {
  .applicationChoice {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .applicationChoice > p {
    grid-column: 1 / -1;
  }
}

/* Radios and checkboxes (global `input { display: block }` would stack them) */
.applicationConfirm input[type=checkbox] {
  display: inline-block;
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.125em 0 0;
  accent-color: #262f3e;
}

/* Warnings: non-member, full fee */
.applicationWarning {
  color: #3d2a00;
  background: #fff4d6;
  border-left: 0.25rem solid #8a6100;
  padding: 1em 1.25em;
  margin: 1rem 0;
  text-wrap: pretty;
}
.applicationWarning h5 {
  margin: 0 0 0.5em;
  font-size: 1rem;
  text-wrap: balance;
}
.applicationWarning p {
  margin: 0 0 0.5em;
}
.applicationWarning ul {
  margin: 0;
  padding-left: 1.25em;
}

.applicationStatusMember {
  color: #0b3d1f;
  background: #e3f4e8;
  border-left: 0.25rem solid #2e7d46;
  padding: 1em 1.25em;
  margin: 1rem 0;
}

/* Persons added to a legal-person application */
.applicationPersons {
  color: #262f3e;
  margin: 1.5rem 0;
}
.applicationPersons h4 {
  margin: 0 0 0.5em;
}
#legalPersonsList {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
#legalPersonsList li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5em 1em;
  min-width: 0;
  background: #fff;
  border: 1px solid #bdc1c6;
  padding: 0.5em 0.75em;
}
#legalPersonsList li > span:first-child {
  flex: 1 1 12rem;
  min-width: 0;
  overflow-wrap: anywhere;
}
#legalPersonsList .btn {
  min-height: 2.75rem;
  padding: 0 1em;
}

.applicationBadge {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: bold;
  padding: 0.25em 0.75em;
  border: 1px solid;
}
.applicationBadgeMember {
  color: #0b3d1f;
  background: #e3f4e8;
  border-color: #2e7d46;
}
.applicationBadgeNonMember {
  color: #3d2a00;
  background: #fff4d6;
  border-color: #8a6100;
}

/* Review step */
#podatkiOseb,
#podatkiPlacnika {
  margin: 0 0 2rem;
}
.applicationActions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0;
}
.applicationActions .btn {
  min-height: 2.75rem;
  padding: 0 1.25em;
}
.applicationPlainList {
  list-style: none;
  margin: 0;
  padding: 0;
}
.applicationSummary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.25em 1.5em;
  margin: 0 0 1rem;
  color: #262f3e;
}
.applicationSummary dt {
  font-weight: bold;
}
.applicationSummary dd {
  margin: 0 0 0.5em;
  overflow-wrap: anywhere;
}
@media (min-width: 480px) {
  .applicationSummary {
    grid-template-columns: minmax(0, 12rem) minmax(0, 1fr);
  }
  .applicationSummary dd {
    margin: 0;
  }
}

/* Review is not wrapped in .row/.col, so match the Bootstrap column gutter */
#fizicnePregled,
#formFizicneOsebeDataOutput {
  padding: 0 0.9375rem;
}

/* Explicit final confirmation */
.applicationConfirm {
  display: flex;
  align-items: flex-start;
  gap: 0.75em;
  color: #262f3e;
  background: #fff;
  border: 0.125rem solid #262f3e;
  padding: 1em;
  margin: 1.5rem 0 1rem;
  cursor: pointer;
  text-wrap: pretty;
}

/* Readonly fields taken from the member register */
#formFizicneOsebe input[readonly] {
  color: #262f3e;
  background: #e3e6e8;
  cursor: not-allowed;
}

/* Submit buttons: legacy white-on-green fails contrast, so use dark text here */
#sectionPravneOsebe .btn.type4,
#sectionFizicneOsebe .btn.type4 {
  color: #262f3e;
  font-weight: bold;
}
#sectionPravneOsebe .btn.type4:hover,
#sectionFizicneOsebe .btn.type4:hover {
  color: #fff;
  background: #262f3e;
  border-color: #262f3e;
}
#sectionPravneOsebe .btn.type4:disabled,
#sectionFizicneOsebe .btn.type4:disabled {
  color: #262f3e;
  background: #e3e6e8;
  border: 1px dashed #262f3e;
  cursor: not-allowed;
}
#sectionPravneOsebe .filter input[type=submit],
#sectionFizicneOsebe .filter input[type=submit] {
  min-width: 0;
  width: 100%;
}
@media (min-width: 480px) {
  #sectionPravneOsebe .filter input[type=submit],
  #sectionFizicneOsebe .filter input[type=submit] {
    width: auto;
    min-width: 18.75rem;
  }
}

/* Visible focus */
#sectionPravneOsebe .btn:focus-visible,
#sectionFizicneOsebe .btn:focus-visible,
.applicationChoiceButton:focus-visible,
.applicationChoiceButton:has(input:focus-visible),
.applicationConfirm input:focus-visible,
#fizicnePregled:focus-visible {
  outline: 0.1875rem solid #262f3e;
  outline-offset: 0.125rem;
}
