@import url('css/open-iconic/font/css/open-iconic-bootstrap.min.css');

@font-face {
    font-family: 'Noto Sans Hebrew';
    src: url('fonts/NotoSansHebrew-VariableFont_wdth,wght.ttf') format('truetype');
    font-weight: 100 900;
    font-stretch: 62.5% 100%;
    font-style: normal;
    font-display: swap;
}

html, body {
    font-family: 'Noto Sans Hebrew', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2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NzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.ethicode-celebration {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 50% 32%, rgba(201, 255, 53, 0.18), transparent 32%),
        rgba(3, 5, 55, 0.72);
    backdrop-filter: blur(7px);
    animation: celebration-fade-in 0.24s ease-out both;
}

.ethicode-celebration.is-closing {
    animation: celebration-fade-out 0.22s ease-in both;
}

.ethicode-celebration-dialog {
    position: relative;
    z-index: 2;
    width: min(560px, 100%);
    padding: 44px 36px 34px;
    border: 4px solid #ffffff;
    border-radius: 28px;
    color: #ffffff;
    background:
        linear-gradient(145deg, rgba(105, 70, 255, 0.96), rgba(220, 106, 190, 0.9) 58%, rgba(255, 166, 97, 0.9)),
        #070A59;
    box-shadow: 0 28px 100px rgba(0, 0, 0, 0.38);
    text-align: center;
    overflow: hidden;
    animation: celebration-pop 0.56s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ethicode-celebration-dialog::before,
.ethicode-celebration-dialog::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.ethicode-celebration-dialog::before {
    top: -68px;
    right: -46px;
    width: 160px;
    height: 160px;
    background: rgba(201, 255, 53, 0.26);
}

.ethicode-celebration-dialog::after {
    left: -38px;
    bottom: -54px;
    width: 138px;
    height: 138px;
    background: rgba(143, 215, 255, 0.24);
}

.ethicode-celebration-dialog h2 {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #ffffff;
    font-size: clamp(2rem, 6vw, 3.35rem);
    font-weight: 900;
    line-height: 1;
}

.ethicode-celebration-dialog p {
    position: relative;
    z-index: 1;
    max-width: 430px;
    margin: 18px auto 28px;
    color: rgba(255, 255, 255, 0.94);
    font-size: clamp(1.08rem, 2.8vw, 1.35rem);
    font-weight: 700;
    line-height: 1.45;
}

.ethicode-celebration-button {
    position: relative;
    z-index: 1;
    min-width: 148px;
    padding: 12px 28px;
    border: 0;
    border-radius: 999px;
    color: #070a59;
    background: #c9ff35;
    font-family: inherit;
    font-size: 1.04rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

.ethicode-celebration-button:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 4px;
}

.ethicode-page-footer {
    position: absolute;
    right: 0;
    bottom: 18px;
    left: 0;
    z-index: 120;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.ethicode-about-trigger {
    pointer-events: auto;
    min-width: 104px;
    padding: 9px 22px;
    border: 2px solid rgba(255, 255, 255, 0.82);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(7, 10, 89, 0.48);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(10px);
    transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.ethicode-about-trigger:hover,
.ethicode-about-trigger:focus-visible {
    color: #070a59;
    background: #c9ff35;
    border-color: #c9ff35;
    transform: translateY(-2px);
}

.ethicode-about-trigger:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 4px;
}

.ethicode-about-modal {
    background:
        radial-gradient(circle at 50% 24%, rgba(201, 255, 53, 0.15), transparent 30%),
        rgba(3, 5, 55, 0.74);
}

.ethicode-about-dialog {
    width: min(620px, 100%);
    padding-top: 34px;
}

.ethicode-about-logo {
    position: relative;
    z-index: 1;
    display: block;
    width: min(190px, 54%);
    max-height: 82px;
    margin: 0 auto 18px;
    object-fit: contain;
}

.ethicode-about-dialog h2 {
    margin-bottom: 18px;
}

.ethicode-about-list {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
    margin: 0 auto 28px;
    max-width: 500px;
    text-align: right;
}

.ethicode-about-list div {
    display: grid;
    grid-template-columns: minmax(116px, 0.78fr) minmax(0, 1.22fr);
    gap: 12px;
    align-items: start;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.ethicode-about-list dt,
.ethicode-about-list dd {
    margin: 0;
    line-height: 1.35;
}

.ethicode-about-list dt {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.98rem;
    font-weight: 500;
}

.ethicode-about-list dd {
    color: #ffffff;
    font-size: 1.04rem;
    font-weight: 800;
}

.ethicode-about-list a {
    color: #c9ff35;
    overflow-wrap: anywhere;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.ethicode-teacher-dialog {
    width: min(590px, 100%);
}

.ethicode-teacher-intro {
    margin-bottom: 22px !important;
}

.ethicode-teacher-password-form {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
    width: min(390px, 100%);
    margin: 0 auto;
}

.ethicode-teacher-password-form label {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
    text-align: right;
}

.ethicode-teacher-password-form input {
    width: 100%;
    height: 52px;
    padding: 8px 18px;
    border: 3px solid rgba(255, 255, 255, 0.9);
    border-radius: 14px;
    color: #070a59;
    background: rgba(255, 255, 255, 0.96);
    font-family: inherit;
    font-size: 1.16rem;
    font-weight: 800;
    text-align: center;
}

.ethicode-teacher-password-form input:focus-visible {
    outline: 4px solid #c9ff35;
    outline-offset: 3px;
}

.ethicode-teacher-password-form input[aria-invalid="true"] {
    border-color: #ffcedf;
}

.ethicode-teacher-password-hint,
.ethicode-teacher-password-error {
    margin: 0 !important;
    font-size: 0.96rem !important;
    line-height: 1.35 !important;
}

.ethicode-teacher-password-hint {
    color: rgba(255, 255, 255, 0.78) !important;
    font-weight: 500 !important;
}

.ethicode-teacher-password-hint strong {
    color: #c9ff35;
}

.ethicode-teacher-password-error {
    color: #ffffff !important;
    font-weight: 800 !important;
}

.ethicode-teacher-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
}

.ethicode-teacher-secondary-button {
    min-width: 112px;
    padding: 11px 24px;
    border: 2px solid #ffffff;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(7, 10, 89, 0.34);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
}

.ethicode-teacher-secondary-button:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 4px;
}

.ethicode-teacher-links {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 0 auto 26px;
}

.ethicode-teacher-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 62px;
    padding: 12px 18px;
    border: 3px solid #ffffff;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(7, 10, 89, 0.18);
    font-size: 1.02rem;
    font-weight: 900;
    line-height: 1.2;
    text-decoration: none;
    transition: transform 0.18s ease, color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.ethicode-teacher-links a:hover,
.ethicode-teacher-links a:focus-visible {
    color: #070a59;
    background: #c9ff35;
    border-color: #c9ff35;
    transform: translateY(-2px);
}

.ethicode-teacher-links a:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 4px;
}

.ethicode-confetti {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.ethicode-persistent-confetti {
    position: fixed;
    z-index: 1100;
}

.ethicode-confetti-piece {
    position: absolute;
    top: -8vh;
    left: var(--x);
    width: var(--size);
    height: calc(var(--size) * 0.78);
    border-radius: 2px;
    background: var(--color);
    opacity: 0;
    filter: blur(var(--blur));
    will-change: transform, opacity;
    transform: translate3d(0, -8vh, 0) rotate(0) scale(0.8);
    animation: confetti-snow var(--duration) var(--delay) linear infinite;
}

.ethicode-confetti-piece.is-pill {
    border-radius: 999px;
}

.ethicode-confetti-piece.is-circle {
    height: var(--size);
    border-radius: 50%;
}

.ethicode-confetti-piece.is-triangle {
    width: 0;
    height: 0;
    border-right: calc(var(--size) * 0.65) solid transparent;
    border-left: calc(var(--size) * 0.65) solid transparent;
    border-bottom: calc(var(--size) * 1.2) solid var(--color);
    background: transparent;
}

@keyframes confetti-snow {
    0% {
        opacity: 0;
        transform: translate3d(0, -8vh, 0) rotate(0deg) scale(0.8);
    }

    8% {
        opacity: var(--opacity);
    }

    36% {
        transform: translate3d(var(--drift-one), 38vh, 0) rotate(var(--rotation-mid)) scale(1);
    }

    68% {
        transform: translate3d(var(--drift-two), 78vh, 0) rotate(var(--rotation)) scale(0.92);
    }

    92% {
        opacity: var(--opacity);
    }

    100% {
        opacity: 0;
        transform: translate3d(var(--drift-end), 116vh, 0) rotate(var(--rotation-end)) scale(0.78);
    }
}

@keyframes celebration-pop {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(0.88);
    }

    72% {
        transform: translateY(-3px) scale(1.02);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes celebration-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes celebration-fade-out {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@media (max-width: 760px) {
    .ethicode-celebration {
        padding: 18px;
    }

    .ethicode-celebration-dialog {
        padding: 34px 24px 28px;
        border-width: 3px;
        border-radius: 24px;
    }

    .ethicode-page-footer {
        bottom: 12px;
    }

    .ethicode-about-trigger {
        min-width: 92px;
        padding: 8px 18px;
        font-size: 0.88rem;
    }

    .ethicode-about-dialog {
        padding: 28px 20px 24px;
    }

    .ethicode-about-logo {
        width: min(170px, 62%);
        margin-bottom: 14px;
    }

    .ethicode-about-list {
        gap: 8px;
        margin-bottom: 24px;
    }

    .ethicode-about-list div {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 8px 0;
        text-align: center;
    }

    .ethicode-about-list dt {
        font-size: 0.86rem;
    }

    .ethicode-about-list dd {
        font-size: 0.96rem;
    }

    .ethicode-teacher-links {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .ethicode-teacher-links a {
        min-height: 52px;
        padding: 10px 16px;
        font-size: 0.96rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ethicode-celebration,
    .ethicode-celebration.is-closing,
    .ethicode-celebration-dialog,
    .ethicode-confetti-piece {
        animation: none;
    }

    .ethicode-confetti {
        display: none;
    }
}
