.tmm-pid-calculator {
    max-width: 850px;
    margin: 30px auto;
    padding: 24px;
    background: #fff;
    box-sizing: border-box;
}

.tmm-pid-calculator *,
.tmm-pid-calculator *::before,
.tmm-pid-calculator *::after {
    box-sizing: border-box;
}

.pid-intro {
    margin-bottom: 22px;
}

.pid-intro > strong {
    display: block;
    margin-bottom: 8px;
    font-size: 24px;
}

.pid-intro p {
    margin-bottom: 0;
}

.pid-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 20px;
}

.pid-field label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
}

.pid-field input,
.pid-field select {
    width: 100%;
    min-height: 44px;
    padding: 9px 11px;
    border: 1px solid #bbb;
    border-radius: 4px;
    background: #fff;
    font-size: 16px;
}

.pid-input-unit {
    display: grid;
    grid-template-columns: 1fr 130px;
    gap: 7px;
}

.pid-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 4px;
    border-radius: 50%;
    background: #eee;
    cursor: help;
    font-size: 12px;
}

.pid-calculate-btn,
.pid-copy-btn {
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.pid-calculate-btn {
    min-height: 46px;
    padding: 10px 22px;
    background: #235C8C;
    color: #fff;
    font-size: 16px;
}

.pid-calculate-btn:hover {
    background: #207337;
}

.pid-error {
    margin-top: 18px;
    padding: 12px 14px;
    border-left: 4px solid #c62828;
    background: #fff3f3;
}

.pid-results {
    margin-top: 28px;
}

.pid-results h3,
.pid-manual-helper h3 {
    margin-top: 0;
}

.pid-result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.pid-result-card {
    padding: 18px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-align: center;
    background: #fafafa;
}

.pid-result-card span {
    display: block;
    font-weight: 600;
}

.pid-result-card strong {
    display: block;
    margin: 6px 0;
    font-size: 26px;
}

.pid-result-card small {
    color: #666;
}

.pid-warning {
    margin: 18px 0 24px;
    padding: 12px 14px;
    border-left: 4px solid #e0a100;
    background: #fffbea;
}

.pid-code-wrap {
    position: relative;
}

.pid-code-wrap pre {
    margin: 0;
    padding: 18px;
    overflow-x: auto;
    border-radius: 6px;
    background: #222;
    color: #f4f4f4;
    line-height: 1.55;
}

.pid-copy-btn {
    margin-top: 10px;
    padding: 8px 15px;
    background: #eee;
    color: #333;
}

.pid-manual-helper {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid #ddd;
}

.pid-suggestion {
    margin-top: 15px;
    padding: 14px;
    border-left: 4px solid #278a43;
    background: #f3faf5;
}

@media (max-width: 700px) {

    .tmm-pid-calculator {
        padding: 18px;
    }

    .pid-grid,
    .pid-result-grid {
        grid-template-columns: 1fr;
    }

    .pid-input-unit {
        grid-template-columns: 1fr;
    }

}