/* ==========================================================================
   DISTRIBUTION CALCULATOR STYLES
   Interactive Initial Distribution Calculator for Tokenomics Page
   ========================================================================== */

/* ===== MAIN CONTAINER ===== */

.distribution-calculator {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-card);
}

/* ===== GRID LAYOUT ===== */

.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: start;
}

@media (max-width: 900px) {
    .calculator-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== INPUT CARD ===== */

.input-card {
    background: var(--natural-linen);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
}

.input-card h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--warm-slate);
    margin-bottom: var(--space-lg);
}

/* ===== INPUT GROUPS ===== */

.calc-input-group {
    margin-bottom: var(--space-lg);
}

.calc-input-group:last-of-type {
    margin-bottom: 0;
}

.calc-input-group label {
    display: block;
    font-family: var(--font-accent);
    font-size: 0.85rem;
    color: var(--warm-slate-light);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* ===== SLIDER WITH VALUE ===== */

.slider-with-value {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.slider-with-value input[type="range"] {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, var(--warm-sand), var(--rich-teal));
    outline: none;
    -webkit-appearance: none;
}

.slider-with-value input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--rich-teal);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast);
}

.slider-with-value input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.slider-with-value input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--rich-teal);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: var(--shadow-sm);
}

.slider-value {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--rich-teal);
    min-width: 90px;
    text-align: right;
}

/* ===== FIXED VALUES DISPLAY ===== */

.calc-fixed-values {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--warm-sand);
}

.fixed-value-item {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
}

.fixed-label {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--warm-slate-light);
}

.fixed-value {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--warm-slate);
}

/* ===== CALCULATED RESULTS ===== */

.calculated-results {
    margin-top: var(--space-lg);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.result-item {
    background: white;
    border-radius: var(--radius-sm);
    padding: var(--space-md);
    text-align: center;
    border: 1px solid var(--warm-sand);
}

.result-label {
    display: block;
    font-family: var(--font-accent);
    font-size: 0.75rem;
    color: var(--warm-slate-light);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: var(--space-xs);
}

.result-value {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--rich-teal);
}

/* ===== DONUT CHART SECTION ===== */

.calculator-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.donut-container {
    width: 240px;
    height: 240px;
    position: relative;
}

.donut-chart {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg); /* Start segments from top (12 o'clock) */
}

.donut-bg {
    fill: none;
    stroke: var(--natural-linen);
    stroke-width: 15;
}

.donut-segment {
    fill: none;
    stroke-width: 15;
    stroke-linecap: butt;
    transition: stroke-dasharray 0.3s ease, stroke-dashoffset 0.3s ease;
}

.donut-members {
    stroke: var(--rich-teal);
}

.donut-investors {
    stroke: var(--paprika);
}

.donut-founder {
    stroke: var(--soft-lavender);
}

/* ===== LEGEND ===== */

.donut-legend {
    margin-top: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    width: 100%;
    max-width: 200px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-members .legend-dot {
    background: var(--rich-teal);
}

.legend-investors .legend-dot {
    background: var(--paprika);
}

.legend-founder .legend-dot {
    background: var(--soft-lavender);
}

.legend-label {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--warm-slate);
    flex: 1;
}

.legend-value {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--warm-slate);
}

/* ===== NOTE & WARNING BOXES ===== */

.calculator-note,
.calculator-warning {
    margin-top: var(--space-xl);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.calculator-note {
    background: rgba(42, 124, 124, 0.08);
    border-left: 4px solid var(--rich-teal);
}

.calculator-warning {
    background: rgba(212, 91, 58, 0.1);
    border-left: 4px solid var(--paprika);
}

.calculator-warning.hidden {
    display: none;
}

.calculator-note.hidden {
    display: none;
}

.note-icon,
.warning-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    line-height: 1;
}

.note-content p,
.warning-content p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--warm-slate);
}

.note-content strong,
.warning-content strong {
    color: var(--warm-slate);
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */

@media (max-width: 900px) {
    .distribution-calculator {
        padding: var(--space-xl);
    }
    
    .calculator-chart {
        order: -1; /* Show chart first on mobile */
        margin-bottom: var(--space-lg);
    }
    
    .donut-container {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .distribution-calculator {
        padding: var(--space-lg);
    }
    
    .calculated-results {
        grid-template-columns: 1fr;
    }
    
    .slider-with-value {
        flex-wrap: wrap;
    }
    
    .slider-with-value input[type="range"] {
        width: 100%;
        order: 2;
    }
    
    .slider-value {
        width: 100%;
        text-align: left;
        order: 1;
        margin-bottom: var(--space-xs);
    }
}

