/*
 * Election pages — structural styles only, until the final design.
 * Fonts, colours of text and buttons (.btn) come from the theme.
 * Colours here are tokens to replace with the design's values.
 */

.lma-el {
  --lma-el-accent: #b3263c;
  --lma-el-muted: #6b6b6b;
  --lma-el-bg: #eeeeec;
  --lma-el-border: #dcdcdc;
  --lma-el-error: #b3263c;
  --lma-el-success: #00a47a;
  --lma-el-radius: 1.5rem;
  --lma-el-gap: 1.5rem;
  --lma-el-form-color: #5D6978;
}

footer .menu-elections-menu-container .navigation_btn a {
    color: inherit;
    font-size: inherit;
    border-radius: 0;
    background: unset;
    padding: 0;
    text-align: left;
    line-height: 1.75;
}

.lma-el .th_page_section_content {
    margin-top: 220px;
    margin-bottom: 120px;
    padding: 35px;
    border-radius: 20px;
    background-color: #fff;
        box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.15);
}
.lma-el .th_page_section .wrapper {
    max-width: 1370px;
    padding: 0;
    
}
/* Header: eyebrow + title, optional logo on the right */
.lma-el-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--lma-el-gap);
  margin-bottom: var(--lma-el-gap);
}
.lma-el-header__eyebrow {
  margin: 0 0 1.2rem;
  font-size: var(--wp--preset--font-size--x-small);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--lma-el-accent);
}
.lma-el-header__logo {
  display: block;
  max-height: 100px;
  width: auto;
  object-fit: contain;
  object-position: top right;
}
.lma-el-intro,
.lma-el-outro,
.lma-el-members-link {
  margin-bottom: 2em;
}

.lma-el-intro{
  font-size: var(--wp--preset--font-size--regular);
  color: var(--wp--preset--color--alter-font);
}
.lma-el-intro p{
  margin-bottom: 1em;
  font-size: var(--wp--preset--font-size--regular);
}
.lma-el-outro{
  margin-bottom: 0em;
  margin-top: 2em;
  color: var(--lma-el-form-color);
  font-size: var(--wp--preset--font-size--small);
}

.lma-el-outro p{
  margin-bottom: 1em;
  font-size: var(--wp--preset--font-size--small);
}
.lma-el-message {
  font-size: 1.125rem;
}

/* Landing tiles */
.lma-el-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--lma-el-gap); 
  margin: 0;
  padding: 0;
  list-style: none;
}
.lma-el-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  padding: var(--lma-el-gap); 
  border-radius: var(--lma-el-radius);
  background-color: var(--lma-el-bg);
}
.lma-el-tile__status {
  border-radius: 999px;
  font-size: 0.8rem;
  background: #dde9e1;
  color: #4eb390;
  line-height: 1;
  display: block;
  padding: 0.8em 1em 0.5em 1em;
  font-size: var(--wp--preset--font-size--x-small);
  margin-bottom: var(--lma-el-gap); 
}
.lma-el-tile--voting .lma-el-tile__status {
  background: #fdf0e6;
}
.lma-el-tile__title {
  font-style: normal;
  font-weight: bold;
}
.lma-el h1{
  margin-top: var(--wp--preset--spacing--0);
  margin-bottom: var(--wp--preset--spacing--20);
  font-size: var(--wp--preset--font-size--large);
  font-weight: bold;
  color: var(--wp--preset--color--contrast);
}

.lma-el-tile__round {
  margin: 0 0 0.5rem;
  color: var(--lma-el-muted);
  font-size: var(--wp--preset--font-size--x-small);
}
.lma-el-tile__deadline{
    margin: 0 0 1.5rem;
  color: var(--lma-el-muted);
  font-size: var(--wp--preset--font-size--x-small);
}
.btn.lma-el-tile__action {
  margin-top: auto;
  font-size: var(--wp--preset--font-size--small);

      padding: 1.1em 3.5em 1.1em 2em;

    border-radius: 40px;
    background-size: 1.25em auto;
    background-position: right 0.75em center;
}

