/* Калькулятор плитки */
.tlc-app {
    max-width: 560px;
}

.tlc-app [hidden] {
    display: none !important;
}

.tlc-section {
    margin-bottom: 22px;
    padding: 18px 16px;
    background: #fff;
    border: 1px solid #e5e5ea;
    border-radius: 18px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.tlc-section--price {
    background: linear-gradient(165deg, #f8faff 0%, #fff 55%);
    border-color: #dbe4ff;
}

.tlc-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 700;
    color: #1d1d1f;
    letter-spacing: -0.02em;
}

.tlc-icon {
    font-size: 1.15em;
    line-height: 1;
}

.tlc-room-grid,
.tlc-tile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 12px;
    align-items: start;
    width: 100%;
}

.tlc-field-full {
    grid-column: 1 / -1;
}

.tlc-room-grid .calc-field,
.tlc-tile-grid .calc-field {
    margin-bottom: 0 !important;
    min-width: 0;
}

.tlc-tile-fields--locked input {
    background: #f5f5f7;
    color: #6e6e73;
}

.tlc-mode-chips {
    margin-bottom: 14px;
}

.tlc-layout-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.tlc-layout-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 14px;
    border: 2px solid #e5e5ea;
    border-radius: 14px;
    background: #fafafa;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    font-family: inherit;
}

.tlc-layout-btn:hover {
    border-color: #b8c4f0;
    background: #f8f9ff;
}

.tlc-layout-btn.is-active {
    border-color: #4e73df;
    background: #f0f4ff;
    box-shadow: 0 0 0 1px #4e73df;
}

.tlc-layout-label {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    line-height: 1.25;
}

.tlc-layout-waste {
    font-size: 12px;
    color: #6e6e73;
}

.tlc-range-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tlc-range-row input[type="range"] {
    flex: 1;
    min-width: 0;
    accent-color: #4e73df;
}

.tlc-range-row output {
    min-width: 42px;
    font-size: 15px;
    font-weight: 700;
    color: #4e73df;
    text-align: right;
}

.tlc-range-hint {
    margin: 8px 0 0;
    font-size: 13px;
    color: #6e6e73;
    line-height: 1.45;
}

.tlc-result-sheet {
    padding: 16px 14px;
    background: #fafafa;
    border: 1px solid #e5e5ea;
    border-radius: 16px;
}

.tlc-sheet-meta {
    margin: 0 0 14px;
    font-size: 12px;
    color: #6e6e73;
    text-align: center;
    line-height: 1.45;
}

.tlc-result-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 14px 0 10px;
}

.tlc-action {
    min-height: 40px;
    padding: 8px 16px;
    border: 1px solid #e5e5ea;
    border-radius: 999px;
    background: #fff;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.tlc-action:hover {
    border-color: #4e73df;
    color: #4e73df;
    background: #f8f9ff;
}

.tlc-action:disabled {
    opacity: 0.5;
    cursor: default;
}

.tlc-result-hero {
    text-align: center;
    margin-bottom: 18px;
}

.tlc-hero-sub {
    margin: 8px 0 0;
    font-size: 14px;
    color: #6e6e73;
    line-height: 1.45;
}

.tlc-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.tlc-summary-col {
    padding: 12px 10px;
    background: #f5f5f7;
    border-radius: 14px;
    text-align: center;
}

.tlc-summary-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6e6e73;
    margin-bottom: 6px;
}

.tlc-summary-big {
    font-size: 17px;
    font-weight: 700;
    color: #1d1d1f;
    line-height: 1.2;
}

.tlc-summary-sub {
    margin-top: 4px;
    font-size: 11px;
    color: #86868b;
    line-height: 1.35;
}

.tlc-cost {
    margin-top: 16px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #f0f4ff 0%, #fff 100%);
    border: 1px solid #dbe4ff;
    border-radius: 14px;
}

.tlc-cost-label {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6e6e73;
}

.tlc-cost-total {
    font-size: 24px;
    font-weight: 700;
    color: #4e73df;
    margin-bottom: 10px;
}

.tlc-cost-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
    color: #333;
}

.tlc-cost-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(78, 115, 223, 0.12);
}

.tlc-cost-list li:last-child {
    border-bottom: none;
}

.tlc-cost-list small {
    display: block;
    color: #86868b;
    font-size: 11px;
    font-weight: 400;
}

#tlc-price-fields[hidden] {
    display: none !important;
}

@media print {
    body.tlc-print-body {
        margin: 0;
        padding: 16px;
        background: #fff;
        color: #111;
    }

    .tlc-print-title {
        margin: 0 0 4px;
        font-size: 18px;
        font-weight: 700;
        text-align: center;
    }

    .tlc-print-footer {
        margin: 14px 0 0;
        font-size: 11px;
        color: #86868b;
        text-align: center;
    }

    .tlc-result-sheet {
        border: none;
        background: #fff;
        padding: 0;
    }

    .tlc-result-actions,
    .calc-note {
        display: none !important;
    }
}

@media (max-width: 520px) {
    .tlc-summary {
        grid-template-columns: 1fr;
    }

    .tlc-layout-grid {
        grid-template-columns: 1fr;
    }
}
