/* Kiegészítések a lementett EVOK (Moodle Boost) stílushoz */

.toast.show { opacity: 1; }
.toast-wrapper { pointer-events: none; }
.toast-wrapper .toast { pointer-events: auto; margin: .75rem auto 0; }
.toast-body { padding: .75rem 1rem; }

.dropdown-menu.show { display: block; }
#user-action-menu.show { right: 0; left: auto; }

#footer-popover { display: none; }
#footer-popover.open {
  display: block; position: fixed; right: 2rem; bottom: 4.5rem; z-index: 1040;
  max-width: 340px; background: #fff; border: 1px solid #dee2e6; border-radius: .5rem;
  box-shadow: 0 .5rem 1.5rem rgb(0 0 0 / .15); font-size: .875rem;
}

/* Easter egg */
#egg {
  position: fixed; inset: 0; z-index: 2000; background: rgb(0 0 0 / .88); display: none;
  flex-direction: column; align-items: center; justify-content: center; padding: 1rem; cursor: zoom-out;
}
#egg.open { display: flex; animation: egg-in .35s ease-out; }
#egg figure { margin: 0; text-align: center; }
#egg img { max-width: min(560px, 92vw); max-height: 75vh; border-radius: .5rem; box-shadow: 0 1rem 3rem rgb(0 0 0 / .5); animation: egg-pop .5s cubic-bezier(.2,.9,.3,1.3); }
#egg figcaption { color: #fff; font-weight: 700; font-size: 1.15rem; margin-top: .9rem; letter-spacing: .03em; }
#egg-close { margin-top: 1rem; }
@keyframes egg-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes egg-pop { from { transform: scale(.6) rotate(-4deg); } to { transform: scale(1) rotate(0); } }
[data-egg] { cursor: default; }

/* Kurzusmutató: kattintható "mintafeladatok" */
@media (max-width: 767.98px) {
  .secondary-navigation .nav-tabs .nav-link { padding-left: .6rem; padding-right: .6rem; }
}
.courseindex .courseindex-section.collapsed .courseindex-item-content { display: none; }
.courseindex .courseindex-section .courseindex-chevron .collapsed-icon { display: none; }
.courseindex .courseindex-section.collapsed .courseindex-chevron .collapsed-icon { display: inline; }
.courseindex .courseindex-section.collapsed .courseindex-chevron .expanded-icon { display: none; }

/* Leadási állapot táblázat */
.submissionstatustable th { width: 30%; }
.countdown { font-variant-numeric: tabular-nums; }

/* Leadás */
.share-alert { margin: 1.25rem 0; }
.share-alert code { color: inherit; font-weight: 700; word-break: break-all; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
#submit-form { max-width: 760px; margin-top: 1rem; }
.gif-wrap { margin: 1rem 0; }
.gif-wrap img { max-width: min(360px, 100%); max-height: 300px; border-radius: .5rem; display: block; }

.rule-list li { margin-bottom: .4rem; }
.good-bad { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.good-bad > div { border-radius: .5rem; padding: .75rem 1rem; }
.good-bad .good { background: #e6f3e6; border: 1px solid #b5d9b5; }
.good-bad .bad { background: #f8e2e0; border: 1px solid #e8b4ae; }
.good-bad code { color: inherit; word-break: break-all; }
@media (max-width: 640px) { .good-bad { grid-template-columns: 1fr; } }

.memory-prompt {
  border-left: 4px solid #8cc83c; background: #f2f9e8; padding: .75rem 1rem; margin: 1rem 0; border-radius: 0 .35rem .35rem 0;
}

.attachment-img { display: inline-block; margin: .5rem 0 1rem; }
.attachment-img img { max-width: min(320px, 100%); max-height: 320px; border-radius: .35rem; border: 1px solid #dee2e6; display: block; }
.attachment-img small { color: #6a737b; }

.rubric td, .rubric th { vertical-align: top; font-size: .9rem; }
.rubric td.lvl { cursor: pointer; }
.rubric td.lvl:hover { background: #f2f9e8; }
.rubric td.lvl.checked { background: #cfefcf; }
.rubric .pts { display: block; color: #6a737b; font-size: .8rem; margin-top: .25rem; }

/* Random Máté */
#mate-peek {
  position: fixed; z-index: 1050; pointer-events: none; display: flex; flex-direction: column; align-items: center;
  transition: transform .6s cubic-bezier(.2,.9,.3,1.2); transform: translateY(130%); bottom: 0; right: 4rem;
}
#mate-peek.from-left { right: auto; left: 2rem; }
#mate-peek.visible { transform: translateY(0); pointer-events: auto; cursor: pointer; }
#mate-peek img { width: 170px; height: 170px; object-fit: cover; border-radius: 50% 50% 0 0; border: 4px solid #fff; border-bottom: 0; box-shadow: 0 -4px 18px rgb(0 0 0 / .2); background: #eee; }
#mate-peek.no-img img { display: none; }
.mate-bubble {
  background: #fff; border: 1px solid #dee2e6; border-radius: 1rem; padding: .45rem .8rem; margin-bottom: .5rem;
  font-size: .9rem; font-weight: 600; box-shadow: 0 .25rem .75rem rgb(0 0 0 / .12); max-width: 220px; text-align: center; position: relative;
}
.mate-bubble::after {
  content: ""; position: absolute; left: 50%; bottom: -7px; width: 12px; height: 12px; background: #fff;
  border-right: 1px solid #dee2e6; border-bottom: 1px solid #dee2e6; transform: translateX(-50%) rotate(45deg);
}
@media (max-width: 640px) {
  #mate-peek { right: 1rem; }
  #mate-peek.from-left { left: 1rem; }
  #mate-peek img { width: 110px; height: 110px; }
}

/* Mobil: a kurzusmutató ne tolja el a tartalmat */
@media (max-width: 991.98px) {
  #page.drawers.show-drawer-left { margin-left: 0; padding-left: 1rem; }
}

/* Sikeres leadás: Absolute cserkészet */
.done-figure { margin: 1.5rem auto; text-align: center; max-width: 560px; }
.done-figure img { width: 100%; border-radius: .5rem; box-shadow: 0 .75rem 2rem rgb(0 0 0 / .25); animation: egg-pop .6s cubic-bezier(.2,.9,.3,1.3); }
.done-figure figcaption { margin-top: .75rem; font-weight: 700; font-size: 1.05rem; letter-spacing: .03em; }

/* Side-eye gifek */
#eye-peek {
  position: fixed; left: 0; top: 0; z-index: 1045; width: clamp(110px, 22vw, 170px); overflow: hidden; border-radius: 16px;
  box-shadow: 0 18px 40px -16px rgb(0 0 0 / .5); pointer-events: none; opacity: 0; transform: translateY(-200%);
  transition: transform 1.8s cubic-bezier(.22,.8,.24,1), opacity .5s; touch-action: none; user-select: none;
}
#eye-peek.live { pointer-events: auto; cursor: pointer; }
#eye-peek img { display: block; width: 100%; height: auto; transform-origin: 50% 40%; pointer-events: none; -webkit-user-drag: none; }
#eye-peek.zoom img { animation: bomb 5.5s cubic-bezier(.5,0,.75,0) forwards; }
@keyframes bomb { to { transform: scale(1.4); } }
@media (prefers-reduced-motion: reduce) { #eye-peek { transition: opacity .5s; } }
