.ebook-checkout {
    container-type: inline-size;
    color: #21252a;
    text-align: left;
    --ebook-line: #dce0d7;
    --ebook-muted: #515950;
}

.ebook-checkout *, .ebook-checkout *::before, .ebook-checkout *::after { box-sizing: border-box; }
.ebook-checkout form { margin: 0; }
.ebook-checkout [hidden] { display: none !important; }

.ebook-checkout .ebook-checkout__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.ebook-checkout__section, .ebook-checkout__finish {
    display: grid;
    gap: 16px;
}

.ebook-checkout__section + .ebook-checkout__section, .ebook-checkout__finish {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--ebook-line);
}

.ebook-checkout .ebook-checkout__heading {
    margin: 0;
    color: #21252a;
    font: inherit;
    font-size: 17px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -.02em;
}

.ebook-checkout__section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 12px;
}

.ebook-checkout__country, .ebook-checkout .ebook-checkout__note,
.ebook-checkout .ebook-checkout__status, .ebook-checkout .ebook-checkout__recovery {
    margin: 0;
    color: var(--ebook-muted);
    font-size: 13px;
    line-height: 1.5;
}

.ebook-checkout__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px 16px; }
.ebook-checkout__grid--address { grid-template-columns: minmax(0, 1fr) minmax(76px, 29%); }
.ebook-checkout__wide { grid-column: 1 / -1; }
.ebook-checkout__field { display: flex; flex-direction: column; justify-content: flex-end; gap: 5px; min-width: 0; }

.ebook-checkout__field label {
    margin: 0;
    color: #394136;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;
}

.ebook-checkout .ebook-checkout__field input {
    display: block;
    width: 100%;
    min-width: 0;
    height: 44px;
    margin: 0;
    padding: 9px 12px;
    border: 1px solid #a6aea2;
    border-radius: 10px;
    background: #fff;
    color: #21252a;
    box-shadow: none;
    font: inherit;
    font-size: 16px;
    line-height: 1.4;
}

.ebook-checkout :is(input, button, a):focus-visible {
    outline: 3px solid #507215;
    outline-offset: 2px;
}

.ebook-checkout .ebook-checkout__check, .ebook-checkout .ebook-checkout__toggle {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 400;
    cursor: pointer;
}

.ebook-checkout .ebook-checkout__toggle { align-items: center; min-height: 32px; font-weight: 600; }
.ebook-checkout input[type="checkbox"] {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: #96d320;
}
.ebook-checkout .ebook-checkout__toggle input { margin: 0; }

.ebook-checkout__company {
    min-width: 0;
    margin: -4px 0 0;
    padding: 15px;
    border: 1px solid var(--ebook-line);
    border-radius: 12px;
    background: #f6f8f1;
}

.ebook-checkout__lookup {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
}
.ebook-checkout__grid--company { margin-top: 14px; }
.ebook-checkout .ebook-checkout__status:not(:empty) { margin-top: 8px; }

.ebook-checkout .ebook-checkout__ares, .ebook-checkout .ebook-checkout__submit {
    appearance: none;
    min-height: 44px;
    margin: 0;
    color: #21252a;
    font: inherit;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    cursor: pointer;
}
.ebook-checkout .ebook-checkout__ares {
    border: 1px solid #798373;
    border-radius: 10px;
    padding: 9px 14px;
    background: #fff;
    font-size: 13px;
}
.ebook-checkout .ebook-checkout__ares:hover { background: #e8efd9; }
.ebook-checkout .ebook-checkout__ares:disabled { opacity: .65; cursor: progress; }

.ebook-checkout__finish { gap: 12px; }
.ebook-checkout a { color: #344b16; text-decoration: underline; text-underline-offset: 2px; }
.ebook-checkout .ebook-checkout__submit {
    width: 100%;
    padding: 13px 18px;
    border: 0;
    border-radius: 28px;
    background: #96d320;
    font-size: 16px;
}
.ebook-checkout .ebook-checkout__submit:hover { color: #fff; background: #21252a; }
.ebook-checkout .ebook-checkout__submit + .ebook-checkout__note { text-align: center; }
.ebook-checkout .ebook-checkout__recovery { margin-top: 18px; text-align: center; }
.ebook-checkout #ebook-order-errors:not(:empty) { margin-bottom: 16px; }
.ebook-checkout .g-recaptcha { margin: 3px 0; }

@container (min-width: 420px) {
    .ebook-checkout__grid:not(.ebook-checkout__grid--address) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ebook-checkout__grid.ebook-checkout__grid--company { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
}
@container (max-width: 303px) {
    .ebook-checkout .g-recaptcha { zoom: .8; }
    .ebook-checkout__company { padding: 10px; }
    .ebook-checkout .ebook-checkout__ares { padding-inline: 10px; }
}
@container (max-width: 245px) {
    .ebook-checkout .g-recaptcha { zoom: .7; }
}
