/**
 * BMI Calculator - Modern App-like UI
 * Standalone CSS (works with or without Tailwind)
 */

/* Container */
.bmi-calculator-tool {
    max-width: 42rem;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

/* Main Card */
.bmi-calculator-tool .bmi-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header */
.bmi-calculator-tool .bmi-header {
    background: linear-gradient(to right, #4f46e5, #7c3aed);
    padding: 1.5rem;
    color: white;
}

.bmi-calculator-tool .bmi-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
}

.bmi-calculator-tool .bmi-header p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

/* Body */
.bmi-calculator-tool .bmi-body {
    padding: 1.5rem;
}

/* Toggle Buttons */
.bmi-calculator-tool .toggle-container {
    display: flex;
    gap: 0.5rem;
    background: #f3f4f6;
    padding: 0.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.bmi-calculator-tool .toggle-btn {
    flex: 1;
    padding: 0.625rem 1rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}

.bmi-calculator-tool .toggle-btn.active {
    background: white;
    color: #4f46e5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.bmi-calculator-tool .toggle-btn:not(.active):hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Input Groups */
.bmi-calculator-tool .input-group {
    margin-bottom: 1rem;
}

.bmi-calculator-tool .input-wrapper {
    background: #f9fafb;
    border-radius: 0.5rem;
    padding: 1rem;
    border: 2px solid #e5e7eb;
}

.bmi-calculator-tool .input-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.bmi-calculator-tool .input-field-wrapper {
    position: relative;
}

.bmi-calculator-tool .input-field {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 3rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    background: white;
    border-radius: 0.5rem;
    border: 2px solid #e5e7eb;
    outline: none;
    transition: all 0.2s;
}

.bmi-calculator-tool .input-field::placeholder {
    color: #9ca3af;
    font-weight: 400;
    font-size: 0.875rem;
    opacity: 0.7;
}

.bmi-calculator-tool .input-field:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.bmi-calculator-tool .input-unit {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-weight: 600;
    font-size: 0.875rem;
    pointer-events: none;
}

/* Grid for Imperial Height */
.bmi-calculator-tool .input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Buttons */
.bmi-calculator-tool .button-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.bmi-calculator-tool .btn-primary {
    flex: 1;
    background: #4f46e5;
    color: white;
    padding: 0.875rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.bmi-calculator-tool .btn-primary:hover {
    background: #4338ca;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.bmi-calculator-tool .btn-secondary {
    padding: 0.875rem 1.25rem;
    background: white;
    border: 2px solid #e5e7eb;
    color: #374151;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.bmi-calculator-tool .btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

/* Results Section */
.bmi-calculator-tool .results-section {
    animation: fadeInUp 0.4s ease;
}

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

.bmi-calculator-tool .results-section.hidden {
    display: none;
}

/* BMI Display */
.bmi-calculator-tool .bmi-display {
    background: linear-gradient(to bottom right, #eef2ff, #f3e8ff);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 2px solid #e0e7ff;
    text-align: center;
}

.bmi-calculator-tool .bmi-value {
    font-size: 3.75rem;
    font-weight: 900;
    color: #111827;
    display: block;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.bmi-calculator-tool .bmi-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.5rem;
    display: block;
}

.bmi-calculator-tool .category-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: white;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 700;
    color: #374151;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 0.5rem;
}

/* BMI Scale */
.bmi-calculator-tool .scale-list {
    margin-bottom: 1.5rem;
}

.bmi-calculator-tool .scale-item {
    background: white;
    border-radius: 0.75rem;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    margin-bottom: 0.5rem;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bmi-calculator-tool .scale-item.scale-active {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bmi-calculator-tool .scale-item.underweight.scale-active {
    background: #dbeafe;
    border-color: #3b82f6;
}

.bmi-calculator-tool .scale-item.normal.scale-active {
    background: #d1fae5;
    border-color: #10b981;
}

.bmi-calculator-tool .scale-item.overweight.scale-active {
    background: #fef3c7;
    border-color: #f59e0b;
}

.bmi-calculator-tool .scale-item.obese.scale-active {
    background: #fee2e2;
    border-color: #ef4444;
}

.bmi-calculator-tool .scale-item-label {
    font-weight: 700;
    color: #1f2937;
    font-size: 0.875rem;
}

.bmi-calculator-tool .scale-item-range {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
}

/* Insights */
.bmi-calculator-tool .weight-insights {
    background: #eff6ff;
    border-radius: 0.75rem;
    padding: 1.25rem;
    border-left: 4px solid #4f46e5;
}

/* Hidden Class */
.bmi-calculator-tool .hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 640px) {
    .bmi-calculator-tool {
        padding: 1rem 0.75rem;
    }
    
    .bmi-calculator-tool .bmi-value {
        font-size: 3rem;
    }
    
    .bmi-calculator-tool .input-grid {
        grid-template-columns: 1fr;
    }
    
    .bmi-calculator-tool .btn-secondary span:last-child {
        display: none;
    }
}