/* Forms */
.lma-el-fieldset {
  margin: 0 0 2rem;
  padding: 0;
  border: 0;
}
.lma-el--voting .lma-el-fieldset.lma-el-fieldset__votee_details{
  background-color: #f2f4f1;
  padding: 1.5rem;
  border-radius: 20px;
}
.lma-el-fieldset__legend {
  margin-bottom: 1.25em;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--lma-el-form-color);
  padding: 3px 0;
  border-bottom: 1px solid #d9dbd6;
  width: 100%;
}
.lma-el-fieldset__legend {
  float: left;   /* removes the legend's special placement on the border: the background now covers it */
  width: 100%;
}
.lma-el-fieldset__legend + * {
  clear: both;   /* the content after the floated legend starts below it */
}
.lma-el-candidate__role{
  font-size: var(--wp--preset--font-size--x-small);
}
.lma-el-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem var(--lma-el-gap);
}
@media (min-width: 768px) {

  .lma-el-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.lma-el-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.lma-el-field--wide {
  margin-bottom: 2rem;
}
.lma-el-field__input,
input[type="text"].lma-el-field__input, input[type="tel"].lma-el-field__input, input[type="email"].lma-el-field__input, textarea.lma-el-field__input{
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #c1c1c1;
  border-radius: 12px;
  width: 100%;
  font-weight: 400;
  line-height: 1;
  padding: 1em;
  background-color: var(--lma-el-bg);
  font-size: var(--wp--preset--font-size--small);
  ascent-override: 92%;
  descent-override: 21%;
  line-gap-override: 0%;
}
input.lma-el-field__input::placeholder,
textarea.lma-el-field__input::placeholder{
  color: var(--lma-el-form-color);
  font-size: var(--wp--preset--font-size--x-small);
}

.lma-el-field__input--textarea {
  min-height: 9rem;
  resize: vertical;
}
.lma-el-field__required {
  margin-left: 0.15em;
  color: var(--lma-el-accent);
}
.lma-el-field__hint,
.lma-el-field__count {
  margin: 0;
  font-size: 0.875rem;
  color: var(--lma-el-muted);
}
.lma-el-field__count--over {
  color: var(--lma-el-error);
}
.lma-el-field__error,
.lma-el-form__alert {
  margin: 0;
  color: var(--lma-el-error);
  font-size: var(--wp--preset--font-size--x-small);
}
.lma-el-form__alert {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--lma-el-error);
  border-radius: var(--lma-el-radius);
}
.lma-el-field--invalid .lma-el-field__input {
  border-color: var(--lma-el-error);
}

/* Representation: radio buttons shown as pills. */
.lma-el-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 2rem;
  padding: 0;
  border: 0;
  min-inline-size: 0; /* fieldset otherwise refuses to shrink on narrow screens */
  flex-direction: row;
}
.lma-el-choice > .lma-el-field__label {
  margin-bottom: 0.75rem;
}
.lma-el-choice > .lma-el-field__error {
  flex-basis: 100%;
}

