/* UN SDG official icon tiles — shared admin picker & landing display */

.sdg-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 2px;
    max-width: 720px;
}

@media (max-width: 991.98px) {
    .sdg-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        max-width: 480px;
    }
}

@media (max-width: 575.98px) {
    .sdg-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        max-width: 100%;
    }
}

.sdg-card {
    position: relative;
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    line-height: 0;
    background: #e8e8e8;
}

.sdg-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    vertical-align: top;
}

/* Admin picker — grid penuh, 6 kolom seperti poster UN */
.sdg-picker .sdg-grid,
.sdg-grid--admin {
    max-width: none;
    width: 100%;
}

.sdg-mini-list {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    max-width: 200px;
}

.sdg-mini-list__img {
    width: 28px;
    height: 28px;
    object-fit: cover;
    display: block;
}

.sdg-card--selectable {
    cursor: pointer;
    border: 3px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.sdg-card--selectable:hover {
    transform: translateY(-2px);
    z-index: 1;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.sdg-card--selectable.is-selected {
    border-color: #fff;
    box-shadow: 0 0 0 2px #111, 0 0 0 4px #0468b1;
    z-index: 2;
}

.sdg-card__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.sdg-card__check {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #0468b1;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.15s, transform 0.15s;
    pointer-events: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.sdg-card--selectable.is-selected .sdg-card__check {
    opacity: 1;
    transform: scale(1);
}

/* Landing / detail — compact row of official icons */
.sdg-goals-display {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    align-items: flex-start;
}

.sdg-goals-display .sdg-card {
    width: 72px;
    flex: 0 0 72px;
}

@media (min-width: 768px) {
    .sdg-goals-display .sdg-card {
        width: 84px;
        flex: 0 0 84px;
    }
}

.sdg-goals-display--grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 72px);
    gap: 2px;
}

@media (min-width: 768px) {
    .sdg-goals-display--grid {
        grid-template-columns: repeat(auto-fill, 84px);
    }
}
