/* Lemonade Empire: achievements.css */

.achievements-page {
    padding: 26px 0 56px;
}

.achievements-hero {
    padding: 30px 4px 24px;
}

.achievements-hero-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
}

.achievements-hero h1 {
    margin: 7px 0 10px;
    font-size: clamp(40px, 6vw, 58px);
    line-height: 1;
}

.achievements-hero p {
    max-width: 620px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.75;
}

.achievement-summary-card {
    min-width: 180px;
    padding: 15px 17px;
    background: #f5cf5c;
    border: 1px solid #d9b847;
    border-radius: 14px;
}

.achievement-summary-card > span {
    display: block;
    color: #62551f;
    font-size: 8px;
    font-weight: bold;
    letter-spacing: 1.2px;
}

.achievement-summary-card > strong {
    display: block;
    margin-top: 4px;
    color: #3e411f;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 28px;
    font-weight: normal;
}

.achievement-summary-card > strong b {
    font-weight: normal;
}

.achievement-summary-card small {
    display: block;
    margin-top: 5px;
    color: #62551f;
    font-size: 9px;
    text-align: right;
}

.achievement-summary-progress {
    height: 6px;
    margin-top: 9px;
    overflow: hidden;
    background: #fff5c780;
    border-radius: 99px;
}

.achievement-summary-progress span {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--green);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
}

.achievement-filters {
    display: flex;
    gap: 5px;
    margin-bottom: 18px;
    padding: 7px;
    overflow-x: auto;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 13px;
}

.achievement-filters button {
    min-height: 38px;
    padding: 7px 12px;
    flex: 0 0 auto;
    color: var(--muted);
    background: #f3f2e7;
    border-radius: 8px;
    font-size: 10px;
    font-weight: bold;
}

.achievement-filters button:hover {
    color: var(--ink);
    background: #ecead9;
}

.achievement-filters button.is-active {
    color: #fffdee;
    background: var(--green);
}

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

.achievement-card {
    position: relative;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 28px;
    gap: 13px;
    padding: 17px;
    min-width: 0;
    background: #f2f1e7;
    border: 1px solid var(--line);
    border-radius: 14px;
    opacity: .72;
}

.achievement-card.is-unlocked {
    opacity: 1;
    background: var(--paper);
    border-color: #b7c99f;
    box-shadow: 0 5px 16px #3343290b;
}

.achievement-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    background: #e4e3d7;
    border-radius: 13px;
    font-size: 25px;
    filter: grayscale(.8);
}

.is-unlocked .achievement-icon {
    background: #fff1b5;
    filter: none;
}

.achievement-card-copy {
    min-width: 0;
}

.achievement-category {
    display: block;
    color: var(--muted);
    font-size: 8px;
    font-weight: bold;
    letter-spacing: .9px;
    text-transform: uppercase;
}

.achievement-card h2 {
    margin: 3px 0 5px;
    font-size: 18px;
    line-height: 1.15;
}

.achievement-card p {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.55;
}

.achievement-progress-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 11px;
    color: var(--muted);
    font-size: 8px;
}

.achievement-progress {
    height: 5px;
    margin-top: 4px;
    overflow: hidden;
    background: #dadccf;
    border-radius: 99px;
}

.achievement-progress span {
    display: block;
    width: 100%;
    height: 100%;
    background: #b18b27;
    transform-origin: left;
}

.is-unlocked .achievement-progress span {
    background: #68905a;
}

.achievement-earned {
    display: block;
    margin-top: 6px;
    color: #54714c;
    font-size: 8px;
}

.achievement-status {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    color: #8f9489;
    background: #e2e3da;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
}

.is-unlocked .achievement-status {
    color: #fff;
    background: var(--green);
}

.achievement-loading {
    grid-column: 1 / -1;
    padding: 30px;
    color: var(--muted);
    text-align: center;
}


/* Achievement notification */

.achievement-toast-host {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 120;
    width: min(360px, calc(100vw - 24px));
    pointer-events: none;
}

.achievement-toast {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 13px;
    align-items: center;
    padding: 14px 16px;
    color: #fffdea;
    background: #244532f5;
    border: 1px solid #ffffff2e;
    border-radius: 15px;
    box-shadow: 0 16px 42px #13281c40;
    opacity: 0;
    transform: translateY(18px) scale(.98);
    transition: opacity .22s ease, transform .22s ease;
}

.achievement-toast.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.achievement-toast.is-leaving {
    opacity: 0;
    transform: translateY(10px) scale(.98);
}

.achievement-toast-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    background: #f5cf5c;
    border-radius: 13px;
    font-size: 27px;
}

.achievement-toast-copy {
    min-width: 0;
}

.achievement-toast-kicker {
    display: block;
    margin-bottom: 2px;
    color: #f5cf5c;
    font-size: 8px;
    font-weight: bold;
    letter-spacing: 1.2px;
}

.achievement-toast strong {
    display: block;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 18px;
    font-weight: normal;
    line-height: 1.2;
}

.achievement-toast small {
    display: block;
    margin-top: 3px;
    color: #dfe8d7;
    font-size: 9px;
    line-height: 1.45;
}

@media (max-width: 780px) {
    .achievement-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .achievements-page {
        padding-top: 8px;
    }

    .achievements-hero-row {
        display: block;
    }

    .achievement-summary-card {
        width: 180px;
        margin-top: 18px;
    }

    .achievement-card {
        grid-template-columns: 44px minmax(0, 1fr) 25px;
        gap: 10px;
        padding: 14px;
    }

    .achievement-icon {
        width: 44px;
        height: 44px;
        font-size: 21px;
    }

    .achievement-toast-host {
        right: 12px;
        bottom: 12px;
        width: calc(100vw - 24px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .achievement-toast,
    .achievement-summary-progress span {
        transition: none !important;
    }
}

html.reduce-motion .achievement-toast,
html.reduce-motion .achievement-summary-progress span {
    transition: none !important;
}
