.irhvac-tdh {
    direction: rtl;
    max-width: 980px;
    margin: 1rem auto;
    font-family: inherit;
    line-height: 1.75;
}

.irhvac-tdh *,
.irhvac-tdh *::before,
.irhvac-tdh *::after {
    box-sizing: border-box;
}

.irhvac-tdh__form,
.irhvac-tdh__result,
.irhvac-tdh__message,
.irhvac-tdh__details {
    border: 1px solid #d8dde3;
    border-radius: 8px;
    background: #fff;
}

.irhvac-tdh__form {
    padding: 1rem;
}

.irhvac-tdh__intro {
    margin: 0 0 0.4rem;
}

.irhvac-tdh__hint {
    margin: 0 0 1rem;
    color: #5f6872;
}

.irhvac-tdh__section {
    margin: 0 0 1rem;
    padding: 0.9rem;
    border: 1px solid #e1e5e9;
    border-radius: 7px;
}

.irhvac-tdh__section legend {
    padding: 0 0.45rem;
    font-weight: 700;
}

.irhvac-tdh__grid,
.irhvac-tdh__summary {
    display: grid;
    gap: 0.8rem 1rem;
}

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

.irhvac-tdh label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.irhvac-tdh label > span:first-child {
    font-weight: 600;
}

.irhvac-tdh input,
.irhvac-tdh select,
.irhvac-tdh button {
    font: inherit;
}

.irhvac-tdh input[type="text"],
.irhvac-tdh select {
    width: 100%;
    min-height: 42px;
    padding: 0.5rem 0.65rem;
    border: 1px solid #bfc6cd;
    border-radius: 6px;
    background: #fff;
}

.irhvac-tdh input[type="text"] {
    direction: ltr;
    text-align: left;
}

.irhvac-tdh input:focus,
.irhvac-tdh select:focus {
    outline: 2px solid rgba(30, 109, 181, 0.18);
    border-color: #1e6db5;
}

.irhvac-tdh small {
    color: #5f6872;
}

.irhvac-tdh__control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
}

.irhvac-tdh__control input {
    border-radius: 0 6px 6px 0 !important;
}

.irhvac-tdh__control select {
    min-width: 105px;
    border-radius: 6px 0 0 6px !important;
    border-right: 0 !important;
}

.irhvac-tdh__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.irhvac-tdh__actions button {
    min-width: 120px;
    min-height: 42px;
    padding: 0.5rem 1rem;
    border: 1px solid #1e6db5;
    border-radius: 6px;
    cursor: pointer;
}

.irhvac-tdh__actions button[type="submit"] {
    background: #1e6db5;
    color: #fff;
}

.irhvac-tdh__actions .irhvac-tdh__reset {
    background: #fff;
    color: #1e6db5;
}

.irhvac-tdh__message,
.irhvac-tdh__result,
.irhvac-tdh__details {
    margin-top: 1rem;
    padding: 1rem;
}

.irhvac-tdh__message--error {
    border-color: #cf8d8d;
    background: #fff7f7;
}

.irhvac-tdh__message--warning {
    border-color: #d7c28a;
    background: #fffaf0;
}

.irhvac-tdh__message ul {
    margin-bottom: 0;
}

.irhvac-tdh__result h3 {
    margin-top: 0;
}

.irhvac-tdh__primary {
    padding: 0.9rem;
    border: 1px solid #bfcfe0;
    border-radius: 8px;
    background: #f7fafc;
    text-align: center;
}

.irhvac-tdh__primary span,
.irhvac-tdh__primary strong,
.irhvac-tdh__primary small {
    display: block;
}

.irhvac-tdh__primary strong {
    margin: 0.15rem 0;
    font-size: 1.55rem;
}

.irhvac-tdh__summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 1rem 0;
}

.irhvac-tdh__summary div {
    padding: 0.8rem;
    border: 1px solid #dfe3e7;
    border-radius: 7px;
    background: #f8f9fa;
}

.irhvac-tdh__summary span,
.irhvac-tdh__summary strong {
    display: block;
}

.irhvac-tdh__summary strong {
    margin-top: 0.2rem;
    overflow-wrap: anywhere;
}

.irhvac-tdh__table-wrap {
    overflow-x: auto;
}

.irhvac-tdh__table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
}

.irhvac-tdh__table th,
.irhvac-tdh__table td {
    padding: 0.58rem;
    border: 1px solid #dfe3e7;
    text-align: right;
}

.irhvac-tdh__table th {
    width: 42%;
    background: #f5f6f7;
}

.irhvac-tdh__details {
    padding: 0;
    overflow: hidden;
}

.irhvac-tdh__details summary {
    cursor: pointer;
    padding: 0.8rem 1rem;
    background: #f7f8f9;
    font-weight: 700;
}

.irhvac-tdh__details-body {
    padding: 0.9rem 1rem;
}

.irhvac-tdh__details-body > :first-child {
    margin-top: 0;
}

.irhvac-tdh__details-body > :last-child {
    margin-bottom: 0;
}

.irhvac-tdh__formula {
    text-align: center;
    font-weight: 700;
}

.irhvac-tdh__author {
    margin: 0.75rem 0 0;
    color: #5f6872;
    font-size: 0.92rem;
}

@media (max-width: 820px) {
    .irhvac-tdh__grid,
    .irhvac-tdh__summary {
        grid-template-columns: 1fr;
    }

    .irhvac-tdh__form,
    .irhvac-tdh__result,
    .irhvac-tdh__message {
        padding: 0.75rem;
    }
}


.irhvac-tdh__fittings-wrap {
    overflow-x: auto;
    margin-bottom: 0.75rem;
}

.irhvac-tdh__fittings {
    width: 100%;
    min-width: 650px;
    border-collapse: collapse;
}

.irhvac-tdh__fittings th,
.irhvac-tdh__fittings td {
    padding: 0.5rem;
    border: 1px solid #dfe3e7;
    text-align: right;
}

.irhvac-tdh__fittings th {
    background: #f5f6f7;
}

.irhvac-tdh__fittings th:nth-child(2),
.irhvac-tdh__fittings th:nth-child(3) {
    width: 130px;
}

.irhvac-tdh__fittings th:last-child {
    width: 80px;
}

.irhvac-tdh__fittings input {
    min-width: 0;
}

.irhvac-tdh__add-row,
.irhvac-tdh__remove-row {
    min-height: 38px;
    padding: 0.35rem 0.75rem;
    border: 1px solid #8a949e;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

.irhvac-tdh__add-row {
    color: #1e6db5;
    border-color: #1e6db5;
}

.irhvac-tdh__remove-row {
    width: 100%;
    color: #8b2f2f;
    border-color: #c79b9b;
}

.irhvac-tdh__result h4 {
    margin-top: 1.2rem;
}
