/* calc/assets/css/calculators/weight-loss-target.css */

:root {
    --fit-primary: #6D28D9; /* Фиолетовый */
    --fit-bg: #F5F3FF;      /* Светло-фиолетовый фон */
    --fit-success: #10B981; /* Зеленый (Безопасно) */
    --fit-warning: #F59E0B; /* Желтый (Сложно) */
    --fit-danger: #EF4444;  /* Красный (Опасно) */
    
    --macro-p: #3B82F6;
    --macro-f: #EAB308;
    --macro-c: #10B981;
}

/* --- ВЕРХНЯЯ ЧАСТЬ --- */
.calc-header { margin-bottom: 32px; }
.subtitle { color: var(--text-secondary); margin-top: 8px; font-size: 16px; }

.calc-grid { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }
@media (min-width: 992px) { .calc-grid { grid-template-columns: 1fr 1fr; } }

.form-divider { border: none; height: 1px; background: #EDE9FE; margin: 24px 0; }

.group-title-small { font-size: 14px; font-weight: 700; color: var(--fit-primary); text-transform: uppercase; letter-spacing: 0.5px; margin: 0 0 16px 0; border-left: 3px solid var(--fit-primary); padding-left: 8px; }

/* Инпуты */
.input-group { margin-bottom: 20px; }
.input-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--text-primary); }
.label-with-icon { display: flex; align-items: center; gap: 6px; color: var(--fit-primary) !important; font-size: 15px !important;}

.input-wrapper { position: relative; display: flex; align-items: center; }
.input-wrapper input, .input-wrapper select {
    width: 100%; padding: 14px 16px;
    font-size: 16px; font-weight: 600; font-family: inherit;
    border: 1px solid #D1D5DB; border-radius: 12px;
    transition: all 0.2s; outline: none; background: #fff;
}
input[type="number"] { padding-right: 48px; }
.input-wrapper input:focus, .input-wrapper select:focus { border-color: var(--fit-primary); box-shadow: 0 0 0 4px rgba(109, 40, 217, 0.1); }
.suffix { position: absolute; right: 16px; color: var(--text-secondary); font-weight: 600; pointer-events: none; font-size: 14px; }

