.frontend-kl8-calculator {
    color: var(--site-text);
}

.kl8-calculator {
    overflow: hidden;
    border: 1px solid #e4e8ed;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 18px rgba(23, 32, 39, .05);
}

.kl8-calculator__heading {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px 30px;
    border-bottom: 2px solid var(--site-red);
}

.kl8-calculator__heading img {
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.kl8-calculator__heading h1 {
    color: #172027;
    font-size: 26px;
    font-weight: 600;
    line-height: 36px;
}

.kl8-calculator__heading p {
    margin-top: 4px;
    color: #5f6d76;
    font-size: 15px;
    line-height: 24px;
}

.kl8-calculator__form {
    padding: 30px;
}

.kl8-calculator__fieldset {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    align-items: start;
    margin: 0 0 24px;
    padding: 0;
    border: 0;
}

.kl8-calculator__fieldset legend {
    float: left;
    width: 104px;
    padding: 9px 12px 0 0;
    color: #172027;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
}

.kl8-calculator__choices {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.kl8-calculator__choice {
    min-width: 68px;
    height: 42px;
    padding: 0 18px;
    border: 1px solid #d9dee4;
    border-radius: 4px;
    background: #fff;
    color: #333;
    cursor: pointer;
    font-size: 16px;
    transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.kl8-calculator__choice:hover {
    border-color: var(--site-red);
    color: var(--site-red);
}

.kl8-calculator__choice.is-active {
    border-color: #d00811;
    background: #e20c16;
    color: #fff;
}

.kl8-calculator__choice[hidden] {
    display: none;
}

.kl8-calculator__fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 28px;
    margin-top: 6px;
    padding: 26px;
    border: 1px solid #e4e8ed;
    border-radius: 6px;
    background: #fafbfc;
}

.kl8-calculator__fields[hidden] {
    display: none;
}

.kl8-calculator__fields label {
    display: grid;
    grid-template-columns: 126px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: #333;
    font-size: 16px;
}

.kl8-calculator__fields input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #d9dee4;
    border-radius: 4px;
    outline: 0;
    background: #fff;
    color: #172027;
    font-size: 16px;
}

.kl8-calculator__fields input::placeholder {
    color: #959595;
}

.kl8-calculator__fields input:focus {
    border-color: var(--site-red);
    box-shadow: 0 0 0 3px rgba(201, 0, 43, .09);
}

.kl8-calculator__fields input.is-invalid {
    border-color: #c9002b;
}

.kl8-calculator__error {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 4px;
    background: #fdf3f5;
    color: #c9002b;
    font-size: 14px;
    line-height: 22px;
}

.kl8-calculator__actions {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-top: 24px;
}

.kl8-calculator__submit {
    min-width: 126px;
    height: 44px;
    padding: 0 30px;
    border: 0;
    border-radius: 4px;
    background: #e20c16;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
}

.kl8-calculator__submit:hover {
    background: #d00811;
}

.kl8-calculator__amount {
    color: #5f6d76;
    font-size: 16px;
}

.kl8-calculator__amount strong {
    margin: 0 4px;
    color: #c9002b;
    font-size: 20px;
    font-weight: 600;
}

.kl8-calculator__result {
    padding: 0 30px 30px;
}

.kl8-calculator__result h2,
.kl8-calculator__notice h2 {
    position: relative;
    margin-bottom: 18px;
    padding-left: 14px;
    color: #172027;
    font-size: 22px;
    font-weight: 600;
    line-height: 32px;
}

.kl8-calculator__result h2::before,
.kl8-calculator__notice h2::before {
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 0;
    width: 4px;
    border-radius: 2px;
    background: #c9002b;
    content: "";
}

.kl8-calculator__table-wrap {
    overflow-x: auto;
    border: 1px solid #e4e8ed;
    border-radius: 6px;
}

.kl8-calculator__table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    color: #333;
    font-size: 16px;
    text-align: center;
}

.kl8-calculator__table th,
.kl8-calculator__table td {
    height: 52px;
    padding: 8px 16px;
    border-right: 1px solid #e4e8ed;
    border-bottom: 1px solid #e4e8ed;
}

.kl8-calculator__table tr > :last-child {
    border-right: 0;
}

.kl8-calculator__table thead th {
    background: #fdf3f5;
    color: #7a1b30;
    font-weight: 600;
}

.kl8-calculator__table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.kl8-calculator__table tfoot th,
.kl8-calculator__table tfoot td {
    border-bottom: 0;
    background: #f8f9fa;
    font-weight: 600;
}

.kl8-calculator__table tfoot th {
    text-align: left;
}

.kl8-calculator__table tfoot td {
    color: #c9002b;
}

.kl8-calculator__notice {
    margin: 0 30px 30px;
    padding: 22px 24px;
    border-radius: 6px;
    background: #fafbfc;
}

.kl8-calculator__notice h2 {
    margin-bottom: 8px;
    font-size: 18px;
    line-height: 28px;
}

.kl8-calculator__notice p,
.kl8-calculator__noscript {
    color: #5f6d76;
    font-size: 15px;
    line-height: 28px;
}

.kl8-calculator__notice a {
    color: #c9002b;
}

.kl8-calculator__noscript {
    margin: 0 30px 30px;
}

@media (max-width: 900px) {
    .lottery-charts.frontend-kl8-calculator {
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        margin-right: 0;
        margin-left: 0;
    }

    .kl8-calculator__fields {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 700px) {
    .frontend-kl8-calculator .lottery-charts__breadcrumb {
        height: 34px;
        overflow: hidden;
        font-size: 13px;
    }

    .frontend-kl8-calculator .lottery-charts__breadcrumb ol {
        flex-wrap: nowrap;
        align-items: center;
        min-width: 0;
    }

    .frontend-kl8-calculator .lottery-charts__breadcrumb li {
        flex: 0 0 auto;
        min-width: 0;
        white-space: nowrap;
    }

    .frontend-kl8-calculator .lottery-charts__breadcrumb li:not(:last-child)::after {
        margin-right: 5px;
        margin-left: 5px;
    }

    .frontend-kl8-calculator .lottery-charts__breadcrumb li:last-child {
        flex: 1 1 auto;
        overflow: hidden;
    }

    .frontend-kl8-calculator .lottery-charts__breadcrumb li:last-child span {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .kl8-calculator__heading {
        align-items: flex-start;
        padding: 20px 18px;
    }

    .kl8-calculator__heading img {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .kl8-calculator__heading h1 {
        font-size: 21px;
        line-height: 30px;
    }

    .kl8-calculator__form {
        padding: 22px 18px;
    }

    .kl8-calculator__fieldset {
        display: block;
        margin-bottom: 20px;
    }

    .kl8-calculator__fieldset legend {
        float: none;
        width: auto;
        margin-bottom: 10px;
        padding: 0;
    }

    .kl8-calculator__choice {
        min-width: calc((100% - 30px) / 4);
        padding: 0 10px;
    }

    .kl8-calculator__choices--method .kl8-calculator__choice {
        min-width: 96px;
    }

    .kl8-calculator__fields {
        gap: 16px;
        padding: 18px;
    }

    .kl8-calculator__fields label {
        display: block;
    }

    .kl8-calculator__fields label span {
        display: block;
        margin-bottom: 8px;
    }

    .kl8-calculator__actions {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .kl8-calculator__submit {
        width: 100%;
    }

    .kl8-calculator__result {
        padding: 0 18px 22px;
    }

    .kl8-calculator__notice {
        margin: 0 18px 22px;
        padding: 18px;
    }
}
