/* Bombo Trophies plugin CSS */
:root {
    --bt-font-body: "Nunito", sans-serif;
    --bt-font-display: "Pangolin", "Nunito", sans-serif;
    --bt-card-bg: linear-gradient(180deg, rgba(20, 35, 70, 0.88), rgba(10, 18, 38, 0.92));
    --bt-text: #ffffff;
    --bt-muted: #d6deef;
    --bt-web-card-earned: linear-gradient(180deg, rgba(42, 65, 110, 0.96), rgba(15, 27, 56, 0.96));
    --bt-web-card-muted: linear-gradient(180deg, rgba(34, 48, 77, 0.9), rgba(18, 24, 40, 0.92));
    --bt-web-card-hidden: linear-gradient(180deg, rgba(28, 34, 49, 0.92), rgba(15, 19, 29, 0.94));
    --bt-web-card-border: rgba(181, 208, 255, 0.16);
    --bt-web-card-border-strong: rgba(156, 210, 255, 0.34);
    --bt-web-card-border-hidden: rgba(255, 255, 255, 0.12);
}

.trophies-section
{
   padding: 1.5rem;
    max-width: 1200px;
    margin: auto;
    background: 
    




    radial-gradient(
      ellipse at center,
      rgba(37, 58, 101, 0.85) 0%,
      rgba(20, 35, 70, 0.8) 40%,
      rgba(5, 10, 20, 0.9) 100%
    ),
    rgba(37, 58, 101, 0.3);
    border-radius: 6px;
}

.trophy-section {
    margin: 1.5rem 0 2.25rem;
}

.trophy-section-games {
    margin-top: 0.7rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(143, 182, 235, 0.32);
}

.trophy-section-games > h2,
.trophy-section-adult > h2 {
    color: #9fd6ff;
}

.trophy-section h2 {
    font-family: var(--bt-font-display);
    font-size: 1.8rem;
    letter-spacing: 0.02em;
    margin-bottom: 0.4rem;
}

.trophy-section-intro {
    font-family: var(--bt-font-body);
    color: var(--bt-muted);
    font-size: 0.98rem;
    margin: 0.15rem 0 0.9rem;
}

.trophy-subsection {
    margin: 0.8rem 0 1.5rem;
}

.trophy-subsection h3 {
    font-family: var(--bt-font-display);
    font-size: 1.25rem;
    margin: 0.25rem 0 0.5rem;
}

.trophy-divider {
    border: 0;
    height: 1px;
    margin: 0.7rem auto 1.25rem;
    width: min(94%, 1080px);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
}


.trophies-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 1rem 0 1.2rem;
    align-items: stretch;
}

.trophies-container-app {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    max-height: none;
    overflow: visible;
    text-align: center;
}

