/* Stance Impact Visualization Styles */

.stance-impact-container {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.stance-impact-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 10px;
}

.stance-impact-title {
    font-weight: 600;
    color: #495057;
    margin: 0;
}

.stance-impact-level {
    font-size: 0.85em;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.stance-impact-level.high {
    background: #dc3545;
    color: white;
}

.stance-impact-level.medium {
    background: #fd7e14;
    color: white;
}

.stance-impact-level.low {
    background: #ffc107;
    color: #212529;
}

.stance-impact-level.minimal {
    background: #6c757d;
    color: white;
}

.stance-summary {
    font-style: italic;
    color: #6c757d;
    margin-bottom: 15px;
}

.stance-bars-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stance-bar {
    display: flex;
    align-items: center;
    padding: 8px 0;
}

.stance-label {
    min-width: 80px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.stance-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.stance-icon.agree {
    background: #28a745;
}

.stance-icon.disagree {
    background: #dc3545;
}

.stance-icon.neutral {
    background: #6c757d;
}

.stance-progress {
    flex: 1;
    margin: 0 10px;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.stance-progress-bar {
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75em;
    font-weight: 500;
    color: white;
}

.stance-progress-bar.agree {
    background: linear-gradient(90deg, #28a745, #20c997);
}

.stance-progress-bar.disagree {
    background: linear-gradient(90deg, #dc3545, #e74c3c);
}

.stance-progress-bar.neutral {
    background: linear-gradient(90deg, #6c757d, #adb5bd);
}

.stance-stats {
    min-width: 100px;
    text-align: right;
    font-size: 0.85em;
}

.stance-count {
    font-weight: 600;
    color: #495057;
}

.stance-impact {
    color: #6c757d;
    font-size: 0.8em;
}

.stance-impact.positive {
    color: #28a745;
}

.stance-impact.negative {
    color: #dc3545;
}

/* Overall impact indicator */
.overall-impact {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 500;
}

.overall-impact.positive {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.overall-impact.negative {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.overall-impact.neutral {
    background: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

.overall-impact-icon {
    margin-right: 5px;
}

/* Responsive design */
@media (max-width: 768px) {
    .stance-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }

    .stance-label {
        min-width: auto;
    }

    .stance-progress {
        margin: 0;
    }

    .stance-stats {
        text-align: left;
        min-width: auto;
    }
}

/* Tooltip styles for detailed information */
.stance-tooltip {
    position: relative;
    cursor: help;
}

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

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

/* Animation for loading stance data */
.stance-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #6c757d;
}

.stance-loading .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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