/**
 * Widget Ícone SVG - Estilos
 * Ícone avançado com suporte a clamp() responsivo e currentColor
 */

/* ==========================================
   CONTAINER PRINCIPAL
   ========================================== */
.icon-svg-wrapper {
    display: block;
    width: 100%;
}

/* ==========================================
   CONTAINER DO ÍCONE
   ========================================== */
.icon-svg-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: currentColor;
    transition: all 0.3s ease;
}

/* ==========================================
   ELEMENTOS INTERNOS (SVG, IMG, I)
   ========================================== */
.icon-svg-container svg,
.icon-svg-container img,
.icon-svg-container i {
    width: 100%;
    height: 100%;
    display: block;
}

.icon-svg-container svg {
    fill: currentColor;
}

.icon-svg-container i {
    font-size: inherit;
    line-height: 1;
}

/* ==========================================
   ESTADOS
   ========================================== */

/* Hover */
.icon-svg-container:hover {
    cursor: pointer;
}

/* Link */
a.icon-svg-container {
    text-decoration: none;
    cursor: pointer;
}

a.icon-svg-container:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* ==========================================
   RESPONSIVIDADE ADICIONAL
   ========================================== */

/* Ajustes para telas muito pequenas */
@media (max-width: 480px) {
    .icon-svg-wrapper {
        max-width: 100%;
    }
}

/* ==========================================
   ACESSIBILIDADE
   ========================================== */

/* Remove transições para quem prefere movimento reduzido */
@media (prefers-reduced-motion: reduce) {
    .icon-svg-container {
        transition: none;
    }
}

/* ==========================================
   SUPORTE RTL
   ========================================== */
.rtl .icon-svg-container svg {
    transform: scaleX(-1);
}

/* ==========================================
   UTILITÁRIOS
   ========================================== */

/* Garante que o SVG seja renderizado corretamente */
.icon-svg-container svg {
    overflow: visible;
    vertical-align: middle;
}

/* Remove espaços em branco de imagens */
.icon-svg-container img {
    vertical-align: middle;
}

/* Garante que ícones FontAwesome sejam centralizados */
.icon-svg-container i {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================
   CORREÇÕES DE ASPECTOS ESPECÍFICOS
   ========================================== */

/* Preserva aspect ratio do SVG */
.icon-svg-container svg {
    object-fit: contain;
}

/* Garante que imagens SVG não quebrem */
.icon-svg-container img[src$=".svg"] {
    object-fit: contain;
}

/* ==========================================
   MODO ESCURO (ELEMENTOR EDITOR)
   ========================================== */
.elementor-editor-dark-mode .icon-svg-container {
    color: rgba(255, 255, 255, 0.8);
}

/* ==========================================
   PREVIEW NO EDITOR
   ========================================== */
.elementor-editor .icon-svg-container {
    min-width: 20px;
    min-height: 20px;
}

/* Indica que o elemento é interativo no editor */
.elementor-editor a.icon-svg-container {
    pointer-events: none;
}

/* ==========================================
   ESTADOS DE LOADING
   ========================================== */
.icon-svg-container.loading {
    opacity: 0.5;
    animation: icon-pulse 1.5s ease-in-out infinite;
}

@keyframes icon-pulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.8;
    }
}

/* ==========================================
   RESET E NORMALIZAÇÃO
   ========================================== */
.icon-svg-wrapper * {
    box-sizing: border-box;
}

.icon-svg-container {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Remove margens padrão */
.elementor-widget-icon-svg {
    margin-bottom: 0;
}

/* ==========================================
   COMPATIBILIDADE COM TEMAS
   ========================================== */

/* Garante que o widget funcione com qualquer tema */
.icon-svg-container svg path,
.icon-svg-container svg circle,
.icon-svg-container svg rect,
.icon-svg-container svg polygon {
    fill: inherit;
}

/* Reseta estilos que podem conflitar */
.icon-svg-container::before,
.icon-svg-container::after {
    display: none !important;
}