.section-title:has(+ .qm-filter-wrapper) {
  text-align: center;
  margin-bottom: 70px;
}
.application_form_section .row > div {
  width: 100%;
}
.section-title:has(+ .qm-filter-wrapper) > * {
  max-width: 575px;
  margin-left: auto;
  margin-right: auto;
}
.qm-filter-wrapper {
  margin-bottom: 20px;
}

.qm-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Candidates toolbar: country + sort + search + counter + grid */
.qm-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 28px;
  width: 100%;
}

.qm-toolbar__left {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 20px 36px;
  flex: 1 1 280px;
  min-width: 0;
}

.qm-toolbar__right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px 16px;
  flex: 0 1 auto;
  margin-left: auto;
}

.qm-toolbar .qm-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.qm-toolbar .qm-field label {
  position: static;
  margin: 0;
  padding: 0;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.2;
  color: var(--black, #111);
}

.qm-field__label-spacer {
  display: block;
  min-height: calc(15px * 1.2);
  margin-bottom: 0;
  pointer-events: none;
}

.qm-field--grow {
  flex: 1 1 200px;
  max-width: 360px;
}

.qm-field--search .qm-candidate-search {
  width: 100%;
  max-width: none;
}

.qm-toolbar-select,
.qm-toolbar .qm-filter-select,
.qm-toolbar .qm-sort-select {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 280px;
  margin: 0;
  padding: 0 0 8px 0;
  border: none;
  border-bottom: 1px solid #d8d8d8;
  border-radius: 0;
  background: transparent;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.35;
  color: var(--black, #111);
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.qm-toolbar-select:hover,
.qm-toolbar .qm-filter-select:hover,
.qm-toolbar .qm-sort-select:hover {
  border-bottom-color: var(--black, #111);
}

.qm-toolbar-select:focus,
.qm-toolbar .qm-filter-select:focus,
.qm-toolbar .qm-sort-select:focus {
  border-bottom-color: var(--blue, #2355ad);
}

.qm-toolbar option {
  color: var(--black, #111);
}

.qm-candidate-search {
  box-sizing: border-box;
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.25;
  color: var(--black, #111);
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.qm-candidate-search::placeholder {
  color: #a8a8a8;
  font-weight: 400;
}

.qm-candidate-search:focus {
  border-color: var(--blue, #2355ad);
  box-shadow: 0 0 0 1px rgba(35, 85, 173, 0.12);
}

.qm-toolbar .qm-results-counter {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 400;
  color: #666;
  text-align: right;
  white-space: nowrap;
}

.qm-toolbar .qm-results-counter strong {
  font-weight: 600;
  color: var(--black, #111);
}

.qm-toolbar .qm-grid-btn {
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  margin: 0 2px;
}

.qm-toolbar .qm-grid-btn svg path {
  stroke: #c9c9c9;
}

.qm-toolbar .qm-grid-btn.active svg path {
  stroke: var(--black);
}

.qm-toolbar .qm-grid-btn svg {
  width: 26px;
  height: 26px;
}
.qm-form,
.qm-gallery {
  margin: 0 auto;
}
p#qm-pagination-status {
  display: none;
}

.qm-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0px -12px;
}

.qm-grid.qm-is-loading {
  opacity: 0.45;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* Vote / like result popup */
.vote-popup {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
}

.vote-popup-inner {
  width: 100%;
  max-width: 420px;
}

.vote-popup-box {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 28px 24px 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.vote-popup-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #666;
  border-radius: 8px;
}

.vote-popup-close:hover {
  background: #f0f0f0;
  color: #111;
}

.vote-popup-content {
  text-align: center;
}

.vote-popup-content .icon {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.vote-popup-title {
  margin: 0 0 12px;
  font-size: 1.35rem;
  font-weight: 700;
}

.vote-popup-title.green,
h2.green {
  color: #2a9a2a;
}

.vote-popup-title.red,
h3.red {
  color: #c00;
}

.vote-popup-message {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
  color: #444;
}
.qm-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.qm-grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.qm-card {
  width: 100%;
  padding: 12px 12px 50px;
}
.qm-card__media {
  overflow: hidden;
  border-radius: 10px;
  padding-top: calc(100% + 30%);
  position: relative;
}
.qm-card__media > img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}
.qm-card__content h6 {
  padding-right: 50px;
}
.qm-card__content {
  padding: 8px 0px 0px;
  position: relative;
}
.qm-country {
  display: inline-flex;
  flex-direction: row-reverse;
}
.qm-country .qm-flag {
  margin-right: 10px;
  aspect-ratio: 1/1;
  height: 22px;
  overflow: hidden;
  position: relative;
  width: 22px;
  display: flex;
  align-items: center;
  border-radius: 50%;
}
.qm-country .qm-flag img {
  height: auto;
  width: 100%;
  object-fit: cover;
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  bottom: 0;
  transform: translateY(-50%);
}
.qm-votes-count {
  font-weight: 700;
  font-size: 19px;
  line-height: 24px;
  color: var(--blue);
}
.qm-card__meta {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  position: absolute;
  top: 10px;
  right: 0;
}
.qm-button {
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  background: transparent;
  padding: 0;
  display: inline-flex;
}
button.qm-button:not([type="submit"]){
  background: transparent !important;
}
.qm-button:hover svg path {
    fill: var(--blue);
}

.qm-vote-btn--voted svg path {
  fill: var(--blue);
  stroke: var(--blue);
}

.qm-vote-btn--voted:disabled {
  opacity: 1;
  cursor: default;
}

.qm-card__content h6 {
  margin-bottom: 10px;
}
.qm-message {
  padding: 12px 16px;
  border-radius: 10px;
  margin: 16px 0;
}

.qm-message--error {
  background: #fdecec;
}
.qm-pagination-outer {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  padding: 0 12px;
  margin: 28px 0 48px;
  border-top: 1px solid #eee;
}

/* No gap when pagination is not shown (single page / no results) */
.qm-pagination-outer:has(.qm-pagination[hidden]) {
  display: none;
  margin: 0;
  padding: 0;
  border: none;
}

.qm-pagination {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  max-width: 100%;
  margin: 0 auto;
  padding: 20px 0 8px;
  box-sizing: border-box;
}

.qm-pagination__prev,
.qm-pagination__next {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  min-width: 44px;
  padding: 10px 18px;
  margin: 0;
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--black, #111) !important;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.qm-pagination__prev:hover:not(:disabled),
.qm-pagination__next:hover:not(:disabled) {
  border-color: var(--blue, #2355ad);
  color: var(--blue, #2355ad) !important;
  background: #fafafa;
}

.qm-pagination__prev:disabled,
.qm-pagination__next:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.qm-pagination__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}

.qm-pagination__status {
  margin: 0;
  width: 100%;
  font-size: 14px;
  line-height: 1.35;
  color: #666;
  text-align: center;
}

.qm-pagination__numbers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.qm-pagination button.qm-pagination__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  margin: 0;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  color: var(--black, #111) !important;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.qm-pagination button.qm-pagination__num:hover:not(.active) {
  border-color: var(--blue, #2355ad);
  color: var(--blue, #2355ad) !important;
  background: #fafafa;
}

.qm-pagination button.qm-pagination__num.active {
  border-color: var(--blue, #2355ad);
  background-color: var(--blue, #2355ad);
  color: #fff !important;
}

.qm-pagination__ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: #999;
  user-select: none;
}
.qm-message--success {
    color: green;
    background: #0080002e;
}

.qm-phone-field-wrap {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.qm-phone-field-wrap .qm-phone-code {
  width: 140px !important;
  min-width: 140px !important;
  max-width: 140px !important;
  flex: 0 0 140px !important;
  margin: 0 !important;
  height: 56px;
  line-height: 56px;
  padding: 0 14px !important;
  border-radius: 10px;
  background-color: #fff;
}

.qm-phone-field-wrap .qm-phone-input {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0;
  margin: 0 !important;
  height: 56px;
  padding: 0 14px !important;
  border-radius: 10px;
  background-color: #fff;
}

.qm-phone-warning {
  margin-top: 8px;
  margin-bottom: 0;
  font-size: 14px;
  line-height: 1.4;
}

.qm-file-upload {
  width: 100%;
}

.qm-file-upload__status {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f0f7f0;
  border: 1px solid #c5e1c5;
  font-size: 14px;
  line-height: 1.45;
  color: #1a3d1a;
}

.qm-file-upload__status[hidden] {
  display: none !important;
}

.qm-file-upload__hint {
  display: inline-block;
  margin-top: 4px;
  font-weight: 400;
  color: #2d5a2d;
}

.qm-file-upload__thumb {
  display: block;
  margin-top: 12px;
  max-width: 100%;
  max-height: 200px;
  width: auto;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
  border: 1px solid #ddd;
}

.qm-file-upload__pdf-note {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 12px;
  background: #f5f5f5;
  border-radius: 6px;
  font-size: 14px;
}

.qm-quick-photo-grid {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.qm-quick-photo-item {
  min-width: 90px;
}

.qm-quick-photo-item strong {
  display: block;
  margin-bottom: 6px;
}

.qm-quick-photo-slot .no-photo {
  color: #777;
  font-style: italic;
}

.qm-quick-photo-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.qm-quick-photo-modal.is-open {
  display: flex;
}

.qm-quick-photo-modal img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5);
}

.qm-quick-photo-close {
  position: absolute;
  top: 18px;
  right: 24px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 34px;
  cursor: pointer;
}

@media (max-width: 1199px) {
  .qm-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 991px) {
  .qm-grid,
  .qm-grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .qm-toolbar {
    flex-direction: row;
    align-items: stretch;
    gap: 20px;
  }

  .qm-toolbar__right {
    margin-left: 0;
    justify-content: space-between;
    width: 100%;
  }

  .qm-toolbar .qm-results-counter {
    text-align: left;
    white-space: normal;
  }
}
@media (max-width: 767px) {
  .qm-grid,
  .qm-grid.cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .qm-grid.cols-2 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 575px) {
  .qm-toolbar__left {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }

  .qm-field--grow {
    max-width: none;
  }

  .qm-toolbar-select,
  .qm-toolbar .qm-filter-select,
  .qm-toolbar .qm-sort-select {
    max-width: none;
  }
}
@media (max-width: 400px) {
  .qm-grid,
  .qm-grid.cols-3 {
    grid-template-columns: 1fr;
  }
}


/*-*/

/*-*/
label {
  position: relative;
}

.info-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    line-height: 16px;
    margin-left: 6px;
    text-align: center;
    border-radius: 50%;
    background-color: #aaaaaa;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    position: relative;
}

/* Tooltip box */
.custom-tooltip {
  position: absolute;
  background-color: #333;
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
  display: none;
}

/* Tooltip arrow */
.custom-tooltip::after {
 content: "";
  position: absolute;
  top: 100%;
  left: 5px;
  border-width: 5px;
  border-style: solid;
  border-color:#333 transparent transparent  transparent;
}

@media (max-width: 575px) {
  .qm-phone-field-wrap {
    flex-direction: row;
    align-items: center;
  }

  .qm-phone-field-wrap .qm-phone-code {
    width: 110px !important;
    min-width: 110px !important;
    max-width: 110px !important;
    flex: 0 0 110px !important;
  }

	.custom-tooltip {
		width: 180px;
		white-space: normal;
		word-break: break-word;
		height: auto;
	}
}