/* --- Kaloriräknare Verktyg Stil --- */
.kaloriraknare-verktyg {
    background-color: #f9f9fb;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 20px;
    max-width: 600px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.kaloriraknare-verktyg h2 {
    text-align: center;
    color: #1a202c;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.75rem;
}

.kaloriraknare-verktyg .verktyg-intro {
    text-align: center;
    color: #555;
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.kaloriraknare-verktyg .input-group {
    display: flex;
    gap: 15px;
    width: 100%;
}

.kaloriraknare-verktyg .form-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    flex-grow: 1;
}

.kaloriraknare-verktyg label {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: #4a5568;
}

.kaloriraknare-verktyg input,
.kaloriraknare-verktyg select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    background-color: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.kaloriraknare-verktyg input:focus,
.kaloriraknare-verktyg select:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 2px rgba(49, 130, 206, 0.3);
}

.kaloriraknare-verktyg .form-field small {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
}

.kaloriraknare-verktyg .calculate-btn {
    width: 100%;
    padding: 12px;
    background-color: #2c5282;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.kaloriraknare-verktyg .calculate-btn:hover {
    background-color: #2a4365;
}

.hidden {
    display: none !important;
}

#result-container {
    margin-top: 25px;
    padding: 20px;
    border: 1px solid #bee3f8;
    background-color: #ebf8ff;
    border-radius: 8px;
}

.result-summary, .goal-result {
    text-align: center;
    margin-bottom: 20px;
}

.result-summary h3 {
    margin: 0 0 10px 0;
    color: #2c5282;
}

.maintenance-calories, .target-calories {
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 8px;
    color: #2c5282;
}

.maintenance-calories span:first-child {
    font-size: 2rem;
}
.target-calories span:first-child {
    font-size: 2.8rem;
    color: #2b6cb0;
}

.goal-result {
    padding: 15px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

#goal-text {
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 5px;
    color: #4a5568;
}

.disclaimer {
    font-size: 0.8rem;
    color: #718096;
    margin-top: 10px;
    margin-bottom: 0;
}

/* --- Macros Section --- */
.macros-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px dashed #a0aec0;
}

.macros-section h4, .result-info h4 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c5282;
}

.macros-options {
    text-align: center;
    margin-bottom: 20px;
}
.macros-options label {
    margin-right: 8px;
}
.macros-options select {
    padding: 4px 8px;
    border-radius: 4px;
    width: auto;
    font-size: 0.9rem;
}


.macros-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.macro-bar .bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 0.9rem;
    font-weight: 500;
}

.macro-bar .bar {
    width: 100%;
    height: 20px;
    background-color: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.macro-bar .bar-inner {
    height: 100%;
    width: 0%; /* Set by JS */
    border-radius: 10px;
    transition: width 0.5s ease-in-out;
}

.protein .bar-inner { background-color: #ef4444; }
.carbs .bar-inner { background-color: #3b82f6; }
.fat .bar-inner { background-color: #eab308; }

.result-info {
    margin-top: 25px;
    font-size: 0.85rem;
    line-height: 1.5;
    background-color: #f7fafc;
    padding: 15px;
    border-radius: 6px;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}
.result-info h4 {
    margin-bottom: 10px;
}

/* --- Responsive Design --- */
@media (max-width: 480px) {
    .kaloriraknare-verktyg .input-group {
        flex-direction: column;
        gap: 0;
    }
     .kaloriraknare-verktyg h2 {
        font-size: 1.5rem;
    }
    .maintenance-calories span:first-child {
        font-size: 1.8rem;
    }
    .target-calories span:first-child {
        font-size: 2.4rem;
    }
}