/* Модальное окно калькулятора */
.milk-calculator-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.milk-calculator-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.milk-calculator-container {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 1200px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 2;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.milk-calculator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
    border-radius: 8px 8px 0 0;
}

.milk-calculator-header h3 {
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #333;
}

.milk-calculator-body {
    padding: 30px;
}

.result-value {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 5px;
}

/* Адаптивность */
@media (max-width: 992px) {
    .milk-calculator-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .milk-calculator-header {
        padding: 15px 20px;
    }
    
    .milk-calculator-header h3 {
        font-size: 1.25rem;
    }
    
    .milk-calculator-body {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .milk-calculator-container {
        width: 98%;
        max-height: 98vh;
        border-radius: 4px;
    }
    
    .milk-calculator-header {
        padding: 12px 15px;
    }
    
    .milk-calculator-header h3 {
        font-size: 1.1rem;
    }
    
    .milk-calculator-body {
        padding: 15px;
    }
    
    .calculator-description {
        font-size: 0.9rem;
    }
    
    .result-value {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .milk-calculator-header h3 {
        font-size: 1rem;
    }
    
    .close-btn {
        font-size: 1.5rem;
        width: 25px;
        height: 25px;
    }
    
    .calculator-description ol {
        padding-left: 1rem;
    }
    
    .calculator-description li {
        font-size: 0.85rem;
    }
}

/* Скрытие скроллбара для webkit браузеров */
.milk-calculator-container::-webkit-scrollbar {
    width: 8px;
}

.milk-calculator-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.milk-calculator-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.milk-calculator-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}