.trophy-card {
    box-sizing: border-box;
    width: 100%;
    min-height: 0;
    height: auto;
    border: 0;
    border-radius: 0;
    padding: 0.3rem 0.2rem 0.45rem;
    text-align: center;
    position: relative;
    overflow: visible;
    background: transparent;
    box-shadow: none;
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.trophy-card::before {
    content: none;
}

.trophy-card > * {
    position: relative;
    z-index: 1;
}

/* Web-shortcode trophies: clearer card surfaces and stronger state separation. */
.trophies-container:not(.trophies-container-app) .trophy-card {
    flex: 0 1 calc((100% - (4 * 12px)) / 5);
    max-width: calc((100% - (4 * 12px)) / 5);
    min-height: 188px;
    padding: 0.72rem 0.56rem 0.82rem;
    border: 1px solid var(--bt-web-card-border);
    border-radius: 18px;
    background: var(--bt-web-card-muted);
    box-shadow:
        0 14px 28px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    justify-content: flex-start;
    gap: 0.38rem;
    overflow: hidden;
}

.trophies-container:not(.trophies-container-app) .trophy-card.earned {
    background: var(--bt-web-card-earned);
    border-color: var(--bt-web-card-border-strong);
    box-shadow:
        0 18px 34px rgba(0, 0, 0, 0.22),
        0 0 0 1px rgba(116, 191, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.trophies-container:not(.trophies-container-app) .trophy-card.not-earned {
    background: var(--bt-web-card-muted);
    border-color: var(--bt-web-card-border);
}

.trophies-container:not(.trophies-container-app) .trophy-card.hidden {
    background: var(--bt-web-card-hidden);
    border-color: var(--bt-web-card-border-hidden);
    border-style: dashed;
}

.trophies-container:not(.trophies-container-app) .trophy-badge {
    margin: 0 0 0.42rem;
}

.trophies-container:not(.trophies-container-app) .trophy-badge img {
    width: clamp(82px, 6.8vw, 114px);
}

.trophies-container:not(.trophies-container-app) .trophy-card.not-earned .trophy-badge img {
    filter: grayscale(1) saturate(0.35);
    opacity: 0.44;
}

.trophies-container:not(.trophies-container-app) .trophy-card.hidden .trophy-badge img {
    filter: grayscale(1) saturate(0.2);
    opacity: 0.3;
}

.trophies-container:not(.trophies-container-app) .trophy-info h4,
.trophies-container:not(.trophies-container-app) .trophy-title {
    min-height: 2.7em;
    font-size: 1rem;
    line-height: 1.28;
    color: #f7fbff;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
}

.trophies-container:not(.trophies-container-app) .trophy-title.is-medium {
    font-size: 0.92rem;
}

.trophies-container:not(.trophies-container-app) .trophy-title.is-long {
    font-size: 0.84rem;
    line-height: 1.24;
}

.trophies-container:not(.trophies-container-app) .trophy-card.not-earned .trophy-info h4 {
    color: rgba(241, 246, 255, 0.95);
}

.trophies-container:not(.trophies-container-app) .trophy-card.hidden .trophy-info h4 {
    color: rgba(233, 238, 247, 0.82);
}

@media (max-width: 1280px) {
    .trophies-container-app {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .trophies-container:not(.trophies-container-app) .trophy-card {
        flex-basis: calc((100% - (3 * 12px)) / 4);
        max-width: calc((100% - (3 * 12px)) / 4);
    }
}

@media (max-width: 1024px) {
    .trophies-container-app {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .trophies-container:not(.trophies-container-app) .trophy-card {
        flex-basis: calc((100% - (2 * 12px)) / 3);
        max-width: calc((100% - (2 * 12px)) / 3);
        min-height: 180px;
    }
}

@media (max-width: 768px) {
    .trophies-container-app {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .trophies-container {
        gap: 10px;
    }

    .trophies-container:not(.trophies-container-app) .trophy-card {
        flex-basis: calc((100% - (2 * 10px)) / 3);
        max-width: calc((100% - (2 * 10px)) / 3);
        min-height: 168px;
        padding: 0.58rem 0.42rem 0.66rem;
    }

    .trophies-container:not(.trophies-container-app) .trophy-badge img {
        width: clamp(82px, 15vw, 108px);
    }
}

@media (max-width: 600px) {
    .trophies-container-app {
        gap: 8px;
    }

    .trophies-container {
        gap: 8px;
    }

    .trophies-container:not(.trophies-container-app) .trophy-card {
        flex-basis: calc((100% - 8px) / 2);
        max-width: calc((100% - 8px) / 2);
        min-height: 164px;
        padding: 0.56rem 0.4rem 0.62rem;
    }

    .trophies-container:not(.trophies-container-app) .trophy-badge img {
        width: clamp(92px, 31vw, 126px);
    }

    .trophies-container:not(.trophies-container-app) .trophy-info h4,
    .trophies-container:not(.trophies-container-app) .trophy-title {
        min-height: 2.4em;
        font-size: 0.92rem;
    }

    .trophies-container:not(.trophies-container-app) .trophy-title.is-medium {
        font-size: 0.86rem;
    }

    .trophies-container:not(.trophies-container-app) .trophy-title.is-long {
        font-size: 0.78rem;
    }
}



.trophy-card.tier-gold   { --tier-color: gold; }
.trophy-card.tier-silver { --tier-color: silver; }
.trophy-card.tier-bronze { --tier-color: saddlebrown; }




.trophy-card.not-earned {
    opacity: 1;
}

.trophy-card.not-earned p {
    color: rgba(225, 236, 255, 0.8);
}



.trophy-card.earned {
    color: #fff;
}


.trophy-card.earned.tier-gold {
    border-color: transparent;
}


.trophy-card.earned.tier-bronze
{
    border-color: transparent;
}

.trophy-card.earned.tier-silver
{
    border-color: transparent;
}

.trophy-card.hidden img {
    filter: grayscale(100%);
    opacity: 0.55;
}

.trophy-badge {
    width: 100%;
    height: auto;
    margin: 0 0 0.42rem;
    border-radius: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: none;
    box-shadow: none;
}

.trophy-badge img {
    width: clamp(88px, 8.8vw, 130px);
    max-width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    object-position: center;
    display: block;
    margin: 0;
    transition: transform 0.25s ease;
}

.trophy-card:hover {
    transform: translateY(-1px);
    box-shadow: none;
    z-index: 2;
}

.trophy-card:hover .trophy-badge img {
    transform: scale(1.03);
}

.trophy-card.not-earned .trophy-badge img {
    filter: grayscale(1);
    opacity: 0.58;
}

.trophy-info h4 {
    font-size: 0.82rem;
    line-height: 1.24;
    min-height: 2.45em;
    margin: 0;
    font-family: var(--bt-font-display);
    color: var(--bt-text);
}

.trophy-info p {
    font-size: 0.68rem;
    line-height: 1.24;
    margin: 0.1rem 0 0;
    color: rgba(233, 241, 255, 0.88);
    font-family: var(--bt-font-body);
}

.trophy-card.earned .trophy-info p {
    color: #9ee9c0;
}

@media (max-width: 768px) {
    .trophy-card {
        padding: 0.28rem 0.12rem 0.42rem;
    }

    .trophies-container:not(.trophies-container-app) .trophy-card {
        min-height: 188px;
        padding: 0.75rem 0.55rem 0.85rem;
    }

    .trophy-badge img {
        width: clamp(84px, 34vw, 122px);
    }

    .trophy-info h4 {
        font-size: 0.76rem;
    }

    .trophies-container:not(.trophies-container-app) .trophy-info h4 {
        font-size: 0.8rem;
    }

    .trophy-info p {
        font-size: 0.66rem;
    }
}



#trophy-toast-container {
    position: fixed;
top: 80px;
    right: 20px;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    z-index: 9999;
}

/* App-näkymä: toast hieman ylemmäs */
body.page-template-template-app #trophy-toast-container {
    top: 50px;
    right: max(20px, env(safe-area-inset-right));
}

.trophy-toast {
    background: #253a65;
    color: #fff;
    padding: 21px 5px 21px 12px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 18px;
    width: min(360px, calc(100vw - 40px));
    min-width: 320px;
    box-sizing: border-box;
    position: relative; /* tärkeää animaatiolle */
    transition: top 0.3s ease;
}

.trophy-toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
}

.trophy-message {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.2;
    font-size: 17px;
    font-weight: 100;
    font-family: 'Fredoka', sans-serif;
}

.trophy-close {
    background: transparent;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #777;
    flex: 0 0 auto;
    margin-left: auto;
    padding-left: 10px;
    position: relative;
    top: -24px;
    font-weight: 100;
}

.trophy-close:hover {
    color: #c9d6ff;
}

@media (max-width: 480px) {
    .trophy-toast {
        min-width: 0;
        width: calc(100vw - 32px);
    }
}






.trophy-summary {
    display: inline-flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 9px;
    text-align: center;
    font-size: 1rem;
    margin-top: 1rem;
    width: 100%;
    max-width: 100%;
}

.trophy-summary .trophy-summary-item {
    min-width: 88px;
    flex: 0 0 auto;
}

.trophy-summary .trophy-summary-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
    vertical-align: middle;
}

@media (max-width: 560px) {
    .trophy-summary {
        flex-wrap: wrap;
    }

    .trophy-summary .trophy-summary-item {
        flex: 1 1 calc(50% - 9px);
        min-width: 0;
    }
}

.trophy-summary img.emoji {
   
    height: 1.1rem !important;
    width: 1.1rem !important;
   
}
