/*
 * AHUST Question Watermark Core
 * Shared watermark layer for question, answer and solution surfaces.
 */

.exam-watermark-surface {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.exam-watermark-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.exam-watermark-logo {
    position: absolute;
    width: var(--ahust-watermark-logo-width, 12%);
    aspect-ratio: 530.56 / 345.6;
    background: url("/webimg/logoAHUST.svg") center / contain no-repeat;
    opacity: var(--ahust-watermark-opacity, 0.3);
    mix-blend-mode: var(--ahust-watermark-blend-mode, multiply);
    transform: translate(-50%, -50%) rotate(var(--ahust-watermark-rotation, -30deg));
    transform-origin: center;
}

.exam-watermark-surface > :not(.exam-watermark-layer) {
    position: relative;
    z-index: 1;
}

.exam-answer-figure.exam-watermark-surface > :not(.exam-watermark-layer),
.exam-solution-figure.exam-watermark-surface > :not(.exam-watermark-layer) {
    z-index: 0;
}

.exam-answer-figure .exam-watermark-layer,
.exam-solution-figure .exam-watermark-layer {
    z-index: 2;
}

body.dark-mode .exam-watermark-logo,
.dark-mode .exam-watermark-logo {
    opacity: var(--ahust-watermark-dark-opacity, 0.22);
    mix-blend-mode: var(--ahust-watermark-dark-blend-mode, screen);
}
