/* TPWST Icon Grid Styles */

.tpwst-icon-grid-wrapper {
    width: 100%;
    margin: 20px 0;
}

.tpwst-icon-grid {
    display: grid;
    width: 100%;
    margin: 0 auto;
}

.tpwst-icon-item {
    position: relative;
    background: #fff;
    padding: 0;
    transition: all 0.3s ease;
}

.tpwst-icon-item:hover {
    border-color: #0073aa;
}

.tpwst-icon-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.tpwst-icon-link:hover {
    text-decoration: none;
    color: inherit;
}

.tpwst-icon-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.tpwst-icon-image {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.tpwst-icon-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.tpwst-icon-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .tpwst-icon-item {
        padding: 15px;
    }
    
    .tpwst-icon-image {
        width: 70px;
        height: 70px;
    }
    
    .tpwst-icon-title h3 {
        font-size: 14px;
    }
}

@media (max-width: 767px) {
    .tpwst-icon-item {
        padding: 12px;
    }
    
    .tpwst-icon-image {
        width: 60px;
        height: 60px;
    }
    
    .tpwst-icon-title h3 {
        font-size: 13px;
    }
    
    .tpwst-icon-content {
        gap: 10px;
    }
}

/* Hover effects */
.tpwst-icon-item.hover-scale {
    transition: transform 0.3s ease;
}

.tpwst-icon-item.hover-scale:hover {
    transform: scale(1.05);
}

.tpwst-icon-item.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tpwst-icon-item.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.tpwst-icon-item.hover-glow {
    transition: box-shadow 0.3s ease;
}

.tpwst-icon-item.hover-glow:hover {
    box-shadow: 0 0 20px rgba(0,123,255,0.3);
}

/* RTL support */
.tpwst-icon-grid-wrapper[dir="rtl"] .tpwst-icon-title h3 {
    text-align: center;
}

/* Tooltip styles enhancement */
.tpwst-icon-item[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
    opacity: 0;
    animation: tooltipFadeIn 0.3s ease forwards;
}

.tpwst-icon-item[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0,0,0,0.8);
    z-index: 1000;
    opacity: 0;
    animation: tooltipFadeIn 0.3s ease forwards;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Loading state */
.tpwst-icon-grid.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Empty state */
.tpwst-icon-grid-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}