/* Journal, Réputation and Artefacts: buttons after the Skill tree button, and their windows (same look as the skill tree) */
.inventory-extra-top {
    flex-wrap: wrap;
}

.quest-menu-button.is-hidden {
    display: none;
}

.inventory-extra.is-closed .quest-menu-button {
    display: none;
}

/* Yellow "!" on the Journal button while a quest is in progress */
.quest-mark {
    position: absolute;
    top: -9px;
    right: -11px;
    display: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #ffd400;
    color: #222C37;
    font-size: 0.7rem;
    font-weight: 900;
    line-height: 14px;
    text-align: center;
    animation: skill-plus-bounce 0.9s ease-in-out infinite;
}

.quest-menu-button.has-mark .quest-mark {
    display: block;
}

/* Reward of a reputation level, to pick up: yellow "!" and a little dance */
.reputation-rewards {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.reputation-reward {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 2px solid #ffd400;
    border-radius: 10px;
    background-color: rgba(255, 212, 0, 0.12);
    color: #ffffff;
    text-align: left;
    cursor: help;
}

.reputation-reward:hover {
    background-color: rgba(255, 212, 0, 0.2);
}

/* The "Récupérer" button: the only thing that dances */
.reputation-reward-claim {
    position: relative;
    flex: 0 0 auto;
    margin-left: auto;
    padding: 6px 14px;
    border: 2px solid #ffd400;
    border-radius: 8px;
    background-color: #ffd400;
    color: #222C37;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    animation: reward-dance 1.1s ease-in-out infinite;
}

.reputation-reward-claim:hover {
    background-color: #ffe34d;
}

.reputation-reward-text {
    min-width: 0;
}

.reputation-reward-icon {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1.8rem;
    line-height: 1;
}

.reputation-reward-text {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

.reputation-reward-name {
    font-weight: 800;
}

.reputation-reward-bonus {
    color: #ffd400;
    font-size: 0.75rem;
}

.reward-mark,
.collection-new {
    color: #ffd400;
    font-weight: 900;
    -webkit-text-stroke: 4px #000000;
    paint-order: stroke fill;
}

.reward-mark {
    position: absolute;
    top: -16px;
    right: -6px;
    font-size: 1.6rem;
    line-height: 1;
}

@keyframes reward-dance {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-3px) rotate(-1.2deg); }
    75% { transform: translateY(-3px) rotate(1.2deg); }
}

/* "!" over the top left corner of an artifact not seen yet: it takes no room */
.collection-new {
    position: absolute;
    top: -9px;
    left: -7px;
    z-index: 1;
    font-size: 1.15rem;
    line-height: 1;
    pointer-events: none;
    animation: skill-plus-bounce 0.9s ease-in-out infinite;
}

/* The reward flying from the Réputation window to the Artefacts button */
.reward-flyer {
    position: fixed;
    z-index: 1400;
    font-size: 2rem;
    line-height: 1;
    pointer-events: none;
    filter: drop-shadow(0 0 8px rgba(255, 212, 0, 0.9));
}

/* The heart of the footer of the main page (objective of the quest "Sans cœur"): a bigger area to click */
.heart {
    display: inline-block;
    margin: -6px -8px;
    padding: 6px 8px;
    cursor: pointer;
}

/* Parcels hidden on the pages of the site (quest of the boss of floor 20): a box that floats */
.quest-parcel {
    position: absolute;
    z-index: 900;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    padding: 0;
    border: 0;
    background: none;
    font-size: 1.9rem;
    line-height: 40px;
    text-align: center;
    cursor: pointer;
    filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.5));
    animation: parcel-float 1.6s ease-in-out infinite;
}

.quest-parcel:hover {
    filter: drop-shadow(0 0 8px rgba(255, 212, 0, 0.9));
}

@keyframes parcel-float {
    0%, 100% { transform: translateY(0) rotate(-6deg); }
    50% { transform: translateY(-8px) rotate(6deg); }
}

/* Announcements on the pages that do not have the game (the succès page) */
.quest-toast {
    position: fixed;
    top: 38%;
    left: 50%;
    z-index: 1300;
    width: max-content;
    max-width: 92vw;
    color: #ffd400;
    font-size: 1.5rem;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
    -webkit-text-stroke: 6px #000000;
    paint-order: stroke fill;
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: quest-toast-pop 1.5s ease-out forwards;
}

@keyframes quest-toast-pop {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
    15% { opacity: 1; transform: translate(-50%, calc(-50% - 10px)) scale(1); }
    55% { opacity: 1; transform: translate(-50%, calc(-50% - 50px)) scale(1); }
    100% { opacity: 0; transform: translate(-50%, calc(-50% - 110px)) scale(1); }
}

.quest-panel {
    max-width: 520px;
}

