/* BMR Calculator — style.css v1.0 */

.bmrc-wrap {
    max-width: 600px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a1a;
}

/* Header */
.bmrc-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.bmrc-icon   { font-size: 34px; line-height: 1; }
.bmrc-title  {
    font-size: 22px !important; font-weight: 600 !important;
    margin: 0 0 3px !important; padding: 0 !important;
    border: none !important; color: #1a1a1a !important;
}
.bmrc-sub { font-size: 13px; color: #666; margin: 0; }

/* Unit toggle */
.bmrc-unit-toggle {
    display: flex; border: 1px solid #d0d0d0;
    border-radius: 9px; overflow: hidden; margin-bottom: 18px;
}
.bmrc-utbtn {
    flex: 1; padding: 9px 10px; font-size: 13px;
    border: none; border-right: 1px solid #d0d0d0;
    background: #fff; color: #555; cursor: pointer;
    transition: background .13s, color .13s;
}
.bmrc-utbtn:last-child { border-right: none; }
.bmrc-utbtn.act { background: #fff3e0; color: #E65100; font-weight: 600; }
.bmrc-utbtn:hover:not(.act) { background: #fafafa; }

/* Section label */
.bmrc-section-lbl {
    font-size: 11px; font-weight: 700; color: #999;
    text-transform: uppercase; letter-spacing: .6px; margin-bottom: 10px;
}

/* Gender */
.bmrc-gender-row {
    display: flex; border: 1px solid #d0d0d0;
    border-radius: 8px; overflow: hidden; height: 40px; margin-bottom: 4px;
}
.bmrc-gbtn {
    flex: 1; border: none; border-right: 1px solid #d0d0d0;
    background: #fff; color: #555; font-size: 13px;
    cursor: pointer; transition: background .13s, color .13s;
}
.bmrc-gbtn:last-child { border-right: none; }
.bmrc-gbtn.act { background: #fff3e0; color: #E65100; font-weight: 600; }

/* Grid */
.bmrc-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 14px; margin-bottom: 4px;
}
@media (max-width: 460px) { .bmrc-grid { grid-template-columns: 1fr; } }

.bmrc-lbl {
    display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
    font-size: 13px; font-weight: 500; color: #555; margin-bottom: 6px;
}
.bmrc-optional { font-size: 11px; color: #aaa; font-weight: 400; }

/* Inputs */
.bmrc-iw { position: relative; }
.bmrc-iw input[type="number"] {
    width: 100%; box-sizing: border-box;
    padding: 9px 36px 9px 12px;
    border: 1px solid #d0d0d0; border-radius: 8px;
    font-size: 14px; color: #1a1a1a; background: #fff;
    outline: none; transition: border-color .15s;
    -moz-appearance: textfield;
}
.bmrc-iw input::-webkit-inner-spin-button,
.bmrc-iw input::-webkit-outer-spin-button { -webkit-appearance: none; }
.bmrc-iw input:focus { border-color: #E65100; box-shadow: 0 0 0 3px rgba(230,81,0,.1); }
.bmrc-suf {
    position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
    font-size: 12px; color: #999; pointer-events: none;
}
.bmrc-ft-in-row { display: flex; gap: 8px; }
.bmrc-ft-in-row .bmrc-iw { flex: 1; }

/* Primary BMR card */
.bmrc-primary-card {
    background: linear-gradient(135deg, #E65100, #BF360C);
    border-radius: 14px; padding: 20px 24px;
    text-align: center; color: #fff;
    margin-top: 20px; margin-bottom: 4px;
    animation: bmrc-in .22s ease;
}
@keyframes bmrc-in { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }
.bmrc-primary-val { font-size: 48px; font-weight: 700; line-height: 1; margin-bottom: 6px; }
.bmrc-primary-lbl { font-size: 14px; opacity: .85; }
.bmrc-primary-formula { font-size: 12px; opacity: .7; margin-top: 4px; }

/* Formula comparison cards */
.bmrc-formula-cards {
    display: grid; grid-template-columns: repeat(3,1fr);
    gap: 10px; margin-bottom: 4px;
}
@media (max-width: 460px) { .bmrc-formula-cards { grid-template-columns: 1fr; } }

.bmrc-formula-card {
    border-radius: 11px; padding: 14px 12px;
    border: 1px solid; text-align: center;
}
.bmrc-formula-card.recommended { background: #fff3e0; border-color: #ffcc80; }
.bmrc-formula-card.classic      { background: #f3e5f5; border-color: #ce93d8; }
.bmrc-formula-card.leanbased    { background: #e8f5e9; border-color: #a5d6a7; }
.bmrc-formula-card.dimmed       { background: #f5f5f5; border-color: #e0e0e0; opacity: .7; }

.bmrc-fc-val   { font-size: 26px; font-weight: 700; margin-bottom: 4px; }
.bmrc-fc-name  { font-size: 12px; font-weight: 600; margin-bottom: 3px; }
.bmrc-fc-desc  { font-size: 11px; color: #888; line-height: 1.3; }
.bmrc-fc-badge {
    display: inline-block; font-size: 10px; font-weight: 600;
    border-radius: 10px; padding: 2px 8px; margin-bottom: 6px;
}
.bmrc-formula-card.recommended .bmrc-fc-val  { color: #E65100; }
.bmrc-formula-card.classic      .bmrc-fc-val  { color: #6A1B9A; }
.bmrc-formula-card.leanbased    .bmrc-fc-val  { color: #1B5E20; }
.bmrc-formula-card.recommended .bmrc-fc-badge { background: #E65100; color: #fff; }
.bmrc-formula-card.classic      .bmrc-fc-badge { background: #6A1B9A; color: #fff; }
.bmrc-formula-card.leanbased    .bmrc-fc-badge { background: #1B5E20; color: #fff; }

/* TDEE table */
table.bmrc-tdee-table {
    width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 14px;
}
table.bmrc-tdee-table th {
    padding: 8px 10px; text-align: left; color: #888;
    font-size: 11px; text-transform: uppercase; letter-spacing: .4px;
    border-bottom: 1px solid #e8e8e8; background: #fafafa; font-weight: 600;
}
table.bmrc-tdee-table th:last-child { text-align: right; }
table.bmrc-tdee-table td {
    padding: 8px 10px; border-bottom: 1px solid #f0f0f0; font-size: 13px;
}
table.bmrc-tdee-table td:last-child { text-align: right; font-weight: 600; font-family: monospace; }
table.bmrc-tdee-table td:nth-child(2) { font-size: 12px; color: #888; }
table.bmrc-tdee-table tr:last-child td { border-bottom: none; }

/* Visual bars */
.bmrc-bars-wrap { background: #fafafa; border: 1px solid #e8e8e8; border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; }
.bmrc-bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.bmrc-bar-row:last-child { margin-bottom: 0; }
.bmrc-bar-lbl   { font-size: 12px; color: #555; width: 120px; flex-shrink: 0; line-height: 1.3; }
.bmrc-bar-track { flex: 1; height: 10px; background: #e8e8e8; border-radius: 5px; overflow: hidden; }
.bmrc-bar-fill  { height: 100%; border-radius: 5px; transition: width .5s ease; }
.bmrc-bar-amt   { font-size: 12px; font-weight: 600; color: #1a1a1a; width: 80px; text-align: right; flex-shrink: 0; }

/* Info box */
.bmrc-info-box {
    background: #f8f9ff; border: 1px solid #e0e7ff;
    border-radius: 10px; padding: 12px 16px;
    font-size: 13px; color: #555; line-height: 1.6; margin-bottom: 14px;
}
.bmrc-info-box strong { color: #1434A4; }

/* Disclaimer */
.bmrc-disclaimer { font-size: 11px; color: #bbb; text-align: center; margin-top: 8px; }
.bmrc-reset-btn {
    display: block; width: 100%; margin-top: 10px; padding: 9px;
    font-size: 13px; color: #999; background: none;
    border: 1px solid #e8e8e8; border-radius: 8px;
    cursor: pointer; transition: background .13s;
}
.bmrc-reset-btn:hover { background: #f5f5f5; color: #333; }
