/**
 * CSS for TVW Plot Hub - Puzzles
 * Date: 2025.07.22
 */

/* MAIN */
.plothub-container.story.tvw .plothub-puzzle .plothub-puzzle-area {
    width: 100%;
    max-width: 800px;
    padding: 1.5em;
    margin: 0 auto 40px;
    background: #826a55;
    border-image: url(images/puzzle-bg.png) 80 fill / 60px / 20px;
    box-sizing: border-box;
}

.plothub-container.story.tvw .plothub-puzzle .plothub-puzzle-area p {
    max-width: 600px;
    margin: 10px auto;
}

.plothub-container.story.tvw .plothub-puzzle .plothub-puzzle-area .plothub-err {
    margin-top: 0;
}

.plothub-container.story.tvw .plothub-puzzle .plothub-puzzle-area input {
    max-width: 300px;
}

.plothub-container.story.tvw .plothub-puzzle .plothub-puzzle-area img {
    width: 100%;
    max-width: 600px;
    margin: auto;
}

.plothub-container.story.tvw .plothub-puzzle .plothub-puzzle-area .plothub-puzzle-result img {
    max-width: 400px;
}
.plothub-container.story.tvw .plothub-puzzle .plothub-puzzle-area input {
    max-width: 300px;
    margin: 2em auto;
}

.plothub-container.story.tvw .plothub-puzzle .plothub-puzzle-area img {
    width: 100%;
    max-width: 600px;
    margin: auto;
}

.plothub-container.story.tvw .plothub-puzzle .plothub-puzzle-area .plothub-puzzle-result img {
    max-width: 400px;
}

/* PUZZLE 1 */
/* Solution */
.plothub-container.story.tvw .plothub-puzzle .plothub-puzzle-area .plothub-puzzle-result.puzzle-1 .puzzle-result {
    max-width: 400px;
    padding: 4px;
    background: #fff;
    border: 1px solid black;
    border-radius: 5px;
    font-weight: bold;
}

/* PUZZLE 2 */
.plothub-container.story.tvw .plothub-puzzle .puzzle-2 input {
    display: none;
}

.plothub-container.story.tvw .plothub-puzzle .plot-puzzle-sliders {
    position: relative;
    width: 200px;
    padding: 1em 0;
    margin: 2em auto;
    display: flex;
    flex-direction: column;
    gap: 2em;
    overflow: hidden;
}

.plothub-container.story.tvw .plothub-puzzle .plot-puzzle-sliders::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    background-image: linear-gradient(90deg, rgb(130, 106, 85), rgb(130, 106, 85) 15%, rgba(0,0,0,0) 25%, rgba(0,0,0,0) 75%, rgb(130, 106, 85) 85%, rgb(130, 106, 85) 100%);
    pointer-events: none;
    z-index: 1;
}

.plothub-container.story.tvw .plothub-puzzle .plot-puzzle-slider {
    position: relative;
    width: 3.5rem;
    height: 3.5rem;
    margin: auto;
    background: url(images/puzzle-03-bg.png) center / auto 100% repeat;
    cursor: grab;
}

.plothub-container.story.tvw .plothub-puzzle .plot-puzzle-slider::before {
    content: '';
    position: absolute;
    top: -1em;
    width: 9em;
    height: 2px;
    background: #a68566;
    left: -3em;
}

.plothub-container.story.tvw .plothub-puzzle .plot-puzzle-slider::after {
    content: '';
    position: absolute;
    bottom: -1em;
    width: 9em;
    height: 2px;
    background: #5f4835;
    left: -3em;
}

.plothub-container.story.tvw .plothub-puzzle .plot-puzzle-slider .inner-slider {
    width: 700%;
    display: flex;
    gap: 10px;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
}

.plothub-container.story.tvw .plothub-puzzle .plot-puzzle-slider .inner-slider .letter {
    width: calc(100% / 7);
    display: grid;
    place-items: center;
    font-size: 3rem;
    opacity: .5;
}

.plothub-container.story.tvw .plothub-puzzle .plot-puzzle-slider .inner-slider .letter.active {
    background: unset;
    font-size: 30pt;
    opacity: 1;
}

.plothub-container.story.tvw .plothub-puzzle .plot-puzzle-slider .inner-slider .letter:first-child {
    padding-left: .15em;
}

