/**
 * Teia Social Sharing Styles
 * Estilos para o módulo de compartilhamento em redes sociais
 */

.teia-share-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    /* padding: 15px; */
    border-radius: 8px;
}

.teia-share-container::before {
    content: "Compartilhar:";
    font-weight: 600;
    color: #495057;
    margin-right: 8px;
    font-size: 14px;
}

/* Botões de compartilhamento */
.teia-share-container > * {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
}

.teia-share-container > *:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Botão dispositivo (compartilhamento nativo) */
.teia-share-device {
    background: silver;
    position: relative;
}

.teia-share-device:hover {
    background: #FF382E;
}

.teia-share-device svg {
    width: 20px;
    height: 20px;
}

/* Botão Facebook */
.teia-share-facebook {
    background: silver;
}

.teia-share-facebook:hover {
    background: #FF382E;
}

.teia-share-facebook svg {
    width: 20px;
    height: 20px;
}

/* Botão X (Twitter) */
.teia-share-x {
    background: silver;
}

.teia-share-x:hover {
    background: #FF382E;
}

.teia-share-x svg {
    width: 20px;
    height: 20px;
}

/* Estados especiais */
.teia-share-container .teia-share-device:active,
.teia-share-container .teia-share-facebook:active,
.teia-share-container .teia-share-x:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Responsividade */
@media (max-width: 768px) {
    .teia-share-container {
        /* flex-direction: column; */
        align-items: flex-start;
        gap: 8px;
    }
    
    .teia-share-container::before {
        margin-bottom: 8px;
    }
    
    .teia-share-container > * {
        width: 36px;
        height: 36px;
    }
    
    .teia-share-container > * svg {
        width: 18px;
        height: 18px;
    }
}

/* Modo escuro (se aplicável) */
@media (prefers-color-scheme: dark) {
    .teia-share-container {
        /* background: #2d3748; */
        /* border-color: #4a5568; */
    }
    
    .teia-share-container::before {
        /* color: #e2e8f0; */
    }
}

/* Animações */
@keyframes teia-share-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.teia-share-container > *:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
    animation: teia-share-pulse 0.3s ease;
}

/* Estados de carregamento */
.teia-share-container.loading > * {
    pointer-events: none;
}

/* Notificação de cópia */
.teia-share-copy-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    animation: teia-share-slide-in 0.3s ease;
}

@keyframes teia-share-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Variantes de tamanho */
.teia-share-container.teia-share-small > * {
    width: 32px;
    height: 32px;
}

.teia-share-container.teia-share-small > * svg {
    width: 16px;
    height: 16px;
}

.teia-share-container.teia-share-large > * {
    width: 48px;
    height: 48px;
}

.teia-share-container.teia-share-large > * svg {
    width: 24px;
    height: 24px;
}

/* Variante horizontal compacta */
.teia-share-container.teia-share-horizontal {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.teia-share-container.teia-share-horizontal::before {
    margin-right: 12px;
    margin-bottom: 0;
}

/* Variante vertical */
.teia-share-container.teia-share-vertical {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.teia-share-container.teia-share-vertical::before {
    margin-bottom: 8px;
    margin-right: 0;
}

/* Variante compacta (sem texto "Compartilhar:") */
.teia-share-container.teia-share-compact::before {
    display: none;
}

.teia-share-container.teia-share-compact {
    padding: 10px;
    background: transparent;
    border: none;
    display: inline-flex;
    margin-left: 0 !important;
}

/* Botões inline para listas de soluções */
.teia-share-container.teia-share-inline {
    display: inline-flex;
    margin: 0 0 0 10px;
    padding: 5px;
    background: transparent;
    border: none;
    gap: 8px;
}

.teia-share-container.teia-share-inline > * {
    width: 28px;
    height: 28px;
}

.teia-share-container.teia-share-inline > * svg {
    width: 14px;
    height: 14px;
}

/* Botões para visualização de solução */
.teia-share-container.teia-share-solution-view {
    margin: 15px 0 25px 0;
    justify-content: center;
}

/* Container para item de solução */
.solucao-item {
    display: flex;
    align-items: center;
    position: relative;
    padding-right: 32px;
}

.solucao-item .btn {
    flex: 1;
    margin-right: 10px;
}




.solucao-item .teia-share-container {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY( calc(-50% - 5px) );
    width: 32px;
    height: 32px;
    padding: 0 0;
    background-color: silver;
    overflow: hidden;
    cursor: pointer;
    background-image: url(../images/share.svg);
    background-size: 26px;
    background-position: calc(100% - 3px) center;
    background-repeat: no-repeat;
    transition: all 0.3s ease-out;
}
.solucao-item .teia-share-container:hover {
    width: 112px;
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.5);
}

.teia-share-container:not(.teia-share-solution-view) .teia-share-device,
.profile-info-answers-list a.teia-share-facebook,
.profile-info-answers-list a.teia-share-x {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px;
    margin-bottom: 0 !important;
    box-sizing: border-box;
    overflow: hidden;
    padding: 0 !important;
    background-color: silver;
    position: absolute;
    right: -33px;
    top: 50%;
    transform: translateY(-50%);
}
.profile-info-answers-list a.teia-share-facebook:hover,
.profile-info-answers-list a.teia-share-x:hover {
    background-color: #FF382E;
}
.teia-share-device svg,
.teia-share-facebook svg,
.teia-share-x svg {
    width: 26px !important;
    height: 26px !important;
}

.solucao-item .teia-share-container:hover .teia-share-device {
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}
.solucao-item .teia-share-container .teia-share-device:hover {
    background-color: #FF382E;
}
.solucao-item .teia-share-container:hover a.teia-share-facebook {
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
}
.solucao-item .teia-share-container:hover a.teia-share-x {
    right: 80px;
    top: 50%;
    transform: translateY(-50%);
}

