/* BMI Calculator with BMR - Modern Styles */

.bmi-bmr-calculator-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 25px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    color: #333;
    position: relative;
    overflow: hidden;
}

.bmi-bmr-calculator-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    z-index: 1;
}

.bmi-bmr-calculator-container > * {
    position: relative;
    z-index: 2;
}

/* Header */
.bmi-bmr-calculator-header {
    text-align: center;
    margin-bottom: 35px;
}

.bmi-bmr-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 10px 0;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bmi-bmr-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin: 0 0 8px 0;
    line-height: 1.5;
}

.bmi-bmr-secondary-note {
    font-size: 1rem;
    color: #888;
    margin: 0;
    font-style: italic;
}

/* Form Styles */
.bmi-bmr-calculator-form {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.bmi-bmr-form-grid {
    display: grid;
    gap: 25px;
    margin-bottom: 30px;
}

.bmi-bmr-form-group {
    display: flex;
    flex-direction: column;
}

.bmi-bmr-label {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.bmi-bmr-label-icon {
    margin-right: 10px;
    font-size: 1.3rem;
}

.bmi-bmr-unit-display {
    color: #666;
    font-weight: 400;
    font-size: 0.95rem;
    margin-left: 5px;
}

.bmi-bmr-secondary-label {
    color: #888;
    font-weight: 400;
    font-size: 0.85rem;
    margin-left: 5px;
}

/* Unit Selector */
.bmi-bmr-unit-selector {
    grid-column: 1 / -1;
}

.bmi-bmr-unit-buttons {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.bmi-bmr-unit-btn {
    flex: 1;
    padding: 15px 25px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    text-align: center;
    font-size: 1rem;
}

.bmi-bmr-unit-btn:hover {
    border-color: var(--bmi-bmr-theme-color, #4f46e5);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.bmi-bmr-unit-btn.active {
    background: var(--bmi-bmr-theme-color, #4f46e5);
    color: white;
    border-color: var(--bmi-bmr-theme-color, #4f46e5);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.bmi-bmr-unit-desc {
    display: block;
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 3px;
}

/* Input Styles */
.bmi-bmr-input, .bmi-bmr-select {
    padding: 16px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: white;
    width: 100%;
    box-sizing: border-box;
}

.bmi-bmr-input:focus, .bmi-bmr-select:focus {
    outline: none;
    border-color: var(--bmi-bmr-theme-color, #4f46e5);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    transform: translateY(-2px);
}

.bmi-bmr-input-help {
    margin-top: 6px;
}

.bmi-bmr-help-text {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

/* BMR Fields Styling */
.bmi-bmr-bmr-field {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.bmi-bmr-bmr-field:hover {
    opacity: 1;
}

/* Calculate Button */
.bmi-bmr-calculate-btn {
    width: 100%;
    padding: 20px 35px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bmi-bmr-calculate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(79, 70, 229, 0.4);
}

.bmi-bmr-calculate-btn:active {
    transform: translateY(-1px);
}

.bmi-bmr-btn-icon {
    font-size: 1.4rem;
}

/* Error Message */
.bmi-bmr-error-message {
    background: #fee;
    color: #c33;
    padding: 16px;
    border-radius: 10px;
    margin-top: 20px;
    border-left: 4px solid #c33;
    font-weight: 500;
}

/* Results Section */
.bmi-bmr-results {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    animation: slideInUp 0.6s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bmi-bmr-results-header h3 {
    margin: 0 0 25px 0;
    font-size: 1.8rem;
    color: #333;
    text-align: center;
    font-weight: 700;
}

/* Primary BMI Results */
.bmi-bmr-primary-results {
    margin-bottom: 30px;
}

.bmi-bmr-bmi-card {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 15px 30px rgba(79, 70, 229, 0.3);
    margin-bottom: 20px;
}

.bmi-bmr-bmi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.bmi-bmr-bmi-header h4 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.bmi-bmr-primary-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bmi-bmr-bmi-display {
    margin-bottom: 25px;
}

.bmi-bmr-bmi-value {
    margin-bottom: 15px;
}

.bmi-bmr-bmi-value span:first-child {
    display: block;
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bmi-bmr-bmi-unit {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-top: 5px;
    display: block;
}

.bmi-bmr-category-badge {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.bmi-bmr-chart-container {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.bmi-bmr-bmi-interpretation p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.5;
    opacity: 0.95;
}

/* Healthy Weight Range Card */
.bmi-bmr-weight-range-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    border: 2px solid #e9ecef;
}

.bmi-bmr-weight-range-card h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.3rem;
}

.bmi-bmr-weight-range {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--bmi-bmr-theme-color, #4f46e5);
    margin-bottom: 10px;
}

.bmi-bmr-weight-range-note {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
}

/* Secondary BMR Results */
.bmi-bmr-secondary-results {
    margin-bottom: 25px;
    border-top: 2px solid #f0f0f0;
    padding-top: 25px;
}

.bmi-bmr-secondary-results h4 {
    margin: 0 0 20px 0;
    color: #555;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bmi-bmr-secondary-badge {
    background: #f59e0b;
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Collapsible BMR Section */
.bmi-bmr-collapsible .bmi-bmr-section-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.bmi-bmr-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.bmi-bmr-toggle-btn:hover {
    background: #f0f0f0;
}

.bmi-bmr-toggle-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.bmi-bmr-collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.bmi-bmr-collapsible.expanded .bmi-bmr-collapsible-content {
    max-height: 500px;
}

.bmi-bmr-collapsible.expanded .bmi-bmr-toggle-icon {
    transform: rotate(180deg);
}

/* BMR Grid */
.bmi-bmr-bmr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.bmi-bmr-bmr-card, .bmi-bmr-tdee-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.bmi-bmr-bmr-card:hover, .bmi-bmr-tdee-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--bmi-bmr-theme-color, #4f46e5);
}

.bmi-bmr-bmr-header, .bmi-bmr-tdee-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    gap: 10px;
}

.bmi-bmr-bmr-icon, .bmi-bmr-tdee-icon {
    font-size: 1.5rem;
}

.bmi-bmr-bmr-title, .bmi-bmr-tdee-title {
    font-weight: 700;
    color: #333;
    font-size: 1.2rem;
}

.bmi-bmr-bmr-value, .bmi-bmr-tdee-value {
    margin-bottom: 10px;
}

.bmi-bmr-bmr-value span:first-child, .bmi-bmr-tdee-value span:first-child {
    display: block;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--bmi-bmr-theme-color, #4f46e5);
}

.bmi-bmr-bmr-unit, .bmi-bmr-tdee-unit {
    font-size: 1rem;
    color: #666;
    font-weight: 400;
}

.bmi-bmr-bmr-description, .bmi-bmr-tdee-description {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* Recommendations */
.bmi-bmr-recommendations {
    margin-bottom: 25px;
}

.bmi-bmr-recommendations h4 {
    margin: 0 0 20px 0;
    font-size: 1.4rem;
    color: #333;
}

.bmi-bmr-recommendation-item {
    background: #f8f9fa;
    border-left: 4px solid var(--bmi-bmr-theme-color, #4f46e5);
    padding: 18px 25px;
    margin-bottom: 12px;
    border-radius: 0 10px 10px 0;
    transition: all 0.3s ease;
}

.bmi-bmr-recommendation-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.bmi-bmr-recommendation-item.weight_gain {
    border-left-color: #3b82f6;
    background: #eff6ff;
}

.bmi-bmr-recommendation-item.weight_loss {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.bmi-bmr-recommendation-item.maintenance {
    border-left-color: #10b981;
    background: #f0fdf4;
}

.bmi-bmr-recommendation-item.exercise {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.bmi-bmr-recommendation-item.nutrition {
    border-left-color: #8b5cf6;
    background: #faf5ff;
}

.bmi-bmr-recommendation-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.bmi-bmr-recommendation-text {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* Disclaimer */
.bmi-bmr-disclaimer {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 10px;
    padding: 18px;
    margin-top: 25px;
}

.bmi-bmr-disclaimer p {
    margin: 0;
    color: #856404;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Loading */
.bmi-bmr-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.bmi-bmr-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--bmi-bmr-theme-color, #4f46e5);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .bmi-bmr-calculator-container {
        margin: 10px;
        padding: 20px;
        border-radius: 20px;
    }
    
    .bmi-bmr-title {
        font-size: 2rem;
    }
    
    .bmi-bmr-subtitle {
        font-size: 1.1rem;
    }
    
    .bmi-bmr-calculator-form,
    .bmi-bmr-results {
        padding: 25px;
    }
    
    .bmi-bmr-unit-buttons {
        flex-direction: column;
    }
    
    .bmi-bmr-bmr-grid {
        grid-template-columns: 1fr;
    }
    
    .bmi-bmr-bmi-value span:first-child {
        font-size: 3rem;
    }
    
    .bmi-bmr-bmi-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .bmi-bmr-calculator-container {
        margin: 5px;
        padding: 15px;
    }
    
    .bmi-bmr-calculator-form,
    .bmi-bmr-results {
        padding: 20px;
    }
    
    .bmi-bmr-title {
        font-size: 1.8rem;
    }
    
    .bmi-bmr-input, .bmi-bmr-select {
        padding: 14px 18px;
        font-size: 1rem;
    }
    
    .bmi-bmr-calculate-btn {
        padding: 18px 30px;
        font-size: 1.2rem;
    }
    
    .bmi-bmr-bmi-value span:first-child {
        font-size: 2.5rem;
    }
}

/* Theme Color Support */
.bmi-bmr-calculator-container[data-theme-color] {
    --bmi-bmr-theme-color: attr(data-theme-color);
}