.plothub-container.story.tvw .plothub-puzzle .plot-puzzle-slider .inner-slider .letter:last-child {
    padding-right: .15em;
}

.plothub-container.story.tvw .plothub-puzzle .plot-puzzle-slider .inner-slider .letter span {
    width: 100%;
    height: 3rem;
    font-size: 3rem;
    font-family: "Cafeteria", 'Arial Bold', sans-serif;
    text-align: center;
}

.plothub-container.story.tvw .plothub-content .plothub-puzzle .puzzle-2 .plot-puzzle-slider.incorrect {
    animation: unset !important;
}

.plothub-container.story.tvw .plothub-content .plothub-puzzle .puzzle-2 .plot-puzzle-slider.incorrect .active span {
    border-radius: 15px;
    animation: incorrect2 2s ease-out !important;
}

@keyframes incorrect2 {
    0% {
        background: rgba(255, 192, 203, 0.74) center / 3.5em;
    }
    30% {
        background: transparent;
    }
    60% {
        background: rgba(255, 192, 203, 0.74) center / 3.5em;
    }
    90% {
        background: transparent;
    }
}

/* Solution */
.plothub-container.story.tvw .plothub-puzzle .puzzle-2 .plothub-puzzle-solution,
.plothub-container.story.tvw .plothub-puzzle .puzzle-3 .plothub-puzzle-solution {
    margin: 1em auto;
    display: grid;
    grid-template: auto / auto auto auto;
    align-items: center;
    justify-content: center;
    gap: 1em;
}

.plothub-container.story.tvw .plothub-puzzle .puzzle-2 .plothub-puzzle-solution img {
    max-width: 100px;
    margin: unset;
}

.plothub-container.story.tvw .plothub-puzzle .puzzle-2 .plothub-puzzle-solution .plothub-arrow {
    font-size: 30pt;
}

.plothub-container.story.tvw .plothub-puzzle .puzzle-2 .plothub-puzzle-solution .plothub-text {
    font-size: 30pt;
    font-family: "Cafeteria", 'Arial Bold', sans-serif;
    justify-self: start;
}

.plothub-container.story.tvw .plothub-puzzle .puzzle-2 .plothub-puzzle-solution .plothub-text .circle {
    padding: .1em 1rem;
    border: 1px solid black;
    border-radius: 50%;
}

/* PUZZLE 3 */
.plothub-container.story.tvw .plothub-puzzle .plot-puzzle-selects {
    width: 90%;
    margin: 2em auto;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2em;
}

.plothub-container.story.tvw .plothub-puzzle .plothub-puzzle-select {
    width: 200px;
}

.plothub-container.story.tvw .plothub-puzzle .plothub-puzzle-select img {
    max-width: 100px;
    margin: auto;
    cursor: pointer;
}

.plothub-container.story.tvw .plothub-puzzle .plothub-puzzle-select select {
    min-height: 35px;
    border-radius: 10px;
    text-align: center;
}

.plot-popup.tvw.puzzle-3 .plothub-hint {
    display: none;
    margin: auto;
}

.plot-popup.tvw.puzzle-3 .plothub-hint.shown {
    display: block;
}

/* Solution */
.plothub-container.story.tvw .plothub-puzzle .puzzle-3 > img {
    margin-bottom: 1em;
}

.plothub-container.story.tvw .plothub-puzzle .puzzle-3 .plothub-puzzle-solution img {
    max-width: 80px;
    margin: unset;
}

.plothub-container.story.tvw .plothub-puzzle .puzzle-3 .plothub-puzzle-solution .plothub-arrow {
    font-size: 20pt;
}

.plothub-container.story.tvw .plothub-puzzle .puzzle-3 .plothub-puzzle-solution .plothub-text {
    font-size: 20pt;
    font-family: "Cafeteria", 'Arial Bold', sans-serif;
}

/* PUZZLE 4 */
.plot-popup.tvw.puzzle-4, .plot-popup.tvw.puzzle-4 .popup-body__2020 {
    width: max-content;
    max-width: 100%;
}

.plot-popup.tvw.puzzle-4 img {
    max-width: 100%;
}

/* Solution */
#PlotPuzzleSolution.hide {
    display: none;
}