/**
 * Estilos do frontend do Share For All
 *
 * @package ShareForAll
 * @since 1.0.0
 */

/* Botões de compartilhamento */
.sfa-share-buttons {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.sfa-share-buttons h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
    text-align: center;
}

.sfa-share-button {
    display: inline-block;
    padding: 10px 20px;
    margin: 5px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    min-width: 120px;
    text-align: center;
}

.sfa-share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.sfa-share-button:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Botão LinkedIn */
.sfa-share-linkedin {
    background: #0077b5;
    color: #fff;
}

.sfa-share-linkedin:hover {
    background: #005885;
    color: #fff;
}

/* Ícones dos botões */
.sfa-share-button:before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    vertical-align: middle;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.sfa-share-linkedin:before {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSIjZmZmIj48cGF0aCBkPSJNMjAuNDQ3IDIwLjQ1MmgtMy41NTR2LTUuNTY5YzAtMS4zMjgtLjAyNy0zLjAzNy0xLjg1Mi0zLjAzNy0xLjg1MyAwLTIuMTM2IDEuNDQ1LTIuMTM2IDIuOTM5djUuNjY3SDkuMzUxVjloMy40MTR2MS41NjFoLjA0NmMuNDc3LS45IDEuNjM3LTEuODUgMy4zNy0xLjg1IDMuNjAxIDAgNC4yNjcgMi4zNyA0LjI2NyA1LjQ1NXY2LjI4NnpNNS4zMzcgNy40MzNjLTEuMTQ0IDAtMi4wNjMtLjkyNi0yLjA2My0yLjA2NSAwLTEuMTM4LjkyLTIuMDYzIDIuMDYzLTIuMDYzIDEuMTQgMCAyLjA2NC45MjUgMi4wNjQgMi4wNjMgMCAxLjEzOS0uOTI1IDIuMDY1LTIuMDY0IDIuMDY1em0xLjc4MiAxMy4wMTlIMy41NTVWOWgzLjU2NHYxMS40NTJ6TTIyLjIyNSAwSDEuNzcxQy43OTIgMCAwIC43NzQgMCAxLjcyOXYyMC41NDJDMCAyMy4yMjcuNzkyIDI0IDEuNzcxIDI0aDIwLjQ1MUMyMy4yIDI0IDI0IDIzLjIyNyAyNCAyMi4yNzFWMS43MjlDMjQgLjc3NCAyMy4yIDAgMjIuMjI1IDB6Ii8+PC9zdmc+');
}

/* Widget de compartilhamento */
.sfa-share-widget {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}

.sfa-share-widget h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* Contador de compartilhamentos */
.sfa-share-count {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    text-align: center;
}

.sfa-share-count-number {
    font-weight: bold;
    color: #0073aa;
}

/* Layout responsivo */
@media (max-width: 768px) {
    .sfa-share-buttons {
        padding: 10px;
        margin: 15px 0;
    }
    
    .sfa-share-button {
        display: block;
        width: 100%;
        margin: 5px 0;
        min-width: auto;
    }
    
    .sfa-share-widget {
        margin-left: -20px;
        margin-right: -20px;
        border-left: none;
        border-right: none;
        border-radius: 0;
    }
}

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

.sfa-share-button.sfa-sharing {
    animation: sfa-pulse 1s infinite;
    opacity: 0.7;
    pointer-events: none;
}

/* Estados de loading */
.sfa-share-button.sfa-loading:after {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: sfa-spin 1s linear infinite;
}

@keyframes sfa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mensagens de feedback */
.sfa-share-message {
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 14px;
    display: none;
}

.sfa-share-message.success {
    background: #d1e7dd;
    border: 1px solid #badbcc;
    color: #0f5132;
}

.sfa-share-message.error {
    background: #f8d7da;
    border: 1px solid #f5c2c7;
    color: #842029;
}

.sfa-share-message.info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Tooltip personalizado */
.sfa-tooltip {
    position: relative;
    cursor: help;
}

.sfa-tooltip:hover:after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 5px 8px;
    border-radius: 3px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
}

.sfa-tooltip:hover:before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    z-index: 1000;
}

/* Acessibilidade */
.sfa-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Modo escuro */
@media (prefers-color-scheme: dark) {
    .sfa-share-buttons {
        background: #2c2c2c;
        border-color: #444;
        color: #fff;
    }
    
    .sfa-share-buttons h4 {
        color: #fff;
    }
    
    .sfa-share-widget {
        background: #2c2c2c;
        border-color: #444;
        color: #fff;
    }
    
    .sfa-share-widget h3 {
        color: #fff;
        border-bottom-color: #444;
    }
    
    .sfa-share-count {
        color: #ccc;
    }
}

/* Print styles */
@media print {
    .sfa-share-buttons,
    .sfa-share-widget {
        display: none;
    }
}