/* BMI Calculator Styles - WordPress Compatible */
/* Reset and scope all styles to prevent theme conflicts */

.bmi-calc-container,
.bmi-calc-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Override WordPress theme styles */
.bmi-calc-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif !important;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.calc-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px 0;
}

.calculator-card {
    background: linear-gradient(180deg, #e8e4f3 0%, #f9f8fc 50%);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(116, 79, 168, 0.15);
    transition: all 0.3s ease;
}

/* Typography overrides */
.bmi-calc-container h1,
.calculator-card h1 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif !important;
    font-size: 2em !important;
    text-align: left !important;
    color: #160647 !important;
    margin-bottom: 12px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.5px;
}

.calculator-card .subtitle,
.bmi-calc-container .subtitle {
    color: #160647 !important;
    font-size: 0.875em !important;
    margin-bottom: 30px !important;
    line-height: 1.5 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif !important;
    font-weight: 400 !important;
}

.form-group {
    margin-bottom: 30px;
}

.form-label {
    display: block;
    font-size: 1em !important;
    color: #160647 !important;
    font-weight: 500 !important;
    margin-bottom: 15px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif !important;
}

.input-group {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.input-wrapper {
    flex: 1;
    position: relative;
    background: white;
    border-radius: 8px;
    border: 2px solid #e0dae8;
    transition: all 0.3s ease;
}

.input-wrapper:focus-within {
    border-color: #491492;
    box-shadow: 0 0 0 3px rgba(139, 123, 168, 0.1);
}

.input-wrapper.full-width {
    flex: 1;
}

.form-input {
    width: 100%;
    padding: 14px 80px 14px 14px !important;
    border: none !important;
    background: transparent !important;
    font-size: 0.9375em !important;
    color: #333 !important;
    outline: none !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif !important;
    font-weight: 400 !important;
}

.form-input::placeholder {
    color: #999 !important;
    font-size: 0.9375em;
}

.input-unit {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666 !important;
    font-size: 0.875em !important;
    pointer-events: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif !important;
}

.switch-btn {
    background: transparent !important;
    border: none !important;
    color: #6b5b95 !important;
    font-size: 0.875em !important;
    cursor: pointer;
    padding: 8px 0 !important;
    text-decoration: underline !important;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif !important;
    font-weight: 400 !important;
}

.switch-btn:hover {
    color: #160647 !important;
    text-decoration-color: #160647 !important;
}

.calculate-btn {
    width: 100%;
    padding: 16px !important;
    background: linear-gradient(135deg, #491492 0%, #6b5b95 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 50px !important;
    font-size: 1em !important;
    font-weight: 500 !important;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(107, 91, 149, 0.3);
    margin-top: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif !important;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 91, 149, 0.4);
}

.calculate-btn:active {
    transform: translateY(0);
}

/* Results Section */
.results-section {
    margin-top: 30px;
    animation: fadeIn 0.5s ease;
}

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

.results-card {
    background: white;
    border-radius: 15px;
    padding: 35px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.bmi-label {
    color: #666 !important;
    font-size: 0.875em !important;
    margin-bottom: 10px !important;
    font-weight: 400; !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif !important;
}

.bmi-category {
    text-transform: capitalize !important;
    font-size: 35px !important;
    color: #160647 !important;
    margin-bottom: 15px !important;
    font-weight: 500 !important;
    text-transform: lowercase;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif !important;
}

#bmiCategory {
    font-weight: 500 !important;
}

#bmiValue {
    font-weight: 300 !important;
    margin-left: 10px;
}

.bmi-info {
    color: #160647 !important;
    font-size: 14px !important;
    font-weight: 400; !important;
    line-height: 1.6;
    margin-bottom: 25px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif !important;
}

/* BMI Scale */
.bmi-scale {
    position: relative;
    margin: 30px 0;
}

