/* Zapotrzebowanie kaloryczne (TDEE) — layout */

.pbn-tool-zapotrzebowanie-kaloryczne .pbn-tool-ui {
    max-width: 560px;
    margin: 0 auto;
}

/* Form */
.zk-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.zk-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.zk-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.zk-label {
    font-weight: 600;
    font-size: 0.9em;
}

.zk-hint {
    font-size: 0.8em;
    opacity: 0.6;
}

.zk-form input[type="number"],
.zk-form select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border-color, #ccc);
    border-radius: var(--radius-sm, 4px);
    background: transparent;
    color: inherit;
    font: inherit;
    box-sizing: border-box;
}

/* Gender toggle */
.zk-gender {
    border: 0;
    padding: 0;
    margin: 0;
}

.zk-gender-options {
    display: flex;
    gap: 0.5rem;
}

.zk-gender-option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color, #ddd);
    border-radius: var(--radius-sm, 4px);
    cursor: pointer;
    font-size: 0.9em;
    transition: border-color 0.15s;
}

.zk-gender-option:has(input:checked) {
    border-color: var(--primary-color, #4f46e5);
    background: rgba(79, 70, 229, 0.05);
}

.zk-gender-option input {
    margin: 0;
}

/* Submit */
.zk-submit {
    width: 100%;
    padding: 0.75rem;
    border: 0;
    border-radius: var(--radius-sm, 4px);
    background: var(--primary-color, #4f46e5);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}

.zk-submit:hover {
    opacity: 0.85;
}

/* Error */
.zk-error {
    margin: 0;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm, 4px);
    background: rgba(220, 38, 38, 0.08);
    color: #b91c1c;
    font-size: 0.9em;
}

.zk-error[hidden] {
    display: none;
}

/* Results */
.zk-results {
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color, #eee);
    border-radius: var(--radius-md, 8px);
    background: #fff;
}

.zk-results[hidden] {
    display: none;
}

.zk-results-main {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color, #eee);
}

.zk-tdee-number {
    display: block;
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--primary-color, #4f46e5);
}

.zk-tdee-unit {
    font-size: 1rem;
    opacity: 0.7;
}

.zk-tdee-activity {
    margin: 0.5rem 0 0;
    font-size: 0.9em;
    opacity: 0.7;
}

/* Formula comparison */
.zk-formulas {
    margin-bottom: 1.5rem;
}

.zk-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
}

.zk-formula-table {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.75rem;
}

.zk-formula-col {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    border: 1px solid var(--border-color, #eee);
    border-radius: var(--radius-sm, 4px);
    text-align: center;
    font-size: 0.85em;
}

.zk-formula-col[hidden] {
    display: none;
}

.zk-formula-name {
    font-weight: 600;
    font-size: 0.9em;
    margin-bottom: 0.25rem;
}

.zk-formula-bmr,
.zk-formula-tdee {
    font-size: 0.9em;
}

.zk-formula-avg {
    margin: 0.75rem 0 0;
    font-size: 0.9em;
    text-align: center;
    opacity: 0.8;
}

/* Activity table */
.zk-activity-table {
    margin-bottom: 1.5rem;
}

.zk-activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.zk-activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.75rem;
    border-left: 3px solid transparent;
    border-radius: var(--radius-sm, 4px);
    font-size: 0.9em;
    transition: background 0.15s, border-color 0.15s;
}

.zk-activity-item--active {
    border-left-color: var(--primary-color, #4f46e5);
    background: rgba(79, 70, 229, 0.05);
    font-weight: 600;
}

.zk-activity-kcal {
    font-weight: 600;
    white-space: nowrap;
}

/* Info */
.zk-info {
    margin: 0;
    padding: 0.75rem;
    border-radius: var(--radius-sm, 4px);
    background: rgba(79, 70, 229, 0.04);
    font-size: 0.85em;
    line-height: 1.5;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 600px) {
    .zk-row {
        grid-template-columns: 1fr;
    }

    .zk-formula-table {
        grid-template-columns: 1fr;
    }

    .zk-gender-options {
        flex-direction: column;
    }
}
