/**
 * Sondaggissimo - Frontend CSS
 * Stili per i sondaggi in stile Instagram
 */

/* Contenitore principale */
.sondaggissimo-poll {
    margin: 25px 0;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    border: 1px solid #e6e6e6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    position: relative;
    overflow: hidden;
}

/* Domanda del sondaggio */
.sondaggissimo-domanda {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #262626;
    line-height: 1.4;
}

/* Opzioni del sondaggio */
.sondaggissimo-opzioni {
    margin-bottom: 15px;
}

.sondaggissimo-opzione {
    padding: 12px 15px;
    margin-bottom: 10px;
    background-color: #fafafa;
    border-radius: 4px;
    border: 1px solid #dbdbdb;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.sondaggissimo-opzione:hover {
    border-color: #0095f6;
    box-shadow: 0 0 0 1px #0095f6;
}

.sondaggissimo-opzione-selected {
    border-color: #0095f6;
    box-shadow: 0 0 0 1px #0095f6;
}

.sondaggissimo-opzione-testo {
    display: block;
    font-size: 14px;
    color: #262626;
    line-height: 1.4;
    z-index: 2;
    position: relative;
}

/* Animazione di caricamento */
.sondaggissimo-voting .sondaggissimo-opzione-selected:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background-color: rgba(0, 149, 246, 0.2);
    transition: width 1s ease;
    z-index: 1;
}

.sondaggissimo-voting .sondaggissimo-opzione-selected:after {
    width: 100%;
}

/* Risultati del sondaggio */
.sondaggissimo-risultati {
    margin-top: 10px;
}

.sondaggissimo-risultato {
    background-color: #fafafa;
    border: 1px solid #dbdbdb;
    border-radius: 4px;
    padding: 10px 15px;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}

.sondaggissimo-risultato-testo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    position: relative;
    z-index: 2;
}

.sondaggissimo-percentuale {
    font-weight: bold;
    color: #262626;
}

.sondaggissimo-barra-container {
    height: 8px;
    background-color: #eee;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.sondaggissimo-barra {
    height: 100%;
    background-color: #0095f6;
    border-radius: 4px;
    width: 0;
    transition: width 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}

/* Messaggi di errore */
.sondaggissimo-messaggio {
    margin-top: 10px;
}

.sondaggissimo-error {
    color: #ed4956;
    background-color: #fef0f0;
    padding: 8px 12px;
    border-radius: 4px;
    margin: 0;
    font-size: 14px;
}

/* Stili per la condivisione */
.sondaggissimo-share {
    margin: 20px 0;
    padding: 15px;
    background-color: #fafafa;
    border-radius: 8px;
    border: 1px solid #e6e6e6;
    text-align: center;
}

.sondaggissimo-share p {
    margin: 0 0 15px 0;
    font-size: 15px;
    color: #262626;
    line-height: 1.4;
}

.sondaggissimo-share-btn {
    background-color: #0095f6;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sondaggissimo-share-btn:hover {
    background-color: #0081d6;
}

.sondaggissimo-share-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 6px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8'%3E%3C/path%3E%3Cpolyline points='16 6 12 2 8 6'%3E%3C/polyline%3E%3Cline x1='12' y1='2' x2='12' y2='15'%3E%3C/line%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}