/* AI Provider Scoring Calculator Styles */
.calculator {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
}

.calculator h3 {
    margin-bottom: 2rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    font-size: 1.3rem;
    padding-top: 1rem; /* Added top padding */
}

.calculator-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    width: 100%;
    flex: 1;
    min-height: 0;
}

.sliders-column {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.chart-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.score-column {
    flex: 0.8;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.risk-dimension {
    margin-bottom: 1rem;
}

.risk-dimension label {
    display: block;
    margin-bottom: 0.4rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--fg);
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.risk-slider {
    flex: 1;
    height: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
    /*-webkit-appearance: none;*/
}

.risk-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.risk-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(4, 217, 255, 0.5);
}

.risk-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.risk-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(4, 217, 255, 0.5);
}

.risk-value {
    min-width: 30px;
    text-align: right;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--accent);
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    flex-shrink: 0;
}

.reset-button {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    color: var(--fg);
    padding: 0.8rem;
    font-size: 0.9rem;
}

.score-result {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.score-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
}

.score-rating {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--fg);
}

.score-breakdown {
    text-align: left;
    font-size: 0.85rem;
    color: var(--muted);
}

.score-breakdown h4 {
    margin-bottom: 0.4rem;
    color: var(--fg);
    font-size: 0.9rem;
}

.score-breakdown p {
    margin: 0;
    line-height: 1.4;
}

.descriptions-section {
    width: 100%;
    flex-shrink: 0;
}

.descriptions-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
}

#dimension-title {
    color: var(--fg);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

#dimension-description.descriptions-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    grid-template-rows: repeat(2, 1fr) !important;
    gap: 1rem !important;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding-top: 4px;
}

.description-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.description-item:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(4, 217, 255, 0.1);
    transform: translateY(-3px);
}

.description-title {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.3;
}

.description-text {
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.4;
    flex-grow: 1;
}

/* Peer Checkboxes Styling */
.peer-checkboxes-container {
    display: flex;
    flex-direction: row; /* Changed to row */
    gap: 1.2rem; /* Adjusted gap for horizontal spacing */
    margin-top: 1rem;
    margin-bottom: 1rem;
    justify-content: center; /* Center align checkboxes */
    flex-wrap: wrap; /* Allow wrapping if space is very constrained */
}

.peer-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    color: var(--muted);
    transition: color 0.3s ease;
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid transparent;
}

.peer-checkbox-label:hover {
    color: var(--fg);
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border);
}

.peer-checkbox-label input[type="checkbox"] {
    display: none; /* Hide default checkbox */
}

.checkmark {
    width: 18px;
    height: 18px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-right: 0.8rem;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.peer-checkbox-label:hover .checkmark {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: var(--accent);
}

.peer-checkbox-label input[type="checkbox"]:checked + .checkmark {
    background-color: var(--accent);
    border-color: var(--accent);
}

.peer-checkbox-label input[type="checkbox"]:checked + .checkmark:after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid var(--bg);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Demo Button Styling */
.demo-button {
    background: linear-gradient(135deg, var(--accent) 0%, #0BC5EA 100%) !important;
    color: var(--bg) !important;
    border: none !important;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease !important;
}

.demo-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.demo-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 25px rgba(4, 217, 255, 0.3) !important;
    animation: demoGlow 2s ease-in-out infinite !important;
}

.demo-button:hover::before {
    left: 100%;
}

.demo-button:active {
    transform: translateY(0) !important;
}

/* Animation highlight effects */
.peer-checkbox-label.selected {
    background: rgba(4, 217, 255, 0.1);
    border: 2px solid rgba(4, 217, 255, 0.5);
    transition: all 0.3s ease;
}

@keyframes demoGlow {
    0%, 100% {
        box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
    }
    50% {
        box-shadow: 0 15px 35px rgba(16, 185, 129, 0.5);
    }
}

/* Chart animation enhancement */
.chart-container.animating {
    animation: chartGlow 2s ease-in-out infinite;
}

@keyframes chartGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(4, 217, 255, 0.2);
    }
    50% {
        box-shadow: 0 0 20px rgba(4, 217, 255, 0.4);
    }
}

/* Score display animation during demo */
.score-result.animating .score-number {
    animation: scorePulse 0.5s ease-in-out;
}

@keyframes scorePulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
        color: #10B981;
    }
    100% {
        transform: scale(1);
    }
}

/* Responsive adjustments for calculator */
@media (max-width: 1200px) {
    .calculator {
        padding: 1rem;
    }
    
    .calculator-row {
        gap: 1rem;
    }
    
    .sliders-column {
        flex: 1;
    }
    
    .score-column {
        flex: 1;
    }
    
    .descriptions-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .calculator {
        padding: 0.8rem;
    }
    
    .calculator-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .sliders-column {
        overflow-y: visible;
    }
    
    .chart-container {
        height: 250px;
    }
    
    #dimension-description.descriptions-grid {
        grid-template-columns: 1fr !important;
    }
    
    .score-number {
        font-size: 2rem;
    }
    
    .risk-dimension label {
        font-size: 0.8rem;
    }
    
    .slider-container {
        gap: 0.5rem;
    }
}

/* Responsive adjustments for peer checkboxes */
@media (max-width: 768px) {
    .peer-checkboxes-container {
        margin-top: 0.8rem;
        margin-bottom: 0.8rem;
        gap: 0.6rem;
    }
    
    .peer-checkbox-label {
        font-size: 0.85rem;
        padding: 0.4rem;
    }
    
    .checkmark {
        width: 16px;
        height: 16px;
        margin-right: 0.6rem;
    }
    
    .peer-checkbox-label input[type="checkbox"]:checked + .checkmark:after {
        left: 5px;
        top: 1px;
        width: 4px;
        height: 8px;
    }
}
