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

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

.irhvac-key__form,
.irhvac-key__result,
.irhvac-key__message,
.irhvac-key__details {
    border: 1px solid #d8dde3;
    border-radius: 8px;
    background: #fff;
}

.irhvac-key__form {
    padding: 1rem;
}

.irhvac-key__intro {
    margin: 0 0 1rem;
}

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

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

.irhvac-key__grid,
.irhvac-key__summary {
    display: grid;
    gap: 0.8rem 1rem;
}

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

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

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

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

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

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

.irhvac-key input[type="text"]:focus,
.irhvac-key select:focus {
    outline: 2px solid rgba(30, 109, 181, 0.2);
    border-color: #1e6db5;
}

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

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

.irhvac-key__control select,
.irhvac-key__control b {
    min-width: 86px;
    border-radius: 6px 0 0 6px !important;
    border-right: 0 !important;
}

.irhvac-key__control b {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.65rem;
    border: 1px solid #bfc6cd;
    background: #f3f5f7;
    direction: ltr;
    white-space: nowrap;
    font-weight: 500;
}

.irhvac-key__control--unit b {
    min-width: auto;
}

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

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

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

.irhvac-key__actions .irhvac-key__reset {
    background: #fff;
    color: #1e6db5;
}

.irhvac-key__message,
.irhvac-key__result,
.irhvac-key__details {
    margin-top: 1rem;
    padding: 1rem;
}

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

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

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

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

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

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

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

.irhvac-key__summary strong {
    margin-top: 0.2rem;
    direction: ltr;
    text-align: right;
    overflow-wrap: anywhere;
}

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

.irhvac-key__result-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
}

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

.irhvac-key__result-table th {
    width: 56%;
    background: #f5f6f7;
}

.irhvac-key__result-table td {
    direction: ltr;
}

.irhvac-key__check-result {
    display: grid;
    gap: 0.35rem;
    margin-top: 1rem;
    padding: 0.85rem;
    border: 1px solid #bfcfe0;
    border-radius: 7px;
    background: #f7fafc;
}

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

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

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

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

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

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

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

@media (max-width: 760px) {
    .irhvac-key__grid,
    .irhvac-key__summary {
        grid-template-columns: 1fr;
    }

    .irhvac-key__form {
        padding: 0.75rem;
    }

    .irhvac-key__section {
        padding: 0.75rem;
    }
}