.row-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.highlight-group { background: var(--fit-bg); padding: 16px; border-radius: 16px; border: 1px dashed #C4B5FD; }

/* Сегмент контрол (Пол) */
.segment-control { display: flex; gap: 8px; background: #F3F4F6; padding: 4px; border-radius: 12px; }
.segment-item { flex: 1; position: relative; }
.segment-item input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
.segment-box {
    display: flex; align-items: center; justify-content: center;
    padding: 10px 4px; border-radius: 8px; font-size: 14px; font-weight: 600;
    color: #6B7280; transition: all 0.2s; cursor: pointer; text-align: center;
}
.segment-item input:checked + .segment-box { background: #fff; color: var(--fit-primary); box-shadow: 0 2px 8px rgba(0,0,0,0.05); }

/* Быстрые даты */
.quick-dates { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.quick-btn {
    font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 99px;
    background: var(--fit-bg); color: var(--fit-primary); cursor: pointer;
    border: 1px solid #C4B5FD; transition: all 0.2s;
}
.quick-btn:hover { background: var(--fit-primary); color: #fff; }

/* --- ПРАВАЯ ЧАСТЬ: РЕЗУЛЬТАТ (KILLER FEATURE) --- */
.fitness-result-card { background: #fff; border: 2px solid var(--fit-bg); padding: 24px; }
@media (min-width: 992px) { .sticky-card { position: sticky; top: 24px; } }

/* Термометр */
.reality-thermometer { background: #F9FAFB; padding: 16px; border-radius: 16px; margin-bottom: 24px; border: 1px solid #E5E7EB; }
.rt-title { font-size: 13px; font-weight: 700; color: #4B5563; margin: 0 0 12px 0; text-transform: uppercase; }
#rt-status-text { font-weight: 800; }

.rt-bar-bg { width: 100%; height: 16px; border-radius: 99px; background: linear-gradient(90deg, var(--fit-success) 0%, var(--fit-warning) 50%, var(--fit-danger) 100%); position: relative; margin-bottom: 8px; }
.rt-bar-fill { position: absolute; top: -4px; bottom: -4px; width: 4px; background: #111827; border-radius: 2px; left: 0%; transition: left 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); box-shadow: 0 0 0 2px #fff; }

.rt-labels { display: flex; justify-content: space-between; font-size: 10px; font-weight: 700; color: #6B7280; text-transform: uppercase; }
.rt-warning { margin-top: 12px; font-size: 12px; color: var(--fit-danger); background: #FEF2F2; padding: 8px 12px; border-radius: 8px; display: flex; align-items: flex-start; gap: 6px; line-height: 1.4; border: 1px solid #FECACA;}

/* Итог калорий */
.result-header { text-align: center; margin-bottom: 24px; }
.result-header h2 { font-size: 16px; text-transform: uppercase; font-weight: 700; color: #6B7280; margin: 0 0 8px 0; }
.main-profit { display: flex; flex-direction: column; align-items: center; }
.main-profit span { font-size: 46px; font-weight: 800; color: var(--fit-primary); line-height: 1; letter-spacing: -1px; }
.main-profit small { font-size: 14px; font-weight: 700; color: #6B7280; margin-top: 6px; }

/* Макросы (БЖУ) */
.macros-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.macro-item { background: #fff; border: 1px solid #E5E7EB; border-radius: 12px; padding: 12px; text-align: center; box-shadow: var(--shadow-soft); border-bottom-width: 3px; }
.macro-item span { display: block; font-size: 12px; font-weight: 600; color: #6B7280; margin-bottom: 4px; }
.macro-item strong { font-size: 18px; font-weight: 800; color: #111827; }

.macro-p { border-bottom-color: var(--macro-p); }
.macro-f { border-bottom-color: var(--macro-f); }
.macro-c { border-bottom-color: var(--macro-c); }

/* Итоги */
.summary-divider { height: 1px; background: #E5E7EB; margin: 24px 0; }
.details-list { display: flex; flex-direction: column; gap: 12px; }
.detail-row { display: flex; justify-content: space-between; align-items: center; padding-bottom: 8px; border-bottom: 1px dashed #E5E7EB; font-size: 14px; color: #4B5563; }
.detail-row:last-child { border-bottom: none; padding-bottom: 0; }
.detail-row strong { font-size: 15px; font-weight: 700; color: #111827; }
.text-danger { color: var(--fit-danger) !important; }

/* --- НИЖНЯЯ ЧАСТЬ (ИНФОРМАЦИЯ, СТАТЬЯ, FAQ, SEO) --- */
.info-wrapper { padding: 60px 0; margin-top: 40px; border-top: 1px solid #E5E7EB; }

.author-badge { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 32px; padding: 16px 20px; background: #F8FAFC; border-radius: 12px; border: 1px solid #E2E8F0; }
.author-avatar { width: 44px; height: 44px; background: var(--fit-primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.author-info { display: flex; flex-direction: column; min-width: 0; }
.author-name { font-size: 14px; font-weight: 600; color: #111827; line-height: 1.4; }
.author-date { font-size: 12px; color: #6B7280; margin-top: 4px; }

.icon-heading { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; font-size: 24px; font-weight: 800; color: var(--text-primary); line-height: 1.3; letter-spacing: -0.02em; }
.header-icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 14px; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.06); flex-shrink: 0; margin-top: -4px; font-size: 24px; }

.blue-icon { color: #2563EB; }
.green-icon { color: #10B981; }
.yellow-icon { color: #F59E0B; }
.red-icon { color: #EF4444; }

.small-heading { margin-top: 48px; margin-bottom: 16px; font-size: 20px; }
.small-heading .header-icon { width: 40px; height: 40px; font-size: 20px; border-radius: 10px; }

.intro-text { font-size: 16px; color: var(--text-secondary); margin-bottom: 32px; line-height: 1.6; }

.formulas-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 48px; }
.formula-card { background: #fff; border: 1px solid rgba(0,0,0,0.04); box-shadow: var(--shadow-soft); border-radius: 24px; padding: 24px; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); display: flex; flex-direction: column; }
.formula-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: rgba(109, 40, 217, 0.1); }
.formula-header { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.formula-card h3 { margin: 0; font-size: 18px; font-weight: 700; color: var(--text-primary); line-height: 1.3; }

.badge-blue { background: #2563EB; color: #fff; padding: 6px 12px; border-radius: 99px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; display: inline-block; }
.badge-green { background: #10B981; color: #fff; padding: 6px 12px; border-radius: 99px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; display: inline-block; }

.formula-card p { font-size: 14px; color: var(--text-secondary); margin: 0; line-height: 1.6; font-weight: 500; }
.math-expression { background: var(--fit-bg); border: 1px dashed #C4B5FD; padding: 16px; border-radius: 12px; font-weight: 700; color: var(--fit-primary); text-align: center; margin-bottom: 16px; font-size: 16px; font-family: 'Courier New', Courier, monospace; }

.soft-divider { border: none; height: 1px; background: linear-gradient(90deg, transparent, #E5E7EB, transparent); margin: 48px 0; }

.calc-description p { font-size: 16px; line-height: 1.7; color: var(--text-secondary); margin-bottom: 20px; }
.calc-description strong { color: var(--text-primary); font-weight: 700; }

.seo-table-wrapper { overflow-x: auto; margin-bottom: 40px; background: #fff; border-radius: 16px; border: 1px solid #E5E7EB; box-shadow: var(--shadow-soft); }
.seo-table { width: 100%; border-collapse: collapse; min-width: 400px; text-align: left; }
.seo-table th { background: #F9FAFB; padding: 16px 20px; font-size: 13px; font-weight: 700; color: #6B7280; text-transform: uppercase; border-bottom: 1px solid #E5E7EB; }
.seo-table td { padding: 16px 20px; font-size: 15px; border-bottom: 1px solid #F3F4F6; color: #374151; }
.seo-table tr:last-child td { border-bottom: none; }
.text-success { color: var(--fit-success); }

.howto-section { margin-top: 40px; }
.howto-step { display: flex; gap: 16px; margin-bottom: 24px; background: #fff; padding: 20px; border-radius: 16px; border: 1px solid #E5E7EB; transition: box-shadow 0.2s; }
.howto-step:hover { box-shadow: var(--shadow-soft); }
.step-num { width: 32px; height: 32px; background: var(--fit-bg); color: var(--fit-primary); font-weight: 800; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 14px; }
.step-content h4 { margin: 0 0 8px 0; font-size: 16px; color: #111827; }
.step-content p { margin: 0; font-size: 14px; color: #6B7280; line-height: 1.6; }

.faq-section .faq-item { background: #fff; border: 1px solid #E5E7EB; border-radius: 16px; margin-bottom: 12px; overflow: hidden; transition: all 0.2s ease; }
.faq-section .faq-item:hover { border-color: #D1D5DB; }
.faq-section .faq-item[open] { border-color: var(--fit-primary); box-shadow: 0 4px 20px rgba(109, 40, 217, 0.08); }
summary.faq-question { padding: 20px 24px; cursor: pointer; font-weight: 600; color: var(--text-primary); font-size: 16px; list-style: none; position: relative; display: flex; justify-content: space-between; align-items: center; transition: background 0.2s; }
.faq-section .faq-item[open] summary.faq-question { color: var(--fit-primary); background: var(--fit-bg); border-bottom: 1px solid #C4B5FD; }
.faq-question::after { content: '+'; font-size: 24px; color: var(--text-secondary); font-weight: 400; line-height: 1; transition: transform 0.3s; }
.faq-section .faq-item[open] summary.faq-question::after { content: '−'; color: var(--fit-primary); }
.faq-answer, .faq-item div[itemprop="text"] { padding: 24px; color: var(--text-secondary); line-height: 1.6; font-size: 15px; background: #fff; }
.faq-answer p { margin: 0; }

@media (max-width: 900px) {
    .formulas-grid { grid-template-columns: 1fr; gap: 16px; }
    .icon-heading { font-size: 20px; gap: 12px; }
    .header-icon { width: 40px; height: 40px; font-size: 20px; }
    .formula-card { padding: 20px; }
    .howto-step { padding: 16px; gap: 12px; }
    summary.faq-question { padding: 16px 20px; font-size: 15px; }
    .faq-answer, .faq-item div[itemprop="text"] { padding: 20px; }
}

@media (max-width: 480px) {
    .author-badge { padding: 12px; gap: 12px; align-items: flex-start;}
    .author-avatar { width: 36px; height: 36px; font-size: 16px; }
    .macros-grid { gap: 8px; }
    .macro-item { padding: 8px; }
    .macro-item span { font-size: 11px; }
    .macro-item strong { font-size: 16px; }
}