/* LVLTOP — калькулятор чая */

body[data-page="tea-calculator"] {
    background-color: #0A0F14;
    color: #E8EDF3;
    font-family: 'Inter', system-ui, sans-serif;
}

.tea-calculator-inner {
    max-width: 1200px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

body[data-page="tea-calculator"] .page-hero {
    margin-top: 0.5rem;
}

.tea-catalog-section .page-hero {
    margin-top: 0;
    margin-bottom: 1.25rem;
}

.tea-catalog-section .page-hero .tea-catalog-heading {
    margin: 0;
    font-size: 1.375rem;
    font-weight: 600;
    letter-spacing: -0.25px;
    line-height: 1.3;
    color: #E8EDF3;
}

@media (max-width: 700px) {
    .tea-catalog-section .page-hero .tea-catalog-heading {
        font-size: 1.2rem;
    }
}

/* —— Две колонки: калькулятор | результат + FAQ —— */
.tea-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 900px) {
    .tea-layout {
        grid-template-columns: minmax(280px, 1fr) 1.55fr;
        gap: 1.25rem;
        align-items: stretch;
    }

    .tea-calc-panel,
    .tea-right-col {
        min-height: 40rem;
    }
}

.tea-calc-panel {
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

.tea-right-col {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Рецепт и FAQ в один ряд */
.tea-result-row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
    min-height: 0;
}

@media (min-width: 900px) {
    .tea-result-row {
        flex-direction: row;
        align-items: stretch;
        gap: 0.75rem;
        height: 100%;
    }
}

.tea-calc-glow {
    position: absolute;
    top: -4rem;
    right: -4rem;
    width: 12rem;
    height: 12rem;
    border-radius: 50%;
    background: rgba(74, 143, 229, 0.12);
    filter: blur(48px);
    pointer-events: none;
    transition: background 0.4s ease;
}

.tea-calc-panel .panel-title {
    position: relative;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.tea-step {
    position: relative;
    margin-bottom: 1.25rem;
    flex-shrink: 0;
}

.tea-step-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #7E8D9F;
}

/* Сетка чаёв — всегда 2 в ряд, крупные иконки */
.tea-cat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.55rem;
}

.tea-cat-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 7.25rem;
    padding: 0.65rem 0.5rem;
    background: #131923;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #7E8D9F;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.tea-cat-btn:hover {
    border-color: rgba(74, 143, 229, 0.35);
    color: #C5D9FF;
}

.tea-cat-btn.is-active,
.tea-cat-btn.is-selected {
    border-color: #4A8FE5;
    background: rgba(74, 143, 229, 0.1);
    color: #E8EDF3;
    box-shadow: 0 0 0 1px rgba(74, 143, 229, 0.2);
}

.tea-cat-btn:focus-visible,
.tea-tier-btn:focus-visible,
.tea-qty-btn:focus-visible,
.tea-catalog-tier:focus-visible {
    outline: 2px solid #4A8FE5;
    outline-offset: 2px;
}

.tea-cat-icon {
    width: 4.5rem;
    height: 4.5rem;
    object-fit: contain;
}

/* Уровень + количество */
.tea-calc-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    align-items: stretch;
    margin-top: auto;
    flex-shrink: 0;
}

.tea-step--half {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

.tea-step--half .tea-tier-stack,
.tea-step--half .tea-qty-bar {
    flex: 1;
    min-height: 7.5rem;
}

.tea-tier-stack {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.25rem;
    background: #0A0F14;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
}

.tea-tier-btn {
    padding: 0.55rem 0.65rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    color: #7E8D9F;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}

.tea-tier-btn:hover {
    color: #C5D9FF;
}

.tea-tier-btn.is-active {
    background: rgba(74, 143, 229, 0.18);
    color: #E8EDF3;
}

.tea-qty-bar {
    display: flex;
    align-items: stretch;
    background: #0A0F14;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 0.25rem;
}

.tea-qty-btn {
    width: 2.5rem;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.04);
    border: none;
    border-radius: 6px;
    color: #E8EDF3;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.12s;
}

.tea-qty-btn:hover {
    background: rgba(74, 143, 229, 0.2);
}

.tea-qty-input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    color: #E8EDF3;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    -moz-appearance: textfield;
}

