/* ============================================================
   Icon Category Grid Widget — Neumorphic Cards
   ============================================================ */

.rmt-icon-cat-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    width: 100%;
}

.rmt-icon-cat-grid__item {
    display: flex;
}

/* ---- Card Inner ---- */
.rmt-icon-cat-card__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 24px 16px 20px;
    border-radius: 16px;
    background-color: #F2F2F2;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;

    /* CSS custom property defaults (Figma values) */
    --rmt-neu-glow-color: #F2F2F2;
    --rmt-neu-glow-blur: 60px;
    --rmt-neu-highlight-color: rgba(255, 255, 255, 0.5);
    --rmt-neu-edge-light: #FFFFFF;
    --rmt-neu-edge-dark-tl: #262626;
    --rmt-neu-edge-dark-br: #333333;
    --rmt-neu-outer-color: rgba(0, 0, 0, 0.12);
    --rmt-neu-outer-blur: 30px;
    --rmt-neu-spread-color: rgba(0, 0, 0, 0.1);
    --rmt-neu-spread-blur: 7.5px;
}

a.rmt-icon-cat-card__inner:hover {
    text-decoration: none;
}

/* ---- Neumorphic Shadow — using CSS custom properties for full control ---- */
.rmt-neumorphic-yes .rmt-icon-cat-card__inner {
    box-shadow:
        /* 1. Inner glow (large soft inset) */
        0px 0px var(--rmt-neu-glow-blur) 0px var(--rmt-neu-glow-color) inset,
        /* 2. Inner highlight (mid inset) */
        0px 0px 11.25px 0px var(--rmt-neu-highlight-color) inset,
        /* 3. Top-left light edge */
        -3.75px -3.75px 1.87px -3.75px var(--rmt-neu-edge-light) inset,
        /* 4. Bottom-right light edge */
        3.75px 3.75px 1.87px -3.75px var(--rmt-neu-edge-light) inset,
        /* 5. Top-left dark edge */
        -3.75px -3.75px 0px -1.87px var(--rmt-neu-edge-dark-tl) inset,
        /* 6. Bottom-right dark edge */
        3.75px 3.75px 0px -1.87px var(--rmt-neu-edge-dark-br) inset,
        /* 7. Outer drop shadow (main) */
        0px 3.75px var(--rmt-neu-outer-blur) 0px var(--rmt-neu-outer-color),
        /* 8. Outer spread shadow (soft) */
        0px 0px var(--rmt-neu-spread-blur) 0px var(--rmt-neu-spread-color);
    backdrop-filter: blur(45px);
    -webkit-backdrop-filter: blur(45px);
}

/* Hover — elevate outer shadows */
.rmt-neumorphic-yes .rmt-icon-cat-card__inner:hover {
    box-shadow:
        0px 0px var(--rmt-neu-glow-blur) 0px var(--rmt-neu-glow-color) inset,
        0px 0px 11.25px 0px var(--rmt-neu-highlight-color) inset,
        -3.75px -3.75px 1.87px -3.75px var(--rmt-neu-edge-light) inset,
        3.75px 3.75px 1.87px -3.75px var(--rmt-neu-edge-light) inset,
        -3.75px -3.75px 0px -1.87px var(--rmt-neu-edge-dark-tl) inset,
        3.75px 3.75px 0px -1.87px var(--rmt-neu-edge-dark-br) inset,
        0px 6px calc(var(--rmt-neu-outer-blur) * 1.2) 0px var(--rmt-neu-outer-color),
        0px 0px calc(var(--rmt-neu-spread-blur) * 1.3) 0px var(--rmt-neu-spread-color);
}

.rmt-icon-cat-card__inner:hover {
    transform: translateY(-2px);
}

/* ---- Icon Circle ---- */
.rmt-icon-cat-card__icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: transparent;
    border: 2px solid #333333;
    margin-bottom: 14px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.rmt-icon-cat-card__icon-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rmt-icon-cat-card__icon-wrap i {
    font-size: 28px;
    color: #1a1a1a;
    line-height: 1;
    transition: color 0.3s ease;
}

.rmt-icon-cat-card__icon-wrap svg {
    width: 28px;
    height: 28px;
    fill: #1a1a1a;
    transition: fill 0.3s ease;
}

/* ---- Icon Placeholder ---- */
.rmt-icon-cat-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: #F3F4F6;
    color: #9CA3AF;
}

.rmt-icon-cat-card__placeholder span {
    font-size: 28px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1;
}

/* ---- Title ---- */
.rmt-icon-cat-card__title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    padding: 0;
    line-height: 1.3;
    text-align: center;
    transition: color 0.3s ease;
}

/* ---- Empty State ---- */
.rmt-icon-cat-empty {
    text-align: center;
    padding: 40px 20px;
    color: #9CA3AF;
    font-size: 14px;
    background: #F9FAFB;
    border-radius: 8px;
    border: 1px dashed #D1D5DB;
}

/* ---- Responsive ---- */
@media (max-width: 767px) {
    .rmt-icon-cat-card__icon-wrap {
        width: 50px;
        height: 50px;
    }

    .rmt-icon-cat-card__icon-wrap i {
        font-size: 22px;
    }

    .rmt-icon-cat-card__icon-wrap svg {
        width: 22px;
        height: 22px;
    }

    .rmt-icon-cat-card__placeholder span {
        font-size: 20px;
    }

    .rmt-icon-cat-card__title {
        font-size: 12px;
    }

    .rmt-icon-cat-card__inner {
        padding: 16px 10px 14px;
    }
}
