.foogallery-template-card-selector {
    padding-top: 5px;
}

.foogallery-template-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
}

.foogallery-template-card {
    position: relative;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    text-align: center;
    box-shadow: 0 0 3px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 90px;
}

.foogallery-template-card.trial-pro-starter {
    background-color: #3396c110;
    border-color: #3396c150;
    box-shadow: 0 0 5px #3396c150;
}

.foogallery-template-card.selected {
    border-color: var(--foogallery-color-wp-primary);
    background: #f7fcfe;
    box-shadow: 0 0 5px var(--foogallery-color-wp-primary-50);
}

.foogallery-template-card:hover {
    border-color: var(--foogallery-color-wp-primary);
    background: #fff;
    box-shadow: 0 0 8px rgba(0,115,170,0.2);
}

.foogallery-template-card svg {
    display: block;
    width: 40px;
    height: 40px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1;
    color: #000;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.foogallery-template-card.selected svg {
    color: var(--foogallery-color-wp-primary);
}

.foogallery-template-card h4 {
    margin: 0 0 8px 0;
    font-size: 13px;
    font-weight: 500;
    margin: 0;
}

.foogallery-gallery-template-metabox-message {
    font-size: 0.8em;
    color: #888;
    font-style: italic;
    font-weight: normal;
}

.foogallery-gallery-template-metabox-title.hidden {
    display: none !important;
}

.foogallery-template-card.is-pro::after {
    content: "PRO";
    position: absolute;
    top: 8px;
    right: 8px;
    background: #31be4d;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    line-height: 1;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.foogallery-template-card.is-pro.commerce::after {
    background: var(--foogallery-color-pro-commerce);
}

.pulse {
    position: absolute !important;
    top: 10px;
    right: 10px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--foogallery-color-wp-primary-50);
    box-shadow: 0 0 0 var(--foogallery-color-wp-primary-50);
    animation: pulsing 2s infinite;
    transition: all 0.2s;
}

.pulse.pro-starter {
    background: var(--foogallery-color-pro-starter-50);
    box-shadow: 0 0 0 var(--foogallery-color-pro-starter-50);
    animation: pulsing-pro-starter 2s infinite;
}

.pulse.pro-expert {
    background: var(--foogallery-color-pro-expert-50);
    box-shadow: 0 0 0 var(--foogallery-color-pro-expert-50);
    animation: pulsing-pro-expert 2s infinite;
}

.pulse.pro-commerce {
    background: var(--foogallery-color-pro-commerce-50);
    box-shadow: 0 0 0 var(--foogallery-color-pro-commerce-50);
    animation: pulsing-pro-commerce 2s infinite;
}

@keyframes pulsing {
    from {
        box-shadow: 0 0 0 0 var(--foogallery-color-wp-primary-50);
    }
    70% {
        box-shadow: 0 0 0 10px var(--foogallery-color-wp-primary-0);
    }
    to {
        box-shadow: 0 0 0 0 var(--foogallery-color-wp-primary-0);
    }
}

@keyframes pulsing-pro-starter {
    from {
        box-shadow: 0 0 0 0 var(--foogallery-color-pro-starter-50);
    }
    70% {
        box-shadow: 0 0 0 10px var(--foogallery-color-pro-starter-0);
    }
    to {
        box-shadow: 0 0 0 0 var(--foogallery-color-pro-starter-0);
    }
}

@keyframes pulsing-pro-expert {
    from {
        box-shadow: 0 0 0 0 var(--foogallery-color-pro-expert-50);
    }
    70% {
        box-shadow: 0 0 0 10px var(--foogallery-color-pro-expert-0);
    }
    to {
        box-shadow: 0 0 0 0 var(--foogallery-color-pro-expert-0);
    }
}

@keyframes pulsing-pro-commerce {
    from {
        box-shadow: 0 0 0 0 var(--foogallery-color-pro-commerce-50);
    }
    70% {
        box-shadow: 0 0 0 10px var(--foogallery-color-pro-commerce-0);
    }
    to {
        box-shadow: 0 0 0 0 var(--foogallery-color-pro-commerce-0);
    }
}
