/* Medal Popup Specific Styles - Redesigned for Cohesion */

:root {
    --modal-width: 400px;
    --modal-aspect-ratio: 4/5;
}

.medal-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(47, 53, 66, 0.8); /* From main style.css */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.medal-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.medal-popup-content {
    background-color: var(--card-bg, #ffffff);
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid #ddd;
    text-align: center;
    width: var(--modal-width);
    max-width: 90%;
    aspect-ratio: var(--modal-aspect-ratio);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center content vertically */
    padding: 2rem;
}

.medal-popup-overlay.active .medal-popup-content {
    transform: scale(1);
}

.medal-popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: bold;
    color: var(--text-light, #57606f);
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    line-height: 1;
}

.medal-popup-close:hover {
    color: var(--accent, #f7b731);
    transform: scale(1.1);
}

.medal-popup-image {
    width: 120px; /* Maintain a fixed size for the image */
    height: 120px;
    margin: 0 auto 15px;
    display: block;
    object-fit: contain;
}

.medal-popup-name {
    font-family: var(--heading-font, 'Georgia', serif);
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary, #4b6584);
}

.medal-popup-description {
    font-family: var(--body-font, 'Open Sans', sans-serif);
    font-size: 1.1em;
    color: var(--text, #2f3542);
    line-height: 1.6;
    margin-top: 10px; /* Add some space above description */
}

/* Responsive adjustments */
@media (max-width: 480px) {
    :root {
        --modal-width: 90%;
    }

    .medal-popup-content {
        padding: 1.5rem;
    }

    .medal-popup-image {
        width: 100px;
        height: 100px;
    }

    .medal-popup-name {
        font-size: 1.5em;
    }

    .medal-popup-description {
        font-size: 1em;
    }
}