.scale-bar {
    display: flex;
    height: 16px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.scale-segment {
    flex: 1;
    transition: all 0.3s ease;
}

.scale-segment.underweight {
    background: linear-gradient(90deg, #7ec8e3 0%, #a2d5e8 100%);
}

.scale-segment.normal {
    background: linear-gradient(90deg, #a8d5a5 0%, #c4e5c1 100%);
}

.scale-segment.overweight {
    background: linear-gradient(90deg, #f4c47c 0%, #f8d69b 100%);
}

.scale-segment.obese-mild {
    background: linear-gradient(90deg, #f19e8e 0%, #f5b5a9 100%);
}

.scale-segment.obese-severe {
    background: linear-gradient(90deg, #ea6b6b 0%, #f08a8a 100%);
}

.scale-indicator {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: white;
    border: 3px solid #6b5b95;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.disclaimer {
    color: #666 !important;
    font-size: 0.875em !important;
    font-style: italic;
    font-weight: 400; !important;
    line-height: 1.5;
    margin-bottom: 25px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif !important;
}

/* Weight Loss Result */
.weight-loss-result {
    background: linear-gradient(135deg, #CCB8EB 0%, #f0ebf8 100%);
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
    text-align: center;
}

.weight-loss-result h3 {
    color: #160647 !important;
    font-size: 1.1875em !important;
    font-weight: 400 !important;
    margin-bottom: 20px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif !important;
}

.loss-amount {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.arrow-down {
    color: #6b5b95;
    font-size: 1.5em;
}

.loss-number {
    font-size: 3em !important;
    font-weight: 300 !important;
    color: #160647 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif !important;
}

.loss-unit {
    font-size: 1.1875em !important;
    color: #160647 !important;
    font-weight: 400 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif !important;
}

.loss-percentage {
    color: #160647 !important;
    padding: 8px 16px !important;
    font-size: 1em !important;
    font-weight: 500 !important;
    margin-left: 15px !important;
    background: linear-gradient(135deg, #d4c5e8 0%, #e8dffa 100%) !important;
    border-radius: 50px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif !important;
}

/* Eligibility Button */
.eligibility-btn {
    width: 100%;
    padding: 16px !important;
    background: #2d2d2d !important;
    color: white !important;
    border: none !important;
    border-radius: 50px !important;
    font-size: 1em !important;
    font-weight: 500 !important;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-top: 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif !important;
}

.eligibility-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: #1a1a1a !important;
}

.eligibility-btn:active {
    transform: translateY(0);
}

/* Error Styling */
.input-wrapper.error {
    border-color: #ea6b6b;
    animation: shake 0.3s ease;
}

.input-wrapper.warning {
    border-color: #f4c47c;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Error Messages */
.error-message {
    display: none;
    padding: 8px 12px;
    margin-top: 8px;
    border-radius: 0 0 6px 6px;
    font-size: 0.875em;
    line-height: 1.4;
}

.error-message.error {
    background-color: #ffebee;
    color: #c62828;
    border-left: 3px solid #ea6b6b;
}

.error-message.warning {
    background-color: #fff8e1;
    color: #f57f17;
    border-left: 3px solid #f4c47c;
}

/* Validation Summary */
.validation-summary {
    background: #ffebee;
    border: 2px solid #ea6b6b;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    animation: slideDown 0.3s ease;
}

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

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 16px !important;
    color: #c62828;
    font-weight: 500;
}

.error-count {
    background: #ea6b6b;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.875em;
}

.error-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.error-item, .warning-item {
    padding: 8px 0;
    border-top: 1px solid rgba(234, 107, 107, 0.2);
}

.error-item:first-child, .warning-item:first-child {
    border-top: none;
}

.error-link {
    color: #c62828;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-size: 16px;
    gap: 8px;
    transition: all 0.2s ease;
}

.error-link:hover {
    color: #b71c1c;
    text-decoration: underline;
}

.warning-item .error-link {
    color: #f57f17;
}

.warning-item .error-link:hover {
    color: #e65100;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-card {
        padding: 25px !important;
    }

    .bmi-calc-container h1,
    .calculator-card h1 {
        font-size: 1.625em !important;
    }

    .input-group {
        flex-direction: column;
        gap: 10px;
    }

    .loss-number {
        font-size: 2.1875em !important;
    }
    
    .bmi-category {
        font-size: 1.8125em !important;
    }
}

@media (max-width: 480px) {
    .calculator-card {
        padding: 20px !important;
        border-radius: 15px;
    }
    
    .bmi-calc-container h1,
    .calculator-card h1 {
        font-size: 1.375em !important;
    }
    
    .form-label {
        font-size: 0.9375em !important;
    }
    
    .calculate-btn {
        padding: 14px !important;
        font-size: 0.9375em !important;
    }
}    .loss-amount {
        /* flex-direction: column; */
        gap: 5px;
    }
}

/* Smooth Transitions */
.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-up {
    animation: slideUp 0.5s ease;
}

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