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

@media (min-width: 900px) {
    .pip-app {
        max-width: 720px;
    }
}

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

.pip-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);
}

.pip-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;
}

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

.pip-hint,
.pip-diameter-hint,
.pip-material-hint {
    margin: 8px 0 0;
    font-size: 13px;
    color: #86868b;
    line-height: 1.4;
}

.pip-mode-chips {
    margin-bottom: 8px;
}

.pip-mode-chips .calc-chip {
    font-size: 13px;
    padding: 8px 12px;
}

.pip-grid {
    display: grid;
    gap: 12px;
    align-items: start;
}

.pip-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pip-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 520px) {
    .pip-grid--two,
    .pip-grid--three {
        grid-template-columns: 1fr;
    }
}

.pip-grid .calc-field {
    margin-bottom: 0;
    min-width: 0;
}

.pip-details {
    padding: 0;
}

.pip-details-summary {
    margin: 0;
    padding: 18px 16px;
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.pip-details-summary::-webkit-details-marker {
    display: none;
}

.pip-extras-chevron {
    margin-left: auto;
    width: 8px;
    height: 8px;
    border-right: 2px solid #86868b;
    border-bottom: 2px solid #86868b;
    transform: rotate(45deg);
    transition: transform 0.15s ease;
    flex-shrink: 0;
}

.pip-details[open] .pip-extras-chevron {
    transform: rotate(-135deg);
    margin-top: 4px;
}

.pip-details-body {
    padding: 0 16px 18px;
    border-top: 1px solid #ececf0;
}

.pip-details-body .calc-field {
    margin-top: 14px;
}

.pip-result-sheet {
    padding: 20px 18px;
    background: #fafafa;
    border: 1px solid #e5e5ea;
    border-radius: 18px;
}

.pip-sheet-meta {
    margin: 0 0 12px;
    font-size: 12px;
    color: #86868b;
    line-height: 1.4;
    text-align: center;
}

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

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

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

.pip-summary-col {
    padding: 12px 10px;
    background: #fff;
    border: 1px solid #ececf0;
    border-radius: 14px;
    text-align: center;
}

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

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

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

.pip-note-inline {
    margin: 0 0 12px;
    padding: 12px 14px;
    background: #fff4e5;
    border: 1px solid #ffd9a8;
    border-radius: 12px;
    font-size: 13px;
    color: #8a4b00;
    line-height: 1.45;
}

.pip-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 16px 0 0;
}

.pip-action {
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    background: #fff;
    color: #333;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.pip-action:hover {
    border-color: #4e73df;
    color: #4e73df;
}

.pip-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

    .pip-print-title {
        margin: 0 0 4px;
        font-size: 18px;
    }

    .pip-print-footer {
        margin-top: 16px;
        font-size: 11px;
        color: #666;
    }
}
