/* Achievements Panel - Similar to Inventory Panel */
#achievementsList {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
    row-gap: 30px;
    column-gap: 20px;
    justify-content: center;
}

#achievementsList li.achievement-slot {
    width: 70px;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    overflow: hidden;
}

#achievementsList li.achievement-slot .achievement-slot-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

.achievements-panel .page-navigation {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.achievements-panel .page-navigation .page-button {
    background-color: transparent;
    border: none;
    color: rgb(129, 119, 119);
    font-size: 24px;
    cursor: pointer;
    padding: 0 10px;
}

.achievements-panel .page-navigation span#achievementsPageNumber {
    margin: 0 10px;
    font-size: 16px;
}



.achievement-slot {
    position: relative; /* Make the slot the positioning reference */
}

#achievementsList li .achievement-selection-frame {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    opacity: 0;
}

#achievementsList li .achievement-selection-piece {
    position: absolute;
    width: 50%;
    height: 50%;
    overflow: hidden;
}

#achievementsList li .achievement-selection-piece img {
    position: absolute;
    width: 190%;
    height: 190%;
    display: block;
    image-rendering: pixelated;
}

#achievementsList li .achievement-selection-piece.top-left {
    left: -10px;
    top: -10px;
}

#achievementsList li .achievement-selection-piece.top-right {
    right: -10px;
    top: -10px;
}

#achievementsList li .achievement-selection-piece.bottom-left {
    left: -10px;
    bottom: -10px;
}

#achievementsList li .achievement-selection-piece.bottom-right {
    right: -10px;
    bottom: -10px;
}

#achievementsList li .achievement-selection-piece.top-right img {
    left: -90%;
    top: 0;
}

#achievementsList li .achievement-selection-piece.bottom-left img {
    left: 0;
    top: -90%;
}

#achievementsList li .achievement-selection-piece.bottom-right img {
    left: -90%;
    top: -90%;
}

#achievementsList li.achievement-selected .achievement-selection-frame {
    opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
    #achievementsList li.achievement-slot:hover .achievement-selection-frame {
        opacity: 1;
    }
}

.achievement-claim-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(16, 22, 37, 0.75); /* Adjust transparency */
    color: #939292; /* Text color from the action buttons */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center; /* Ensure multi-line text is centered */
    font-size: 12px; /* Match text size */
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase; /* Match the button style */
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    z-index: 2;
}

@media (hover: hover) and (pointer: fine) {
    .achievement-claim-overlay:hover {
        background-color: rgba(44, 56, 82, 0.9); /* Brighter background on hover */
        color: #ffffff; /* Change text to white on hover */
    }
}

#achievementPopup {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 34px;
    background-color: #111b2e;
    z-index: 1000;
    display: none;
    box-sizing: border-box;
    overflow: hidden;
}

.popup-header {
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-achievement-image {
    width: 96px;
    height: 96px;
    object-fit: cover;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

#achievementPopup #closePopup.close-popup {
    position: absolute;
    top: 12px;
    right: 12px;
    width: auto;
    height: auto;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #f1f6ff;
    font-family: "Arial Black", "Arial", sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    text-transform: none;
    transform: scaleY(0.9);
    transform-origin: center;
}

#achievementPopup #closePopup.close-popup:focus-visible {
    background: transparent;
    color: #ffffff;
    outline: none;
}

@media (hover: hover) and (pointer: fine) {
    #achievementPopup #closePopup.close-popup:hover {
        background: transparent;
        color: #ffffff;
        outline: none;
    }
}

.popup-content {
    color: #fff;
    --achievement-popup-font-family: "Futura", "Avenir Next", "Trebuchet MS", Arial, sans-serif;
    font-family: var(--achievement-popup-font-family);
    font-weight: 400;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 14px 18px 18px;
    box-sizing: border-box;
    overflow-y: auto;
}

.popup-content h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: 0.04em;
}

.popup-content p#popupDescription {
    margin: 0;
    color: #d8e2f4;
    font-style: italic;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.32;
}

.popup-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.popup-detail-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background: rgba(17, 26, 43, 0.92);
    border: 1px solid rgba(63, 82, 114, 0.72);
    border-radius: 4px;
}

.popup-detail-label {
    color: #8ea3c8;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.popup-detail-value {
    color: #f5f8ff;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
}

#popupReward {
    min-height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.popup-reward-currency {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.popup-reward-amount {
    line-height: 1;
}

.popup-reward-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
    max-width: 20px;
    display: block;
    flex: 0 0 20px;
    object-fit: contain;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

#achievementPopup #popupReward .popup-reward-icon--arte-nexus {
    width: 14px;
    height: 14px;
    min-width: 14px;
    max-width: 14px;
    flex-basis: 14px;
}

.popup-reward-separator {
    color: #8ea3c8;
}

.claim-button {
    background-color: #101625;
    color: #939292;
    font-size: 13px;
    font-family: var(--achievement-popup-font-family);
    font-weight: 400;
    letter-spacing: 0.24em;
    padding: 8px 15px;
    border: 2px solid #2c3852;
    border-radius: 2.5px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 40px;
    position: relative;
    transition: background-color 1s ease, border-color 1s ease, color 1s ease;
    margin-top: 2px;
}

.claim-button:active, 
.claim-button:focus-visible {
    background-color: #2c3852;
    border-color: #5a7492;
    color: #ffffff;
    outline: none;
}

@media (hover: hover) and (pointer: fine) {
    .claim-button:hover {
        background-color: #2c3852;
        border-color: #5a7492;
        color: #ffffff;
        outline: none;
    }

    .claim-button:hover .claim-text {
        color: #ffffff;
    }
}

.claim-button .claim-text {
    flex: 0 0 auto;
    text-align: center;
}

.claim-button.claimed {
    background-color: #101625;
    border: 2px solid #2c3852;
    color: #ffffff;
    cursor: not-allowed;
    pointer-events: none;
    transition: background-color 0.5s ease, border-color 0.5s ease, color 0.5s ease;
}

.claim-button.claimed .claim-text {
    color: #ffffff;
    transition: color 0.5s ease;
}

.claim-button.hidden {
    display: none;
}

.hidden {
    display: none;
}
