/* Контейнер */
.bmc-container {
    width: 100%;
    max-width: 100%;
    background: #f5f5f5;
    border-radius: 10px;
    padding: 20px;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* Группы ввода */
.bmc-input-group {
    margin-bottom: 20px;
}

.bmc-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

/* Поля ввода */
.bmc-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-align: center;
    background: white;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.bmc-input:focus {
    border-color: #4CAF50;
    outline: none;
}

/* Кнопки пресетов */
.bmc-preset-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.bmc-preset-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.bmc-preset-btn:hover {
    background: #f0f0f0;
}

.bmc-preset-btn:active {
    background: #e0e0e0;
}

/* Основная кнопка */
.bmc-btn {
    width: 100%;
    padding: 15px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 20px;
}

.bmc-btn:hover {
    background: #45a049;
}

.bmc-btn:active {
    transform: translateY(1px);
}

/* Результат */
.bmc-result {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    border-left: 4px solid #4CAF50;
}

.bmc-result h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.bmc-result p {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: bold;
}

/* Шкала категорий */
#bmc-category-bar {
    position: relative;
    height: 30px;
    background: linear-gradient(90deg, 
        #2196F3 0%, 
        #2196F3 18.5%, 
        #4CAF50 18.5%, 
        #4CAF50 50%, 
        #FFC107 50%, 
        #FFC107 75%, 
        #F44336 75%, 
        #F44336 100%);
    border-radius: 15px;
    margin: 20px 0;
    overflow: hidden;
}

.bmc-category-segment {
    position: absolute;
    height: 100%;
    cursor: help;
}

.bmc-underweight { left: 0%; width: 18.5%; }
.bmc-normal { left: 18.5%; width: 31.5%; }
.bmc-overweight { left: 50%; width: 25%; }
.bmc-obese { left: 75%; width: 25%; }

#bmc-indicator {
    position: absolute;
    top: -5px;
    width: 3px;
    height: 40px;
    background: #333;
    transform: translateX(-50%);
    transition: left 0.5s ease;
    z-index: 2;
}

/* Блок поделиться */
.bmc-share-section {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.bmc-share-section h4 {
    margin: 0 0 15px 0;
    color: #333;
}

.bmc-share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Кнопки поделиться */
.bmc-share-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    color: white;
    transition: all 0.3s;
}

.bmc-share-btn:hover {
    transform: scale(1.1);
}

.bmc-share-btn:active {
    transform: scale(0.95);
}

.bmc-vk { background: #4C75A3; }
.bmc-tg { background: #0088cc; }
.bmc-wa { background: #25D366; }
.bmc-copy { background: #666; }

/* Уведомления */
.bmc-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100001;
    background: #4CAF50;
    color: white;
    padding: 25px 35px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Адаптивность */

/* Tablet */
@media (max-width: 768px) {
    .bmc-container {
        padding: 15px;
    }
    
    .bmc-preset-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bmc-share-buttons {
        gap: 10px;
    }
    
    .bmc-share-btn {
        width: 50px;
        height: 50px;
        font-size: 16px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .bmc-container {
        padding: 10px;
    }
    
    .bmc-input {
        padding: 10px;
        font-size: 16px; /* Предотвращает масштабирование на iOS */
    }
    
    .bmc-btn {
        padding: 12px;
    }
    
    .bmc-preset-buttons {
        grid-template-columns: 1fr;
    }
    
    .bmc-share-buttons {
        flex-wrap: wrap;
    }
    
    .bmc-notification {
        padding: 20px 25px;
        font-size: 16px;
    }
}

/* Small Mobile */
@media (max-width: 360px) {
    .bmc-container {
        padding: 8px;
    }
    
    .bmc-share-btn {
        width: 45px;
        height: 45px;
        font-size: 14px;
    }
}

/* Предотвращение масштабирования на мобильных устройствах */
.bmc-input {
    font-size: 16px !important;
}