/* Rustic Reverie Soap Calculator Styles - v4.0.1 FINAL */

/* --- Base & Fonts --- */
.soap-calculator-container { max-width: 800px; margin: 20px auto; padding: 20px; font-family: Georgia, 'Times New Roman', Times, serif; background: #fdfbf7; color: #4a443d; border: 1px solid #e0dcd5; border-radius: 8px; box-shadow: 0 5px 25px rgba(0,0,0,0.07); }

/* --- Header --- */
.calculator-header { text-align: center; margin-bottom: 30px; padding: 20px 0; border-bottom: 2px solid #d4c8be; }
.calculator-header h2 { margin: 0 0 10px 0; font-size: 2.5em; color: #4a443d; }
.calculator-header p { margin: 0; font-size: 1.1em; color: #6e6658; font-style: italic; }

/* --- Instructions & Tooltips --- */
.process-guide { background: #fff; border: 1px solid #e0dcd5; border-radius: 6px; padding: 25px; margin-bottom: 30px; }
.process-guide h3 { text-align: center; margin: 0 0 20px 0; font-size: 1.6em; }

/* --- Base & Fonts --- */
.soap-calculator-container { max-width: 800px; margin: 20px auto; padding: 20px; font-family: Georgia, 'Times New Roman', Times, serif; background: #fdfbf7; color: #4a443d; border: 1px solid #e0dcd5; border-radius: 8px; box-shadow: 0 5px 25px rgba(0,0,0,0.07); }

/* --- Header --- */
.calculator-header { text-align: center; margin-bottom: 30px; padding: 20px 0; border-bottom: 2px solid #d4c8be; }
.calculator-header h2 { margin: 0 0 10px 0; font-size: 2.5em; color: #4a443d; }
.calculator-header p { margin: 0; font-size: 1.1em; color: #6e6658; font-style: italic; }

/* --- Instructions & Tooltips --- */
.process-guide { background: #fff; border: 1px solid #e0dcd5; border-radius: 6px; padding: 25px; margin-bottom: 30px; }
.form-row label { display: flex; align-items: center; gap: 8px; }
.help-icon { width: 18px; height: 18px; background: #d4c8be; color: #fff; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: bold; cursor: help; position: relative; }
.rr-tooltip { position: fixed; background: #4a443d; color: #fff; padding: 10px 15px; border-radius: 4px; font-size: 13px; line-height: 1.5; font-family: sans-serif; text-align: center; max-width: 280px; z-index: 9999; box-shadow: 0 2px 5px rgba(0,0,0,0.2); opacity: 0; transition: opacity 0.2s ease-in-out; pointer-events: none; }

/* --- Form Sections --- */
.form-section { margin-bottom: 25px; padding: 25px; background: #fff; border: 1px solid #e0dcd5; border-radius: 6px; }
.form-section h3 { margin: 0 0 20px 0; color: #4a443d; font-size: 1.6em; border-bottom: 1px solid #e0dcd5; padding-bottom: 10px; }
.form-row { margin-bottom: 18px; }
.form-row input[type="number"], .form-row select { width: 100%; padding: 12px; border: 1px solid #d4c8be; border-radius: 4px; font-size: 1em; font-family: Georgia, serif; background: #fdfbf7; color: #4a443d; box-shadow: inset 0 1px 3px rgba(0,0,0,0.05); transition: all 0.2s ease-in-out; }
.form-row input:focus, .form-row select:focus { outline: none; border-color: #8a9a5b; box-shadow: 0 0 0 3px rgba(138, 154, 91, 0.2); }
.form-row-flex { display: flex; gap: 20px; align-items: flex-end; }
.flex-item { flex: 1; }
.toggle-switch { display: flex; border-radius: 6px; overflow: hidden; border: 1px solid #d4c8be; }
.toggle-switch input[type="radio"] { display: none; }
.toggle-switch label { flex: 1; text-align: center; padding: 10px; font-size: 0.9em; cursor: pointer; background: #fdfbf7; color: #6e6658; margin: 0 !important; font-weight: normal; transition: all 0.2s ease-in-out; }
.toggle-switch input[type="radio"]:checked + label { background: #8a9a5b; color: #fff; box-shadow: inset 0 1px 4px rgba(0,0,0,0.1); }
.oil-input, .additive-input { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
/* Align oil rows with fixed columns */
.oil-input { display: grid; grid-template-columns: 1fr 80px 28px; column-gap: 10px; align-items: center; }

/* NEW Style for the static ingredient name display */
.ingredient-name-display {
    flex: 1;
    padding: 12px 8px;
    font-weight: 500;
    color: #4a443d;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.oil-input .oil-percentage { width: 80px; text-align: right; justify-self: end; }
.oil-input .remove-oil, .additive-input .remove-additive { background: #b46a55; color: white; border: none; border-radius: 50%; width: 28px; height: 28px; font-size: 18px; line-height: 28px; cursor: pointer; font-weight: bold; transition: background 0.2s; flex-shrink: 0; }
.oil-input .remove-oil:hover, .additive-input .remove-additive:hover { background: #9d5947; }
.form-actions { display: flex; flex-direction: column; gap: 10px; }
.select-ingredients-btn, #add-oil, .calculate-button, .save-button { background: #8a9a5b; color: white; border: none; padding: 12px 20px; border-radius: 4px; cursor: pointer; font-size: 1em; font-weight: bold; font-family: Georgia, serif; transition: all 0.2s ease; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.select-ingredients-btn { background: #fdfbf7; color: #4a443d; border: 1px solid #d4c8be; width: auto; display: inline-block; }
#add-oil:hover, .calculate-button:hover, .save-button:hover, .select-ingredients-btn:hover { background: #74824b; color: #fff; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.select-ingredients-btn:hover { background: #f4f0e9; color: #4a443d; }
.calculate-button { width: 100%; padding: 15px; font-size: 1.2em; }
.save-button { width: 100%; padding: 12px; background-color: #6e6658; }
.save-button:disabled { background-color: #c8c3bc; cursor: not-allowed; transform: none; box-shadow: none; }

/* --- Recipe Management --- */
.recipe-management-section { margin-bottom: 30px !important; }
.login-prompt a { color: #8a9a5b; font-weight: bold; text-decoration: none; }
.login-prompt a:hover { text-decoration: underline; }
#recipe-list { list-style: none; padding: 0; margin: 0; }
#recipe-list li { display: flex; justify-content: space-between; align-items: center; padding: 12px; border-bottom: 1px solid #e0dcd5; }
#recipe-list li:last-child { border-bottom: none; }
#recipe-list li.no-recipes { color: #9d8770; font-style: italic; }
a.load-recipe-link { font-weight: bold; text-decoration: none; color: #4a443d; }
a.load-recipe-link:hover { color: #8a9a5b; }
button.delete-recipe-btn { background: #b46a55; color: white; border: none; border-radius: 50%; width: 24px; height: 24px; font-size: 16px; line-height: 24px; cursor: pointer; transition: background 0.2s; }
button.delete-recipe-btn:hover { background: #9d5947; }

/* --- Additives Section Styles --- */
.section-description { font-size: 0.9em; color: #6e6658; margin: -10px 0 20px 0; font-style: italic; }
#additives-breakdown h5 { font-size: 1.2em; color: #4a443d; margin: 20px 0 10px 0; padding-top: 20px; border-top: 1px solid #e0dcd5; }
.breakdown-list .breakdown-item { display: flex; justify-content: space-between; padding: 8px; background: #fdfbf7; border-radius: 4px; margin-bottom: 5px; }

/* --- Slide-out Panel Styles --- */
.panel-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); z-index: 1000; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
.panel-overlay.is-open { opacity: 1; visibility: visible; }
.ingredient-panel { position: fixed; top: 0; right: 0; width: 100%; max-width: 420px; height: 100%; background: #fff; box-shadow: -5px 0 25px rgba(0,0,0,0.2); z-index: 1001; display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1); }
.ingredient-panel.is-open { transform: translateX(0); }
.panel-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-bottom: 1px solid #e0dcd5; background: #fdfbf7; flex-shrink: 0; }
.panel-header h3 { margin: 0; font-size: 1.4em; }
.panel-close-btn { background: transparent; border: none; font-size: 2.5em; line-height: 1; padding: 0; margin: 0; cursor: pointer; color: #9d8770; transition: color 0.2s; }
.panel-close-btn:hover { color: #4a443d; }
.panel-search { padding: 15px; border-bottom: 1px solid #e0dcd5; flex-shrink: 0; background: #fdfbf7; }
#ingredient-search { width: 100%; padding: 12px 15px; border: 1px solid #d4c8be; border-radius: 4px; font-size: 1em; font-family: Georgia, serif; box-sizing: border-box; }
.ingredient-list-all { overflow-y: auto; flex-grow: 1; padding: 10px 0; background: #fff; }
.ingredient-list-item { display: flex; align-items: center; gap: 15px; padding: 12px 20px; border-bottom: 1px dashed #e0dcd5; }
.ingredient-list-item:last-child { border-bottom: none; }
.ingredient-list-item.hidden { display: none; }
.ingredient-image { width: 45px; height: 45px; border-radius: 50%; object-fit: cover; border: 2px solid #e0dcd5; flex-shrink: 0; }
.ingredient-name { font-weight: bold; flex-grow: 1; }
.add-ingredient-btn { background-color: #fdfbf7; border: 1px solid #8a9a5b; color: #8a9a5b; font-weight: bold; border-radius: 4px; padding: 6px 12px; font-size: 0.8em; cursor: pointer; transition: all 0.2s; }
.add-ingredient-btn:hover { background-color: #8a9a5b; color: #fff; }
.add-ingredient-btn.is-added { background-color: #b46a55; border-color: #b46a55; color: #fff; }
.panel-footer { padding: 15px; border-top: 1px solid #e0dcd5; background: #fdfbf7; box-shadow: 0 -2px 10px rgba(0,0,0,0.05); flex-shrink: 0; }
.panel-footer #panel-done-btn { width: 100%; padding: 15px; font-size: 1.1em; }

/* --- Results Section --- */
.calculator-results { margin-top: 30px; padding: 25px; background: #fff; border: 1px solid #e0dcd5; border-radius: 6px; }
.results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.results-header h4, #results .results-section h4, #results .oil-breakdown h4 { margin: 40px 0 20px 0; font-size: 1.6em; color: #4a443d; }
.results-section:first-of-type h4 { margin-top: 10px; }
.print-button { background: #fdfbf7; color: #4a443d; border: 1px solid #d4c8be; padding: 8px 16px; border-radius: 4px; cursor: pointer; font-weight: bold; font-family: Georgia, serif; transition: all 0.2s ease; }
.print-button:hover { background: #f4f0e9; }
.results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 15px; }
.result-item { background: #fdfbf7; padding: 15px; border-radius: 4px; text-align: center; border: 1px solid #e0dcd5; }
.result-label { display: block; font-size: 0.9em; color: #6e6658; margin-bottom: 5px; }
.result-value { display: block; font-size: 1.8em; font-weight: bold; color: #4a443d; font-family: Consolas, 'Courier New', monospace; }
.results-section, .oil-breakdown { margin-bottom: 25px; }
.soap-properties, .fatty-acids { display: grid; gap: 15px; }
.property-bar { width: 100%; height: 10px; background: #f4f0e9; border-radius: 5px; overflow: hidden; border: 1px solid #e0dcd5; }
.property-fill { height: 100%; transition: width 0.8s ease; }
.property-fill.hardness { background: #b46a55; }
.property-fill.cleansing { background: #7e8c56; }
.property-fill.conditioning { background: #8a9a5b; }
.property-fill.bubbly { background: #c2a26c; }
.property-fill.creamy { background: #9d8770; }
.property-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.property-name { font-weight: bold; }
.property-value { background: #fff; padding: 2px 8px; border-radius: 4px; border: 1px solid #e0dcd5; min-width: 40px; text-align: center; font-size: 1.1em; font-weight: bold; }
.fatty-acid-item { display: flex; justify-content: space-between; align-items: center; background: #fdfbf7; padding: 15px; border-radius: 4px; border: 1px solid #e0dcd5; }
.acid-name { font-weight: bold; }
.acid-value { font-size: 1.2em; font-weight: bold; background: #fff; padding: 2px 8px; border-radius: 4px; border: 1px solid #e0dcd5;}
.oil-breakdown-item:last-child { border-bottom: none; }

/* --- Recipe Score & Email --- */
.recipe-rating, .email-capture { margin-top: 30px; padding: 30px; background: #fff; border: 1px solid #e0dcd5; border-radius: 6px; text-align: center; }
.score-display { display: flex; align-items: center; gap: 25px; text-align: left; }
.score-circle { width: 100px; height: 100px; border-radius: 50%; background: #8a9a5b; color: white; display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.score-circle span { font-size: 2.2em; font-weight: bold; }
.score-circle small { font-size: 1em; opacity: 0.8; }
.score-description { flex: 1; }
#recipe-rating h4 { margin: 0 0 20px 0; }
#score-suggestions ul { list-style-type: '🌿'; padding-left: 20px; text-align: left; }
#score-suggestions li { padding-left: 10px; margin-bottom: 8px; }
.email-capture h4 { font-size: 1.8em; margin-bottom: 15px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.email-capture p { max-width: 500px; margin: 0 auto 25px auto; line-height: 1.6; color: #6e6658; }
.email-input-group { max-width: 450px; margin: 0 auto; border: 1px solid #d4c8be; border-radius: 4px; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,0.05); }
.email-input-group input[type="email"] { flex: 1; border: none; padding: 12px 15px; font-size: 1em; font-family: Georgia, serif; background: #fff; color: #4a443d; min-width: 0; }
.email-input-group input[type="email"]:focus { outline: none; box-shadow: inset 0 0 0 2px rgba(138, 154, 91, 0.3); }
#email-submit { background: #8a9a5b; color: white; border: none; padding: 12px 25px; cursor: pointer; font-weight: bold; font-family: Georgia, serif; transition: background 0.2s; font-size: 1em; }
#email-submit:hover { background: #74824b; }
.privacy-note { margin-top: 15px; font-size: 0.9em; color: #9d8770; }
#email-form .email-input-group { display: flex !important; flex-direction: row; }

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .form-row-flex, .score-display { flex-direction: column; align-items: stretch; gap: 15px; }
    .score-display { text-align: center; }
    .score-circle { margin: 0 auto; }
    #score-suggestions ul { text-align: left; }
}
@media (max-width: 480px) {
    #email-form .email-input-group { flex-direction: column; border: none; background: none; box-shadow: none; }
    .email-input-group input[type="email"] { border: 1px solid #d4c8be; border-radius: 4px; margin-bottom: 10px; text-align: center; }
    #email-submit { border-radius: 4px; }
}
.process-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; text-align: center; }
.process-step h4 { font-size: 1.1em; color: #4a443d; margin-bottom: 8px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.process-step h4 span { background: #8a9a5b; color: #fff; border-radius: 50%; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; font-size: 0.9em; flex-shrink: 0; }
.process-step p { font-size: 0.9em; color: #6e6658; line-height: 1.5; margin: 0; }
.detailed-instructions { text-align: center; margin-top: 25px; padding-top: 20px; border-top: 1px solid #e0dcd5; }
.detailed-instructions-link { display: inline-block; background: #fdfbf7; color: #4a443d; border: 1px solid #d4c8be; padding: 10px 18px; border-radius: 4px; text-decoration: none; font-weight: bold; font-family: Georgia, serif; transition: all 0.2s ease; }
.detailed-instructions-link:hover { background: #f4f0e9; border-color: #bcaea0; }
.form-row label { display: flex; align-items: center; gap: 8px; }
.help-icon { width: 18px; height: 18px; background: #d4c8be; color: #fff; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: bold; cursor: help; position: relative; }
.rr-tooltip { position: fixed; background: #4a443d; color: #fff; padding: 10px 15px; border-radius: 4px; font-size: 13px; line-height: 1.5; font-family: sans-serif; text-align: center; max-width: 280px; z-index: 9999; box-shadow: 0 2px 5px rgba(0,0,0,0.2); opacity: 0; transition: opacity 0.2s ease-in-out; pointer-events: none; }

/* --- Form Sections --- */
.form-section { margin-bottom: 25px; padding: 25px; background: #fff; border: 1px solid #e0dcd5; border-radius: 6px; }
.form-section h3 { margin: 0 0 20px 0; color: #4a443d; font-size: 1.6em; border-bottom: 1px solid #e0dcd5; padding-bottom: 10px; }
.form-row { margin-bottom: 18px; }
.form-row input[type="number"], .form-row select { width: 100%; padding: 12px; border: 1px solid #d4c8be; border-radius: 4px; font-size: 1em; font-family: Georgia, serif; background: #fdfbf7; color: #4a443d; box-shadow: inset 0 1px 3px rgba(0,0,0,0.05); transition: all 0.2s ease-in-out; }
.form-row input:focus, .form-row select:focus { outline: none; border-color: #8a9a5b; box-shadow: 0 0 0 3px rgba(138, 154, 91, 0.2); }
.form-row-flex { display: flex; gap: 20px; align-items: flex-end; }
.flex-item { flex: 1; }
.toggle-switch { display: flex; border-radius: 6px; overflow: hidden; border: 1px solid #d4c8be; }
.toggle-switch input[type="radio"] { display: none; }
.toggle-switch label { flex: 1; text-align: center; padding: 10px; font-size: 0.9em; cursor: pointer; background: #fdfbf7; color: #6e6658; margin: 0 !important; font-weight: normal; transition: all 0.2s ease-in-out; }
.toggle-switch input[type="radio"]:checked + label { background: #8a9a5b; color: #fff; box-shadow: inset 0 1px 4px rgba(0,0,0,0.1); }
.oil-input, .additive-input { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.oil-input .oil-select, .additive-input .additive-select { flex: 1; padding: 0 12px; }
.oil-input .oil-percentage { flex: 0 0 70px; text-align: center; }
.oil-input .remove-oil, .additive-input .remove-additive { background: #b46a55; color: white; border: none; border-radius: 50%; width: 28px; height: 28px; font-size: 18px; line-height: 28px; cursor: pointer; font-weight: bold; transition: background 0.2s; flex-shrink: 0; }
.oil-input .remove-oil:hover, .additive-input .remove-additive:hover { background: #9d5947; }
.form-actions { display: flex; flex-direction: column; gap: 10px; }
.select-ingredients-btn, .calculate-button, .save-button { background: #8a9a5b; color: white; border: none; padding: 12px 20px; border-radius: 4px; cursor: pointer; font-size: 1em; font-weight: bold; font-family: Georgia, serif; transition: all 0.2s ease; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.select-ingredients-btn { background: #fdfbf7; color: #4a443d; border: 1px solid #d4c8be; width: auto; display: inline-block; }
.calculate-button:hover, .save-button:hover, .select-ingredients-btn:hover { background: #74824b; color: #fff; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.select-ingredients-btn:hover { background: #f4f0e9; color: #4a443d; }
.calculate-button { width: 100%; padding: 15px; font-size: 1.2em; }
.save-button { width: 100%; padding: 12px; background-color: #6e6658; }
.save-button:disabled { background-color: #c8c3bc; cursor: not-allowed; transform: none; box-shadow: none; }

/* --- Recipe Management --- */
.recipe-management-section { margin-bottom: 30px !important; }
.login-prompt a { color: #8a9a5b; font-weight: bold; text-decoration: none; }
.login-prompt a:hover { text-decoration: underline; }
#recipe-list { list-style: none; padding: 0; margin: 0; }
#recipe-list li { display: flex; justify-content: space-between; align-items: center; padding: 12px; border-bottom: 1px solid #e0dcd5; }
#recipe-list li:last-child { border-bottom: none; }
#recipe-list li.no-recipes { color: #9d8770; font-style: italic; }
a.load-recipe-link { font-weight: bold; text-decoration: none; color: #4a443d; }
a.load-recipe-link:hover { color: #8a9a5b; }
button.delete-recipe-btn { background: #b46a55; color: white; border: none; border-radius: 50%; width: 24px; height: 24px; font-size: 16px; line-height: 24px; cursor: pointer; transition: background 0.2s; }
button.delete-recipe-btn:hover { background: #9d5947; }

/* --- Additives Section Styles --- */
.section-description { font-size: 0.9em; color: #6e6658; margin: -10px 0 20px 0; font-style: italic; }
#additives-breakdown h5 { font-size: 1.2em; color: #4a443d; margin: 20px 0 10px 0; padding-top: 20px; border-top: 1px solid #e0dcd5; }
.breakdown-list .breakdown-item { display: flex; justify-content: space-between; padding: 8px; background: #fdfbf7; border-radius: 4px; margin-bottom: 5px; }
.percentage-total { margin-top: 12px; padding-left: 12px; }

/* --- Slide-out Panel Styles --- */
.panel-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); z-index: 1000; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
.panel-overlay.is-open { opacity: 1; visibility: visible; }
.ingredient-panel { position: fixed; top: 0; right: 0; width: 100%; max-width: 420px; height: 100%; background: #fff; box-shadow: -5px 0 25px rgba(0,0,0,0.2); z-index: 1001; display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1); }
.ingredient-panel.is-open { transform: translateX(0); }
.panel-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-bottom: 1px solid #e0dcd5; background: #fdfbf7; flex-shrink: 0; }
.panel-header h3 { margin: 0; font-size: 1.4em; }
.panel-close-btn { background: transparent; border: none; font-size: 2.5em; line-height: 1; padding: 0; margin: 0; cursor: pointer; color: #9d8770; transition: color 0.2s; }
.panel-close-btn:hover { color: #4a443d; }
.panel-search { padding: 15px; border-bottom: 1px solid #e0dcd5; flex-shrink: 0; background: #fdfbf7; }
#ingredient-search { width: 100%; padding: 12px 15px; border: 1px solid #d4c8be; border-radius: 4px; font-size: 1em; font-family: Georgia, serif; box-sizing: border-box; }
.ingredient-list-all { overflow-y: auto; flex-grow: 1; padding: 10px 0; background: #fff; }
.ingredient-list-item { display: flex; align-items: center; gap: 15px; padding: 12px 20px; border-bottom: 1px dashed #e0dcd5; }
.ingredient-list-item:last-child { border-bottom: none; }
.ingredient-list-item.hidden { display: none; }
.ingredient-image { width: 45px; height: 45px; border-radius: 50%; object-fit: cover; border: 2px solid #e0dcd5; flex-shrink: 0; }
.ingredient-name { font-weight: bold; flex-grow: 1; }
.add-ingredient-btn { background-color: #fdfbf7; border: 1px solid #8a9a5b; color: #8a9a5b; font-weight: bold; border-radius: 4px; padding: 6px 12px; font-size: 0.8em; cursor: pointer; transition: all 0.2s; }
.add-ingredient-btn:hover { background-color: #8a9a5b; color: #fff; }
.add-ingredient-btn.is-added { background-color: #b46a55; border-color: #b46a55; color: #fff; }
.panel-footer { padding: 15px; border-top: 1px solid #e0dcd5; background: #fdfbf7; box-shadow: 0 -2px 10px rgba(0,0,0,0.05); flex-shrink: 0; }
.panel-footer #panel-done-btn { width: 100%; padding: 15px; font-size: 1.1em; }

/* --- Results Section --- */
.calculator-results { margin-top: 30px; padding: 25px; background: #fff; border: 1px solid #e0dcd5; border-radius: 6px; }
.results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.results-header h4, #results .results-section h4, #results .oil-breakdown h4 { margin: 40px 0 20px 0; font-size: 1.6em; color: #4a443d; }
.results-section:first-of-type h4 { margin-top: 10px; }
.print-button { background: #fdfbf7; color: #4a443d; border: 1px solid #d4c8be; padding: 8px 16px; border-radius: 4px; cursor: pointer; font-weight: bold; font-family: Georgia, serif; transition: all 0.2s ease; }
.print-button:hover { background: #f4f0e9; }
.results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 15px; }
.result-item { background: #fdfbf7; padding: 15px; border-radius: 4px; text-align: center; border: 1px solid #e0dcd5; }
.result-label { display: block; font-size: 0.9em; color: #6e6658; margin-bottom: 5px; }
.result-value { display: block; font-size: 1.8em; font-weight: bold; color: #4a443d; font-family: Consolas, 'Courier New', monospace; }
.results-section, .oil-breakdown { margin-bottom: 25px; }
.soap-properties, .fatty-acids { display: grid; gap: 15px; }
.property-bar { width: 100%; height: 10px; background: #f4f0e9; border-radius: 5px; overflow: hidden; border: 1px solid #e0dcd5; }
.property-fill { height: 100%; transition: width 0.8s ease; }
.property-fill.hardness { background: #b46a55; }
.property-fill.cleansing { background: #7e8c56; }
.property-fill.conditioning { background: #8a9a5b; }
.property-fill.bubbly { background: #c2a26c; }
.property-fill.creamy { background: #9d8770; }
.property-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.property-name { font-weight: bold; }
.property-value { background: #fff; padding: 2px 8px; border-radius: 4px; border: 1px solid #e0dcd5; min-width: 40px; text-align: center; font-size: 1.1em; font-weight: bold; }
.fatty-acid-item { display: flex; justify-content: space-between; align-items: center; background: #fdfbf7; padding: 15px; border-radius: 4px; border: 1px solid #e0dcd5; }
.acid-name { font-weight: bold; }
.acid-value { font-size: 1.2em; font-weight: bold; background: #fff; padding: 2px 8px; border-radius: 4px; border: 1px solid #e0dcd5;}
.oil-breakdown-item:last-child { border-bottom: none; }

/* --- Recipe Score & Email --- */
.recipe-rating, .email-capture { margin-top: 30px; padding: 30px; background: #fff; border: 1px solid #e0dcd5; border-radius: 6px; text-align: center; }
.score-display { display: flex; align-items: center; gap: 25px; text-align: left; }
.score-circle { width: 100px; height: 100px; border-radius: 50%; background: #8a9a5b; color: white; display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.score-circle span { font-size: 2.2em; font-weight: bold; }
.score-circle small { font-size: 1em; opacity: 0.8; }
.score-description { flex: 1; }
#recipe-rating h4 { margin: 0 0 20px 0; }
#score-suggestions ul { list-style-type: '🌿'; padding-left: 20px; text-align: left; }
#score-suggestions li { padding-left: 10px; margin-bottom: 8px; }
.email-capture h4 { font-size: 1.8em; margin-bottom: 15px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.email-capture p { max-width: 500px; margin: 0 auto 25px auto; line-height: 1.6; color: #6e6658; }
.email-input-group { max-width: 450px; margin: 0 auto; border: 1px solid #d4c8be; border-radius: 4px; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,0.05); }
.email-input-group input[type="email"] { flex: 1; border: none; padding: 12px 15px; font-size: 1em; font-family: Georgia, serif; background: #fff; color: #4a443d; min-width: 0; }
.email-input-group input[type="email"]:focus { outline: none; box-shadow: inset 0 0 0 2px rgba(138, 154, 91, 0.3); }
#email-submit { background: #8a9a5b; color: white; border: none; padding: 12px 25px; cursor: pointer; font-weight: bold; font-family: Georgia, serif; transition: background 0.2s; font-size: 1em; }
#email-submit:hover { background: #74824b; }
.privacy-note { margin-top: 15px; font-size: 0.9em; color: #9d8770; }
#email-form .email-input-group { display: flex !important; flex-direction: row; }

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .form-row-flex, .score-display { flex-direction: column; align-items: stretch; gap: 15px; }
    .score-display { text-align: center; }
    .score-circle { margin: 0 auto; }
    #score-suggestions ul { text-align: left; }
}
@media (max-width: 480px) {
    #email-form .email-input-group { flex-direction: column; border: none; background: none; box-shadow: none; }
    .email-input-group input[type="email"] { border: 1px solid #d4c8be; border-radius: 4px; margin-bottom: 10px; text-align: center; }
    #email-submit { border-radius: 4px; }
}