/* TDEE Calculator Widget — Base Styles */
/* All colors, fonts, spacing are overridable via Elementor controls */

.tdee-wrap * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.tdee-wrap {
    font-family: 'DM Sans', sans-serif;
    background: #ffffff;
    color: #1a1a1a;
    padding: 40px 24px;
}

/* ── GRID — must use stretch so sticky has a tall parent ── */
.tdee-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start; /* keeps columns top-aligned */
}

@media (max-width: 768px) {
    .tdee-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* ── HEADING & DESCRIPTION ── */
.tdee-heading {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -1px;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.tdee-desc {
    font-size: 16px;
    line-height: 1.65;
    color: #333333;
    margin-bottom: 32px;
}

/* ── FIELD BLOCKS ── */
.field-block {
    margin-bottom: 20px;
}

.field-lbl {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.info-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1.5px solid #888;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #888;
    cursor: default;
    flex-shrink: 0;
    line-height: 1;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ── SEX TOGGLE ── */
.sex-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-radius: 50px;
    border: 1.5px solid #cccccc;
    overflow: hidden;
    background-color: transparent; /* container bg */
}

.sex-btn {
    padding: 14px 0;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    /* inactive bg — explicitly set so it's overridable via Elementor selector */
    background-color: transparent;
    cursor: pointer;
    color: #888888;
    transition: background-color 0.2s, color 0.2s;
    border-radius: 0;
}

/* Inactive hover */
.sex-btn:not(.active):hover {
    background-color: rgba(0,0,0,0.05);
    color: #555555;
}

.sex-btn.active {
    background-color: #1a1a1a;
    color: #ffffff;
    border-radius: 50px;
}

.sex-btn.active:hover {
    background-color: #333333;
}

/* ── INPUTS ── */
.tdee-input,
.tdee-select {
    width: 100%;
    padding: 16px 18px;
    border: 1.5px solid #d0d0d0;
    border-radius: 14px;
    font-size: 15px;
    font-family: inherit;
    color: #1a1a1a;
    background-color: #ffffff;
    outline: none;
    transition: border-color 0.2s;
    -moz-appearance: textfield;
}

.tdee-input::-webkit-outer-spin-button,
.tdee-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.tdee-input::placeholder {
    color: #aaaaaa;
}

.tdee-input:focus,
.tdee-select:focus {
    border-color: #1a1a1a;
}

.tdee-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    cursor: pointer;
}

/* ── ERROR ── */
.tdee-error {
    font-size: 13px;
    color: #c0392b;
    margin-bottom: 8px;
}

/* ── CALCULATE BUTTON ── */
.calc-btn {
    width: 100%;
    padding: 16px 24px;
    background-color: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.15s, opacity 0.15s;
}

.calc-btn:hover {
    background-color: #333333;
}

/* ── RESULTS PANEL ── */
.results-panel {
    background-color: #c8f04a;
    border-radius: 24px;
    overflow: hidden;
}

.results-top {
    background-color: #1e2010;
    border-radius: 24px;
    padding: 28px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
}

.your-tdee-lbl {
    font-size: 13px;
    font-weight: 600;
    color: #c8f04a;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.maintain-headline {
    font-size: 30px;
    font-weight: 700;
    color: #c8f04a;
    line-height: 1.15;
}

.results-top-right {
    text-align: right;
    flex-shrink: 0;
}

.kcal-display {
    font-size: 36px;
    font-weight: 700;
    color: #c8f04a;
    line-height: 1;
}

.kcal-dashes {
    font-size: 28px;
    font-weight: 700;
    color: #c8f04a;
    letter-spacing: 4px;
}

.cal-day-top {
    font-size: 18px;
    font-weight: 600;
    color: #c8f04a;
    margin-top: 4px;
}

.results-bottom {
    padding: 24px 28px 28px;
}

.adjustment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.adj-label {
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
}

.adj-toggle {
    display: flex;
    border: 1.5px solid #1a1a1a;
    border-radius: 50px;
    overflow: hidden;
}

.adj-btn {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    background-color: transparent;
    cursor: pointer;
    color: #1a1a1a;
    border-radius: 0;
    transition: background-color 0.2s, color 0.2s;
}

/* Inactive adj hover */
.adj-btn:not(.active):hover {
    background-color: rgba(0,0,0,0.08);
}

.adj-btn.active {
    background-color: #1a1a1a;
    color: #c8f04a;
    border-radius: 50px;
}

.adj-btn.active:hover {
    background-color: #333333;
}

.goal-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
}

.goal-txt {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
}

.goal-right {
    text-align: right;
    flex-shrink: 0;
}

.goal-kcal {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1;
}

.goal-dashes {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: 4px;
}

.goal-calday {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

/* ── DISCLAIMER ── */
.tdee-disclaimer {
    font-size: 12px;
    color: #666666;
    margin-top: 16px;
    line-height: 1.6;
}

/* ── RIGHT COLUMN — JS handles sticky, CSS just sets baseline ── */
.tdee-right-sticky {
    position: relative;
    align-self: start;
}

/* On mobile: never sticky, just stack */
@media (max-width: 768px) {
    .tdee-right-sticky {
        position: relative !important;
        top: auto !important;
        width: auto !important;
        transform: none !important;
    }
}