.tea-qty-input:focus {
    outline: none;
}

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

/* —— Панель результата —— */
.tea-result-panel {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    background: #131923;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 1.25rem 1.35rem;
    overflow-y: auto;
}

@media (min-width: 900px) {
    .tea-result-panel {
        flex: 1 1 0;
    }
}

.tea-result-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.tea-result-meta {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.tea-result-icon-wrap {
    flex-shrink: 0;
    width: 4.5rem;
    height: 4.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.tea-result-icon-wrap img {
    width: 3.5rem;
    height: 3.5rem;
    object-fit: contain;
}

.tea-result-kicker {
    margin: 0 0 0.15rem;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #5A7A9F;
}

.tea-result-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #E8EDF3;
    line-height: 1.25;
}

.tea-result-buff {
    margin: 0.25rem 0 0.35rem;
    font-size: 12px;
    color: #4A8FE5;
    font-weight: 600;
}

.tea-effect-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.tea-effect-pill {
    display: inline-block;
    padding: 0.2rem 0.45rem;
    font-size: 11px;
    font-weight: 500;
    color: #B8C4D4;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 5px;
}

.tea-result-qty {
    text-align: right;
    flex-shrink: 0;
}

.tea-result-qty-val {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #4A8FE5;
    line-height: 1.1;
}

.tea-result-body {
    flex-shrink: 0;
}

.tea-result-lead {
    margin: 0 0 0.65rem;
    font-size: 13px;
    font-weight: 600;
    color: #E8EDF3;
}

.tea-ingredient-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

@media (min-width: 520px) {
    .tea-ingredient-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.tea-ingredient-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.tea-ingredient-icon-wrap {
    flex-shrink: 0;
    width: 3.25rem;
    height: 3.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.tea-ingredient-count {
    font-size: 1.35rem;
    font-weight: 700;
    color: #E8EDF3;
    line-height: 1;
}

.tea-ingredient-name {
    margin-top: 0.15rem;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #7E8D9F;
}

.tea-chain-block {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

/* Резервируем место под макс. 3 шага — без скачков при смене уровня */
.tea-chain-steps {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 11.5rem;
}

.tea-chain-steps[data-steps="1"] {
    min-height: 4rem;
}

.tea-chain-steps[data-steps="2"] {
    min-height: 7.5rem;
}

.tea-result-empty {
    margin: 0;
    color: #7E8D9F;
    font-size: 13px;
}

.tea-chain-step {
    padding: 0.65rem 0.75rem;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.tea-chain-step-head {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
}

.tea-chain-num {
    flex-shrink: 0;
    width: 1.35rem;
    height: 1.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #4A8FE5;
    background: rgba(74, 143, 229, 0.12);
    border-radius: 50%;
}

.tea-chain-title {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #E8EDF3;
}

.tea-chain-detail {
    margin: 0.15rem 0 0;
    font-size: 11px;
    color: #7E8D9F;
}

.tea-chain-teas {
    list-style: none;
    margin: 0.45rem 0 0 1.9rem;
    padding: 0;
}

.tea-chain-teas li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 12px;
    color: #B8C4D4;
}

.tea-chain-berries {
    margin: 0.4rem 0 0 1.9rem;
    font-size: 12px;
    color: #B8C4D4;
}

.tea-result-note {
    margin: 1rem 0 0;
    padding: 0.65rem 0.75rem;
    font-size: 12px;
    line-height: 1.45;
    color: #7E8D9F;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    flex-shrink: 0;
}

/* —— FAQ справа от рецепта —— */
.tea-faq {
    flex-shrink: 0;
    background: #131923;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    overflow-y: auto;
}

@media (min-width: 900px) {
    .tea-faq {
        flex: 0 0 17.5rem;
        width: 17.5rem;
        max-height: 100%;
    }
}

.tea-faq-title {
    margin: 0 0 0.65rem;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    color: #E8EDF3;
}

.tea-faq-item {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.tea-faq-item summary {
    padding: 0.55rem 0;
    font-size: 12px;
    font-weight: 600;
    color: #B8D0FF;
    cursor: pointer;
    list-style: none;
}

.tea-faq-item summary::-webkit-details-marker {
    display: none;
}

.tea-faq-item summary:hover {
    color: #E8EDF3;
}

.tea-faq-item p {
    margin: 0 0 0.65rem;
    font-size: 12px;
    line-height: 1.5;
    color: #7E8D9F;
}

/* —— Каталог —— */
.tea-catalog-section {
    margin-bottom: 1.5rem;
}

.tea-catalog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .tea-catalog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1000px) {
    .tea-catalog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.tea-catalog-card {
    background: #131923;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.tea-catalog-card:hover {
    border-color: rgba(74, 143, 229, 0.35);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.tea-catalog-card-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.tea-catalog-icon {
    flex-shrink: 0;
    width: 4rem;
    height: 4rem;
    padding: 0.35rem;
    background: rgba(74, 143, 229, 0.08);
    border-radius: 10px;
    object-fit: contain;
}

.tea-catalog-card-meta {
    flex: 1;
    min-width: 0;
}

.tea-catalog-card-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.tea-catalog-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.25;
    color: #E8EDF3;
}

.tea-catalog-badge {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #4A8FE5;
    background: rgba(74, 143, 229, 0.12);
    border: 1px solid rgba(74, 143, 229, 0.25);
    border-radius: 6px;
    padding: 0.2rem 0.45rem;
}

.tea-catalog-desc {
    margin: 0.2rem 0 0;
    font-size: 12px;
    line-height: 1.35;
    color: #7E8D9F;
}

.tea-catalog-tiers {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.tea-catalog-tier {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.65rem;
    width: 100%;
    padding: 0.55rem 0.65rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    font-size: 11px;
    font-family: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s;
}

.tea-catalog-tier:hover {
    border-color: rgba(74, 143, 229, 0.3);
    background: rgba(74, 143, 229, 0.06);
}

.tea-catalog-tier-label {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    color: #7E8D9F;
    font-weight: 600;
    flex-shrink: 0;
    min-width: 0;
}

.tea-catalog-tier-label strong {
    color: #E8EDF3;
    font-weight: 700;
}

.tea-catalog-tier-label em {
    font-style: normal;
    font-size: 10px;
    font-weight: 500;
    color: #5A7A9F;
}

.tea-catalog-tier-cost {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-left: auto;
    color: #B8C4D4;
    line-height: 1;
}

.tea-catalog-berry-item {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.tea-catalog-berry-qty {
    font-size: 18px;
    font-weight: 700;
    color: #E8EDF3;
    line-height: 1;
}

.tea-inline-berry {
    vertical-align: middle;
    margin-left: 2px;
}

.tea-inline-berry--catalog {
    width: 48px;
    height: 48px;
    margin: 0;
    object-fit: contain;
}

.tea-cost-plus {
    color: #5A7A9F;
    margin: 0 0.15rem;
}

.tea-cost-plus--catalog {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0.1rem;
    align-self: center;
}

/* —— Популярные гайды —— */
.tea-more {
    margin: 2rem 0 1.25rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tea-read-also-panel {
    background: #131923;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 1.1rem 1.2rem;
}

.tea-more-title {
    margin: 0 0 0.85rem;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #E8EDF3;
}

.tea-read-also-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

@media (min-width: 520px) {
    .tea-read-also-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

.tea-read-link {
    display: block;
    padding: 0.7rem 0.8rem;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s;
}

.tea-read-link:hover {
    border-color: rgba(74, 143, 229, 0.35);
    background: rgba(74, 143, 229, 0.05);
    text-decoration: none;
}

.tea-read-link-title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: #E8EDF3;
}

.tea-read-link-desc {
    display: block;
    margin-top: 0.25rem;
    font-size: 11px;
    line-height: 1.35;
    color: #7E8D9F;
}

.tea-footer-note {
    margin: 0;
    font-size: 11px;
    color: #5A7A9F;
}
