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

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

.irhvac-psych__form,
.irhvac-psych__result,
.irhvac-psych__message,
.irhvac-psych__details {
    border: 1px solid #d8dde3;
    border-radius: 8px;
    background: #fff;
}

.irhvac-psych__form {
    padding: 1rem;
}

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

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

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

.irhvac-psych__grid,
.irhvac-psych__summary {
    display: grid;
    gap: 0.8rem 1rem;
}

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

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

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

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

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

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

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

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

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

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

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

.irhvac-psych__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-psych__control--unit b {
    min-width: 52px;
}

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

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

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

.irhvac-psych__actions .irhvac-psych__reset {
    background: #fff;
    color: #1e6db5;
}

.irhvac-psych__message,
.irhvac-psych__result,
.irhvac-psych__details {
    margin-top: 1rem;
    padding: 1rem;
}

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

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

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

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

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

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

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

.irhvac-psych__summary strong,
.irhvac-psych__summary small {
    direction: ltr;
    text-align: right;
    overflow-wrap: anywhere;
}

.irhvac-psych__summary strong {
    margin-top: 0.2rem;
}

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

.irhvac-psych__table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
}

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

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

.irhvac-psych__table td {
    direction: ltr;
}

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

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

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

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

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

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

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

.irhvac-psych [hidden] {
    display: none !important;
}

@media (max-width: 780px) {
    .irhvac-psych__grid,
    .irhvac-psych__summary {
        grid-template-columns: 1fr;
    }

    .irhvac-psych__form {
        padding: 0.75rem;
    }

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