.quest-body {
    padding-top: 8px;
}

.quest-empty {
    margin: 20px 0;
    opacity: 0.7;
    text-align: center;
}

/* A quest of the journal */
.quest-card {
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.06);
}

.quest-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.quest-title {
    color: #ffd400;
    font-weight: 800;
}

.quest-tag {
    padding: 1px 8px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    opacity: 0.8;
}

.quest-tag.is-ready {
    border-color: #ffd400;
    color: #ffd400;
    opacity: 1;
}

.quest-summary {
    margin: 4px 0 10px;
    font-size: 0.85rem;
    opacity: 0.85;
}

.quest-objectives {
    margin: 0;
    padding: 0;
    list-style: none;
}

.quest-objective {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    font-size: 0.9rem;
}

/* Fancy checkbox: a rounded square that fills with green and shows a check when the objective is done */
.quest-check {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.05);
    color: transparent;
    font-size: 0.75rem;
    box-sizing: border-box;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.quest-objective.is-done .quest-check {
    border-color: #6bff4a;
    background-color: #3ddc4f;
    color: #222C37;
    box-shadow: 0 0 6px rgba(107, 255, 74, 0.6);
}

/* Objective answered by typing: the text, then the field with its button on its right, in one block next to the check box
   (the check box is centered on the whole block) */
.quest-objective.has-input {
    align-items: center;
    /* room for the "nope", which does not count in the height of the block */
    margin-bottom: 18px;
}

.quest-objective-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.quest-answer-block {
    position: relative;
}

.quest-answer {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
}

.quest-answer-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 5px 8px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    background-color: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    font-size: 0.85rem;
}

.quest-answer-input:focus {
    border-color: #ffd400;
    outline: none;
}

.quest-answer-button {
    flex: 0 0 auto;
    padding: 5px 12px;
    border: 1px solid #6bff4a;
    border-radius: 6px;
    background: none;
    color: #6bff4a;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
}

.quest-answer-button:hover {
    background-color: #3ddc4f;
    color: #222C37;
}

.quest-answer-feedback {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 2px;
    color: #ff6b70;
    font-size: 0.85rem;
    font-weight: 800;
    line-height: 1.2;
}

.quest-objective-count {
    margin-left: auto;
    color: #ffd400;
    font-weight: 800;
    font-size: 0.85rem;
}

.quest-objective.is-done .quest-objective-count {
    color: #6bff4a;
}

.quest-objective.is-done .quest-objective-label {
    opacity: 0.7;
}

.quest-hint {
    margin-top: 8px;
    color: #ffd400;
    font-size: 0.8rem;
    font-weight: 700;
}

/* A quest that is handed in: struck through, and at the end of the list */
.quest-card.is-done {
    opacity: 0.55;
}

.quest-card.is-done .quest-title,
.quest-card.is-done .quest-summary {
    text-decoration: line-through;
}

/* Reputation bars */
.reputation-row {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.06);
}

.reputation-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.reputation-name {
    font-weight: 800;
}

.reputation-level {
    color: #6bff4a;
    font-size: 0.85rem;
    font-weight: 800;
}

.reputation-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reputation-bar {
    position: relative;
    flex: 1 1 auto;
    height: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.08);
}

.reputation-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    background-color: #3ddc4f;
}

.reputation-label {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    -webkit-text-stroke: 3px #000000;
    paint-order: stroke fill;
}

/* The treasure of the next level, at the end of the bar */
.reputation-treasure {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border: 2px solid #ffd400;
    border-radius: 50%;
    background-color: #222C37;
    font-size: 1.1rem;
    line-height: 1;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 8px rgba(255, 212, 0, 0.5);
    cursor: help;
}

.reputation-treasure.is-unknown {
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: none;
    opacity: 0.6;
    font-weight: 800;
}

/* The collection: squares with only the icon of each artifact */
.artifact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 10px;
}

.artifact-square {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    padding: 0;
    border: 2px solid var(--artifact-color, #ff8000);
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    cursor: pointer;
}

.artifact-square:hover {
    background-color: rgba(255, 255, 255, 0.14);
}

.artifact-icon {
    font-size: 2.2rem;
    line-height: 1;
    filter: drop-shadow(0 0 6px rgba(255, 60, 90, 0.7));
}

.quest-link {
    color: #6bff4a;
    text-decoration: underline;
}

.quest-link:hover {
    color: #ffffff;
}

/* Frame describing a treasure (same look as the one of the inventory items), above the windows */
.treasure-tooltip {
    z-index: 1300;
}

.treasure-tooltip .item-tooltip-text {
    font-size: 0.78rem;
}

.treasure-tooltip.is-below::after {
    display: none;
}

.has-treasure-tip {
    cursor: help;
}
