/* Edviatec front-end components. Layout, buttons and form controls come from the theme (Bootstrap 5). */
.edv-quiz { --edv-accent: var(--bs-primary, #4f46e5); --edv-muted: #8a8a8a; --edv-border: #e4e4e7; --edv-radius: 12px; }
.edv-ico { width: 1em; height: 1em; vertical-align: -0.15em; }
.edv-muted { color: var(--edv-muted, #8a8a8a); }
.edv-mt { margin-top: 10px; }
.edv-loading { padding: 60px 0; text-align: center; color: #8a8a8a; }
.edv-hp { position: absolute !important; left: -9999px; }

/* progress */
.edv-progress { height: 6px; background: #ececf1; border-radius: 3px; overflow: hidden; margin: 12px 0 24px; max-width: 240px; }
.edv-progress span { display: block; height: 100%; background: var(--edv-accent); transition: width .3s ease; }
.edv-count { color: #a4a3a3; margin: 0; }
.edv-nav { margin-top: 24px; gap: 12px; }
.edv-nav .btn + .btn { margin-left: 8px; }
.edv-step.is-busy { opacity: .6; pointer-events: none; }
.edv-step-title { font-size: 1.4rem; margin-bottom: 1rem; }
.edv-intro { margin-bottom: 1rem; }
.edv-q { margin-bottom: 1.5rem; }
.edv-q h3 { margin-bottom: .5rem; }
.edv-help { color: #6b6b6b; font-size: .92rem; margin-bottom: .75rem; }
.edv-error { color: #c0392b; font-size: .9rem; margin-top: .35rem; }
.edv-error--form { margin-top: 1rem; }
.edv-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 600px) { .edv-pair { grid-template-columns: 1fr; } }

/* choice cards (fields of study) */
.edv-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.edv-choice { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px 44px 14px 14px; border: 1.5px solid var(--edv-border); border-radius: var(--edv-radius); cursor: pointer; background: #fff; transition: border-color .15s, box-shadow .15s; }
.edv-choice:hover { border-color: var(--edv-accent); }
.edv-choice input { position: absolute; opacity: 0; pointer-events: none; }
.edv-choice:has(input:checked) { border-color: var(--edv-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--edv-accent) 20%, transparent); }
.edv-choice:focus-within { outline: 2px solid var(--edv-accent); outline-offset: 2px; }
.edv-choice__name { font-weight: 600; }
.edv-choice__desc { font-size: .85rem; color: #6b6b6b; }
.edv-choice__count { position: absolute; top: 12px; right: 12px; font-size: .75rem; background: #f1f1f4; border-radius: 10px; padding: 1px 8px; color: #555; }

/* grade */
.edv-toggle { display: inline-flex; border: 1.5px solid var(--edv-border); border-radius: 999px; padding: 3px; margin-bottom: 1rem; }
.edv-toggle__btn { border: 0; background: transparent; border-radius: 999px; padding: 6px 14px; font: inherit; cursor: pointer; }
.edv-toggle__btn.is-active { background: var(--edv-accent); color: #fff; }
.edv-grade .average-grade-input { display: inline-flex; align-items: center; gap: 8px; font-size: 1.2rem; }
.edv-grade .average-grade-input input { width: 110px; }
.edv-calc-row { margin-bottom: 12px; }
.edv-calc-row__inputs { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.edv-calc-row__inputs select { flex: 1 1 240px; }
.edv-calc-row__inputs input { width: 80px; }
.edv-calc-result { margin: 12px 0; }
.edv-opt-group { display: inline-flex; gap: 6px; align-items: center; margin: 0 16px 10px 0; }
.edv-bac { width: 100%; border-collapse: collapse; margin-bottom: 12px; font-size: .95rem; }
.edv-bac th { background: #f6f6f8; padding: 8px; font-weight: 600; }
.edv-bac td { padding: 4px 8px; border-bottom: 1px solid #f0f0f0; }
.edv-bac td.coeff, .edv-bac td.points { width: 70px; text-align: center; }
.edv-bac input { width: 90px; }

/* results */
.edv-intro-box { padding: 10px 15px; margin-bottom: 12px; }
.edv-result-tabs { margin-bottom: 16px; }
.edv-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.edv-filters .form-select { width: auto; min-width: 150px; }
.edv-map { width: 100%; border-radius: var(--edv-radius, 12px); overflow: hidden; margin-bottom: 16px; z-index: 0; }
.edv-quiz .result--content { position: relative; }
.edv-hat { font-size: 2rem; }
.edv-facts > div { margin-right: 16px; }
.edv-fav { position: absolute; top: 0; right: 0; border: 0; background: transparent; font-size: 1.4rem; line-height: 1; color: #c9c9d1; cursor: pointer; padding: 4px; }
.edv-fav.is-on { color: #e0245e; }
.edv-fav-remove { float: right; }
.edv-bubble { display: block; width: 100%; max-width: 260px; text-align: left; border: 0; border-radius: 16px 16px 16px 4px; background: var(--edv-accent, #4f46e5); color: #fff; padding: 14px 16px; margin: 16px 0; font-weight: 600; cursor: pointer; }
.edv-locked { position: relative; margin-top: 8px; }
.edv-locked__ghost .result { filter: blur(4px); opacity: .6; pointer-events: none; user-select: none; }
.edv-locked__title { font-size: 1.4rem; font-weight: 700; margin-bottom: .5rem; }
.edv-locked__ghost { min-height: 260px; }
.edv-locked__box { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 20px; background: linear-gradient(to bottom, rgba(255,255,255,.4), rgba(255,255,255,.95) 40%); }

/* modal */
body.edv-modal-open { overflow: hidden; }
.edv-modal { position: fixed; inset: 0; background: rgba(15, 15, 25, .55); z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.edv-modal__dialog { background: #fff; border-radius: 16px; width: 100%; max-width: 760px; max-height: 92vh; display: flex; flex-direction: column; }
.edv-modal__dialog form { display: flex; flex-direction: column; min-height: 0; max-height: 92vh; }
.edv-modal__head, .edv-modal__foot { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid #eee; }
.edv-modal__foot { border-top: 1px solid #eee; border-bottom: 0; }
.edv-modal__head p { margin: 0; }
.edv-modal__body { padding: 16px 20px; overflow: auto; }
.edv-modal__close { border: 0; background: transparent; font-size: 1.3rem; cursor: pointer; }
.edv-stars { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.edv-stars input { position: absolute; opacity: 0; }
.edv-stars label { font-size: 1.8rem; color: #d6d6dc; cursor: pointer; line-height: 1; }
.edv-stars input:checked ~ label, .edv-stars label:hover, .edv-stars label:hover ~ label { color: #f5b301; }
.edv-stars input:focus-visible + label { outline: 2px solid var(--edv-accent, #4f46e5); }

/* account + institution */
.edv-account .questions-wrapper h2 { margin-bottom: 1rem; }
.edv-account #loginform p { margin-bottom: 12px; }
.edv-account #loginform input[type=text], .edv-account #loginform input[type=password] { display: block; width: 100%; padding: .5rem .75rem; border: 1px solid #ced4da; border-radius: .375rem; }
.edv-list { list-style: none; padding: 0; margin: 0; }
.edv-list li { padding: 10px 0; border-bottom: 1px solid #f0f0f0; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.edv-danger { color: #c0392b !important; }
.edv-facts-list { list-style: none; padding: 0; margin: 16px 0; }
.edv-facts-list li { padding: 6px 0; border-bottom: 1px solid #f0f0f0; display: flex; gap: 12px; }
.edv-facts-list li span { flex: 0 0 110px; color: #8a8a8a; }
.edv-description { margin: 16px 0; }
.edv-account #wp-submit { display: inline-block; border: 0; border-radius: 999px; padding: 12px 28px; background: var(--bs-primary, #1e6bff); color: #fff; font-weight: 600; text-transform: uppercase; cursor: pointer; }

/* Results: tabs, filters, pagination, fox */
.edv-result-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.edv-result-tabs .nav-link { white-space: nowrap; }
.edv-filters-panel { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.edv-search input { border-radius: 999px; padding: 10px 18px; }
[data-edv-filters] { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.edv-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.edv-chips__label { font-weight: 600; margin-right: 4px; }
.edv-chip { border: 1.5px solid var(--edv-border, #e4e4e7); background: #fff; border-radius: 999px; padding: 4px 12px; font: inherit; cursor: pointer; }
.edv-chip small { color: #8a8a8a; margin-left: 2px; }
.edv-chip.is-on { background: var(--edv-accent, #236cfa); border-color: var(--edv-accent, #236cfa); color: #fff; }
.edv-chip.is-on small { color: rgba(255,255,255,.8); }
.edv-more-filters, .edv-reset { border: 0; background: none; padding: 4px 0; font: inherit; font-weight: 600; color: var(--edv-accent, #236cfa); cursor: pointer; }
.edv-reset { color: #8a8a8a; font-weight: 500; }
.edv-filter-grid { flex-basis: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 14px; padding: 12px; background: #f6f7fb; border-radius: 12px; }
.edv-filter { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.edv-filter span { font-size: .85em; color: #6b6b6b; }
.edv-filter .form-select { width: 100%; }
.edv-switch { display: flex; align-items: center; gap: 8px; margin: 0; align-self: end; padding-bottom: 8px; }
.edv-range { color: #8a8a8a; margin: 4px 0 8px; }
.edv-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 24px 0; }
.edv-pager button { min-width: 40px; height: 40px; padding: 0 12px; border: 1.5px solid var(--edv-border, #e4e4e7); background: #fff; border-radius: 999px; font: inherit; cursor: pointer; }
.edv-pager button.is-current { background: var(--edv-accent, #236cfa); border-color: var(--edv-accent, #236cfa); color: #fff; }
.edv-pager button:disabled { opacity: .4; cursor: default; }
.edv-pager__gap { align-self: center; padding: 0 4px; color: #8a8a8a; }
.edv-fox { position: relative; padding-top: 115px; margin: 20px 30px 20px 0; cursor: pointer; }
.edv-fox .cyberfox--body { margin-left: auto; }
.edv-fox .cyberfox--tail.bubble { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 14px; text-transform: uppercase; width: 238px; }
.edv-fox:focus-visible { outline: 2px solid var(--edv-accent, #236cfa); outline-offset: 4px; }
.edv-rank { display: block; margin-top: 6px; font-weight: 700; color: #8a8a8a; text-align: center; }
@media (max-width: 768px) {
	.edv-fox { margin: 10px 0 20px; }
	.edv-filter-grid { grid-template-columns: 1fr; }
	.edv-pager button { min-width: 34px; height: 34px; padding: 0 8px; }
}
@media (max-width: 768px) { .edv-quiz .result--content h3 { font-size: 1.35rem; line-height: 1.25; } }