.lma-el-choice__option {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.25rem 0.4rem 1.25rem;
  border: 1px solid var(--lma-el-border);
  border-radius: 999px;
  background-color: #fff;
  color: var(--lma-el-form-color);
  font-size: 0.9375rem;
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.lma-el-choice__option:hover {
  border-color: var(--lma-el-form-color);
}

/* The radio stays in the page (keyboard, screen readers, required) but is invisible. */
.lma-el-choice__option input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.lma-el-choice__option:has(input:checked) {
  border-color: var(--lma-el-accent);
  background-color: var(--lma-el-accent);
  color: #fff;
  font-weight: 500;
}
.lma-el-choice__option:has(input:focus-visible) {
  outline: 2px solid var(--lma-el-accent);
  outline-offset: 2px;
}

.lma-el-field--invalid .lma-el-choice__option {
  border-color: var(--lma-el-error);
}

/* Windows high-contrast mode drops backgrounds: mark the choice with a thick border. */
@media (forced-colors: active) {
  .lma-el-choice__option:has(input:checked) {
    border-width: 3px;
  }
}
/* Honeypot: off-screen rather than display:none, which simple bots detect */
.lma-el-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Ballot */
.lma-el-candidates {
  position: relative; /* anchors the counter to the top right */
}
.lma-el-candidates__count {
  position: absolute;
  top: 0;
  right: 0;
  margin: 0;
  padding: 0.5em 1em;
  border-radius: 999px;
  background-color: #f8e9eb;
  background-color: color-mix(in srgb, var(--lma-el-accent) 10%, #fff);
  color: var(--lma-el-accent);
  font-size: 0.8125rem;
  line-height: 1.2;
}
.lma-el-candidates__list {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

/* Candidate row: [checkbox + name, company] [Show biography], biography below across the card */
.lma-el-candidate {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--lma-el-border);
  border-radius: var(--lma-el-radius);
}
.lma-el-candidate__check_wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0; /* long names wrap instead of pushing the toggle out */
}
.lma-el-candidate__label {
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.lma-el-candidate__name {
  font-weight: 500;
}
.lma-el-candidate__job {
  color: var(--lma-el-form-color);
}
.lma-el-candidate__company {
  color: var(--lma-el-accent);
}
.lma-el-candidates__hint{
  color: var(--lma-el-form-color);
}
/* Checkbox drawn by us so it looks the same in every browser; still a real checkbox. */
.lma-el-candidate__check {
  appearance: none;
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  border: 1.5px solid #c1c1c1;
  border-radius: 4px;
  background: #fff center / 0.85rem no-repeat;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.lma-el-candidate__check:hover {
  border-color: var(--lma-el-accent);
}
.lma-el-candidate__check:checked {
  border-color: var(--lma-el-accent);
  background-color: var(--lma-el-accent);
  /* <input> has no ::before/::after in every browser, so the tick is a background image. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.lma-el-candidate__check:focus-visible {
  outline: 2px solid var(--lma-el-accent);
  outline-offset: 2px;
}
.lma-el-candidate__check:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
/* Windows high-contrast mode drops backgrounds and the tick with them: use the system checkbox. */
@media (forced-colors: active) {
  .lma-el-candidate__check {
    appearance: auto;
  }
}

.lma-el-candidate__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  margin: 0;
  padding: 0.25rem 0;
  border: 0;
  background: none;
  color: var(--lma-el-accent);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}
.lma-el-candidate__toggle:focus-visible {
  outline: 2px solid var(--lma-el-accent);
  outline-offset: 2px;
}
/* ▼ drawn with borders; turns into ▲ when open */
.lma-el-candidate__arrow {
  width: 0;
  height: 0;
  border-left: 0.3em solid transparent;
  border-right: 0.3em solid transparent;
  border-top: 0.4em solid currentColor;
  transition: transform 0.15s;
}
.lma-el-candidate__toggle[aria-expanded="true"] .lma-el-candidate__arrow {
  transform: rotate(180deg);
}
.lma-el-candidate__bio {
  grid-column: 1 / -1;
  padding: 0.75rem;
  border-left: 2px solid var(--lma-el-accent);
  color: var(--lma-el-form-color);
}
.lma-el-candidate__bio[hidden] {
  display: none;
}
.lma-el-candidate__bio p {
  margin: 0 0 0.5em;
}
.lma-el-candidate__bio p:last-child {
  margin-bottom: 0;
}


.lma-el-candidate--disabled .lma-el-candidate__label {
  cursor: not-allowed;
  opacity: 0.55;
}

/* Visually hidden, still read by screen readers */
.lma-el-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Thank-you block: replaces the whole card content after a submission */
.lma-el-thanks {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 40rem;
  margin: 0 auto;
  padding: 2rem 0;
  text-align: center;
}
.lma-el-thanks__icon {
  color: var(--lma-el-success);
}
.lma-el-thanks__title {
  margin: 0;
}
.lma-el-thanks__title:focus {
  outline: none;
}
.lma-el-thanks__text {
  margin: 0;
}
.lma-el-thanks__others {
  margin: 1rem 0 0;
  color: var(--lma-el-muted);
}
.lma-el-thanks__link {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--lma-el-accent);
  border-radius: 999px;
  color: var(--lma-el-accent);
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.lma-el-thanks__link:hover,
.lma-el-thanks__link:focus-visible {
  background-color: var(--lma-el-accent);
  color: #fff;
}

.lma-el-form[aria-busy="true"] .lma-el-form__submit {
  cursor: progress;
  opacity: 0.7;
}
@media (max-width: 1024px) {
  .lma-el {
    --lma-el-gap: 1rem;
  }
  .lma-el .th_page_section_content {
    margin-top: 50px;
    margin-bottom: 50px;
    padding: 25px 20px;
  }
    .lma-el-header__logo {
    max-height: 90px;
  }
  .lma-el-header__eyebrow {
    font-size: 13px;
  }
}
/* Phones: the toggle moves under the name so long names keep the full width. */
@media (max-width: 600px) {
  .lma-el-candidate {
    grid-template-columns: 1fr;
  }
  .lma-el-candidate__toggle {
    justify-self: start;
    margin-left: 2.25rem; /* checkbox + gap: lines up with the name */
  }
  .lma-el-header {
    display: block;
  }
  .lma-el-header__logo {
    max-height: 80px;
  }
  .lma-el--voting .lma-el-fieldset.lma-el-fieldset__votee_details {
    padding: 1rem;
  }
  .lma-el-field__input, input[type="text"].lma-el-field__input, input[type="tel"].lma-el-field__input, input[type="email"].lma-el-field__input, textarea.lma-el-field__input {
    padding: 0.6em 0.4em 0.4em 0.6em;
  }

  .lma-el-header__eyebrow {
    font-size: 12px;
  }
  .lma-el-candidate__bio {
    padding: 0.5rem;
  }
  .lma-el .th_page_section_content {
    margin-top: 30px;
    margin-bottom: 30px;
    padding: 25px 15px;
  }
}