.checkout-page { padding: 10px 0 30px; }
.checkout-page__header { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; margin-bottom:20px; flex-wrap:wrap; }
.checkout-page__title { margin:0 0 8px; font-size:34px; line-height:1.1; font-weight:800; }
.checkout-page__subtitle { color:#6c757d; max-width:820px; font-size:15px; }
.checkout-page__meta { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.checkout-badge { display:inline-flex; align-items:center; gap:6px; padding:8px 14px; border-radius:999px; background:#f4f5f7; font-weight:700; }
.checkout-badge--accent { background:#111827; color:#fff; }
.checkout-layout { display:grid; grid-template-columns:minmax(0,1fr) 360px; gap:24px; }
.checkout-layout__full { grid-column:1 / -1; }
.checkout-card, .checkout-summary, .checkout-empty { background:#fff; border:1px solid #e8eaef; border-radius:18px; box-shadow:0 10px 30px rgba(16,24,40,.05); }
.checkout-card { padding:20px; }
.checkout-card__header { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; margin-bottom:16px; flex-wrap:wrap; }
.checkout-card__title { font-size:20px; font-weight:800; }
.checkout-card__hint { color:#6c757d; font-size:14px; max-width:640px; }
.checkout-items { display:flex; flex-direction:column; gap:12px; }
.checkout-item-group { border:1px solid #eceef3; border-radius:16px; background:#ffffff; overflow:hidden; box-shadow:0 4px 14px rgba(16,24,40,.04); }
.checkout-item-group + .checkout-item-group { margin-top:14px; }
.checkout-item { display:grid; grid-template-columns:28px minmax(0,1fr) auto; gap:14px; align-items:center; border:1px solid #eceef3; border-radius:14px; padding:14px 16px; background:#fcfcfd; }
.checkout-item-group > .checkout-item { border:none; border-radius:0; background:transparent; box-shadow:none; padding:16px 18px; }
.checkout-item__check { align-self:flex-start; padding-top:2px; }
.checkout-item__body { min-width:0; }
.checkout-item__title-row { display:flex; flex-wrap:wrap; gap:8px; align-items:flex-start; }
.checkout-item__title { font-weight:700; color:#111827; cursor:pointer; margin:0; line-height:1.35; font-size:16px; min-width:0; word-break:break-word; overflow-wrap:anywhere; position:relative; top:2px; }
.checkout-item__meta { display:flex; gap:12px; flex-wrap:wrap; color:#8a8f98; font-size:13px; line-height:1.4; }
.checkout-items-soft-offer { margin-top:4px; }
.checkout-soft-bundle-link {
    display:inline-flex;
    align-items:flex-start;
    gap:10px;
    padding:0;
    border:none;
    background:transparent;
    color:#4f46e5;
    font-size:14px;
    font-weight:700;
    line-height:1.35;
    cursor:pointer;
    text-align:left;
}
.checkout-soft-bundle-link:hover { color:#3730a3; }
.checkout-soft-bundle-link--block {
    width:100%;
    padding:14px 16px;
    border:1px dashed #cfd7e4;
    border-radius:14px;
    background:#f8faff;
    color:#111827;
}
.checkout-soft-bundle-link--block:hover {
    border-color:#b8c4d8;
    background:#f3f7ff;
    color:#111827;
}
.checkout-soft-bundle-link__icon {
    flex:0 0 auto;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:26px;
    height:26px;
    border-radius:999px;
    background:#111827;
    color:#fff;
    font-size:12px;
    line-height:1;
    margin-top:1px;
}
.checkout-soft-bundle-link__content {
    display:flex;
    flex-direction:column;
    gap:2px;
    min-width:0;
}
.checkout-soft-bundle-link__title {
    font-size:14px;
    font-weight:800;
    line-height:1.35;
}
.checkout-soft-bundle-link__text {
    font-size:13px;
    font-weight:500;
    line-height:1.4;
    color:#6b7280;
}
.checkout-item__actions { display:flex; align-items:center; justify-content:flex-end; gap:12px; min-width:140px; }
.checkout-item__price { text-align:right; min-width:90px; white-space:nowrap; }
.checkout-item__old-price { color:#98a2b3; text-decoration:line-through; font-size:13px; }
.checkout-item__new-price { font-size:20px; font-weight:800; color:#111827; line-height:1.1; }
.checkout-remove-btn { width:34px; height:34px; border:none; border-radius:50%; background:#f3f4f6; font-size:22px; line-height:1; cursor:pointer; }
.checkout-remove-btn:hover { background:#e5e7eb; }
.checkout-tag { display:inline-flex; align-items:center; padding:5px 10px; border-radius:999px; background:#eef2f7; color:#334155; font-size:12px; font-weight:700; line-height:1.2; }
.checkout-tag--success { background:#e8f7ee; color:#1f7a45; }
.checkout-preview-link { display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; border-radius:50%; background:#f3f4f6; transition:.2s ease; flex:0 0 auto; }
.checkout-preview-link:hover { background:#e5e7eb; }
.checkout-preview-link img { width:16px; height:16px; display:block; }
.checkout-item-group__addons { padding:0 16px 16px 58px; display:flex; flex-direction:column; gap:10px; position:relative; background:linear-gradient(180deg, #ffffff 0%, #fbfcff 100%); }
.checkout-item-group__addons::before { content:''; position:absolute; left:31px; top:0; bottom:16px; width:2px; background:#e6eaf0; border-radius:2px; }
.checkout-item--addon, .checkout-item.is-addon { background:#fafbff; }
.checkout-item--addon { margin:0; width:100%; border:1px dashed #d8dee8; border-radius:12px; box-shadow:none; position:relative; padding:12px 14px; }
.checkout-item--addon::before { content:''; position:absolute; left:-18px; top:22px; width:14px; height:12px; border-left:2px solid #d8dee8; border-bottom:2px solid #d8dee8; border-bottom-left-radius:8px; }
.checkout-item--addon .checkout-item__title { font-size:14px; font-weight:600; line-height:1.35; }
.checkout-item--addon .checkout-item__meta { font-size:12px; color:#98a2b3; }
.checkout-item--addon .checkout-item__new-price { font-size:17px; }
.checkout-item--addon .checkout-item__check { align-self:flex-start; padding-top:2px; }
.checkout-item.is-unselected { opacity:.55; }
.checkout-item.is-addon-disabled { opacity:.45; }
.checkout-item.is-addon-disabled .checkout-loop-checker { pointer-events:none; }
.checkout-loading { pointer-events:none; opacity:.65; }
.checkout-item[data-position] { transition:.2s ease; }
.checkout-offers-grid { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:14px; }
.checkout-offer { border:1px solid #eceef3; border-radius:14px; padding:16px; background:linear-gradient(180deg, #ffffff 0%, #fafbff 100%); }
.checkout-offer__title { font-weight:800; font-size:16px; color:#111827; line-height:1.35; }
.checkout-offer__desc { margin-top:8px; color:#6b7280; font-size:14px; min-height:40px; }
.checkout-offer__price { margin-top:12px; display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.checkout-offer__old { text-decoration:line-through; color:#98a2b3; }
.checkout-offer__new { font-size:22px; font-weight:800; color:#111827; }
.checkout-cross-grid { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:14px; }
.checkout-cross-card { border:1px solid #eceef3; border-radius:14px; overflow:hidden; background:#fff; display:flex; flex-direction:column; }
.checkout-cross-card__image-wrap { aspect-ratio:16 / 9; background:#f8fafc; overflow:hidden; }
.checkout-cross-card__image { width:100%; height:100%; object-fit:cover; display:block; }
.checkout-cross-card__body { padding:14px; display:flex; flex-direction:column; gap:10px; height:100%; }
.checkout-cross-card__title { font-weight:700; line-height:1.35; }
.checkout-cross-card__title a { text-decoration:none; color:#111827; }
.checkout-cross-card__footer { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.checkout-cross-card__price { font-size:20px; font-weight:800; color:#111827; }
.checkout-summary { position:sticky; top:20px; padding:20px; }
.checkout-summary__title { font-size:22px; font-weight:800; margin-bottom:18px; }
.checkout-summary__row { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid #eef1f4; }
.checkout-summary__row--total { font-size:18px; padding-top:16px; padding-bottom:16px; }
.checkout-summary__auth-box { margin:18px 0; padding:14px; border:1px solid #e8eaef; border-radius:14px; background:#fafbfd; }
.checkout-summary__auth-title { font-weight:700; margin-bottom:6px; }
.checkout-summary__auth-text { color:#6b7280; font-size:14px; margin-bottom:10px; }
.checkout-summary__note { margin-top:12px; color:#6b7280; font-size:15px; line-height:1.45; }
.checkout-empty { padding:48px 24px; text-align:center; }
.checkout-empty__icon { font-size:44px; margin-bottom:12px; }
.checkout-empty__title { font-size:24px; font-weight:800; margin-bottom:8px; }
.checkout-empty__text { max-width:620px; margin:0 auto; color:#6b7280; }
.mt20 { margin-top:20px; }
.hidden { display:none !important; }

/* Полноширинный блок быстрого диплома */
.checkout-document-quick-card { overflow:hidden; }
.checkout-document-quick-card.is-collapsed { display:none; }
.checkout-document-quick__topbar {
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:12px;
    margin-bottom:14px;
}
.checkout-document-quick__title {
    font-size:20px;
    font-weight:800;
    color:#111827;
    margin:0;
}
.checkout-document-quick__close {
    flex:0 0 auto;
    appearance:none;
    border:1px solid #d7dde7;
    background:#fff;
    color:#111827;
    border-radius:999px;
    padding:8px 12px;
    font-size:13px;
    font-weight:700;
    cursor:pointer;
    transition:.2s ease;
}
.checkout-document-quick__close:hover {
    background:#f8fafc;
    border-color:#b9c3d0;
}
.checkout-document-quick__chooser-title {
    font-size:15px;
    font-weight:700;
    color:#111827;
    margin-bottom:12px;
}
.checkout-document-quick__chooser {
    display:flex;
    flex-wrap:nowrap;
    gap:10px;
    margin-bottom:8px;
    overflow-x:auto;
    overflow-y:hidden;
    padding-bottom:6px;
    scroll-behavior:smooth;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:thin;
    scrollbar-color:#c7d0dc transparent;
}
.checkout-document-quick__chooser::-webkit-scrollbar { height:8px; }
.checkout-document-quick__chooser::-webkit-scrollbar-track { background:transparent; }
.checkout-document-quick__chooser::-webkit-scrollbar-thumb { background:#c7d0dc; border-radius:999px; }
.checkout-document-switch {
    appearance:none;
    border:1px solid #d7dde7;
    background:#fff;
    color:#111827;
    border-radius:999px;
    padding:10px 14px;
    font-size:14px;
    font-weight:700;
    cursor:pointer;
    transition:.2s ease;
    flex:0 0 auto;
    white-space:nowrap;
}
.checkout-document-switch:hover { border-color:#b9c3d0; background:#f8fafc; }
.checkout-document-switch.is-active { background:#111827; color:#fff; border-color:#111827; }
.checkout-document-quick__email-note { margin-top:0; margin-bottom:12px; }
.checkout-document-quick__surface { margin-top:14px; padding-top:18px; border-top:1px solid #eef1f4; }
.checkout-document-editor-mount { min-height:120px; overflow:hidden; }
.checkout-document-editor-placeholder {
    padding:16px;
    border:1px dashed #d7dde7;
    border-radius:14px;
    background:#fafbfd;
    color:#6b7280;
    font-size:14px;
}
.checkout-document-editor-placeholder--error { color:#b42318; border-color:#f1c0c0; background:#fff6f6; }
.checkout-document-quick-card.is-loading .checkout-document-editor-mount { opacity:.7; }
#checkoutDocumentQuickMount,
#checkoutDocumentQuickMount #editor,
#checkoutDocumentQuickMount .editor-form,
#checkoutDocumentQuickMount .row,
#checkoutDocumentQuickMount [class*="col-"] { min-width:0; }
#checkoutDocumentQuickMount #editor { margin:0; overflow:hidden; }
#checkoutDocumentQuickMount .editor-form { margin:0; overflow:hidden; }
#checkoutDocumentQuickMount .row { row-gap:24px; }
#checkoutDocumentQuickMount .editor-templates-title { margin-bottom:12px; }
#checkoutDocumentQuickMount .service-price span { font-weight:800; }
#checkoutDocumentQuickMount .editor-preview {
    position:relative;
    max-width:450px;
    width:100%;
    margin:0 auto 24px;
}
#checkoutDocumentQuickMount .editor-preview__img { max-width:100%; height:auto; display:block; }
#checkoutDocumentQuickMount .editor-preview-main {
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    padding:0 40px;
    padding-top:130px;
}
#checkoutDocumentQuickMount .editor-preview__field {
    width:100%;
    max-width:100%;
    word-break:break-word;
    overflow-wrap:anywhere;
}
#checkoutDocumentQuickMount .editor-templates { height:618px; overflow:auto; }

@media (max-width: 1199px) {
    .checkout-layout { grid-template-columns:1fr; }
    .checkout-summary { position:static; }
}

@media (max-width: 991px) {
    .checkout-offers-grid, .checkout-cross-grid { grid-template-columns:1fr; }

    #checkoutDocumentQuickMount .row {
        display:flex;
        flex-wrap:wrap;
        row-gap:18px;
    }
    #checkoutDocumentQuickMount .col-md-4,
    #checkoutDocumentQuickMount .col-md-5,
    #checkoutDocumentQuickMount .col-md-3 {
        flex:0 0 100%;
        width:100%;
        max-width:100%;
    }
    #checkoutDocumentQuickMount .editor-preview { margin-bottom:0; }
    #checkoutDocumentQuickMount .editor-templates {
        height:auto;
        max-height:none;
        display:flex;
        flex-wrap:nowrap;
        gap:8px;
        overflow-x:auto;
        overflow-y:hidden;
        padding-bottom:6px;
        text-align:left;
        -webkit-overflow-scrolling:touch;
    }
    #checkoutDocumentQuickMount .editor-templates-loop {
        flex:0 0 110px;
        margin-bottom:0;
    }
    #checkoutDocumentQuickMount .editor-templates-loop img {
        width:100%;
        display:block;
    }
}

@media (max-width: 767px) {
    .checkout-page { padding:8px 0 24px; }
    .checkout-page__title { font-size:28px; }
    .checkout-page__subtitle { font-size:14px; line-height:1.45; }
    .checkout-card, .checkout-summary, .checkout-empty { border-radius:16px; }
    .checkout-card, .checkout-summary { padding:14px; }
    .checkout-card__header { margin-bottom:12px; gap:8px; }
    .checkout-card__title { font-size:18px; }
    .checkout-card__hint { font-size:13px; line-height:1.4; }
    .checkout-items { gap:10px; }
    .checkout-item-group { border-radius:14px; }
    .checkout-item-group + .checkout-item-group { margin-top:10px; }
    .checkout-item-group > .checkout-item { padding:12px 12px 10px; }
    .checkout-item { grid-template-columns:22px minmax(0,1fr); gap:10px 12px; padding:12px; border-radius:12px; }
    .checkout-item__title-row { gap:6px; margin-bottom:4px; }
    .checkout-item__title { font-size:14px; line-height:1.3; font-weight:700; }
    .checkout-item__meta { gap:6px 10px; font-size:11px; line-height:1.35; }
    .checkout-items-soft-offer { margin-top:2px; }
    .checkout-soft-bundle-link--block { padding:12px; }
    .checkout-soft-bundle-link__title { font-size:13px; }
    .checkout-soft-bundle-link__text { font-size:12px; }
    .checkout-item__actions { grid-column:2; display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:2px; min-width:0; width:100%; }
    .checkout-item__price { margin-top:0; text-align:left; display:flex; align-items:baseline; gap:8px; min-width:0; white-space:normal; flex-wrap:wrap; }
    .checkout-item__old-price { font-size:12px; }
    .checkout-item__new-price { font-size:18px; }
    .checkout-item__remove { margin-top:0; flex:0 0 auto; }
    .checkout-remove-btn { width:30px; height:30px; font-size:20px; }
    .checkout-tag { padding:4px 8px; font-size:11px; }
    .checkout-preview-link { width:24px; height:24px; }
    .checkout-preview-link img { width:14px; height:14px; }
    .checkout-item-group__addons { padding:0 10px 10px 28px; gap:8px; background:#fbfcff; }
    .checkout-item-group__addons::before { left:15px; top:0; bottom:10px; width:2px; background:#e3e8ef; }
    .checkout-item--addon { margin-left:0; width:100%; padding:10px 10px 10px 12px; border-radius:10px; }
    .checkout-item--addon::before { left:-10px; top:18px; width:8px; height:8px; }
    .checkout-item--addon .checkout-item__title { font-size:15px; line-height:1.3; }
    .checkout-item--addon .checkout-item__meta { font-size:11px; }
    .checkout-item--addon .checkout-item__new-price { font-size:16px; }
    .checkout-summary__title { font-size:20px; margin-bottom:14px; }
    .checkout-summary__row { padding:9px 0; font-size:14px; }
    .checkout-summary__row--total { font-size:16px; }
    .checkout-summary__auth-box { margin:14px 0; padding:12px; border-radius:12px; }
    .checkout-summary__auth-title { font-size:14px; }
    .checkout-summary__auth-text, .checkout-summary__note { font-size:12px; line-height:1.45; }
    .checkout-offer, .checkout-cross-card__body { padding:12px; }
    .checkout-offer__title, .checkout-cross-card__title { font-size:14px; line-height:1.35; }
    .checkout-offer__desc { font-size:13px; min-height:0; }
    .checkout-offer__new, .checkout-cross-card__price { font-size:18px; }

    .checkout-document-quick__topbar {
        flex-direction:column;
        align-items:stretch;
        gap:10px;
        margin-bottom:12px;
    }
    .checkout-document-quick__title {
        font-size:18px;
    }
    .checkout-document-quick__close {
        width:100%;
        text-align:center;
    }
    .checkout-document-switch {
        font-size:13px;
        padding:9px 12px;
    }
    .checkout-document-editor-placeholder {
        padding:12px;
        font-size:13px;
    }

    #checkoutDocumentQuickMount .editor-preview {
        max-width:320px;
    }
    #checkoutDocumentQuickMount .editor-preview-main {
        padding:0 24px;
        padding-top:96px;
    }
    #checkoutDocumentQuickMount .editor-preview__field {
        line-height:1.2 !important;
    }
    #checkoutDocumentQuickMount .editor-templates-loop {
        flex:0 0 96px;
    }
}

@media (max-width: 420px) {
    .checkout-page__meta { width:100%; }
    .checkout-badge { padding:7px 12px; font-size:12px; }
    .checkout-item-group > .checkout-item { padding:10px 10px 8px; }
    .checkout-item { padding:10px; gap:8px 10px; }
    .checkout-item__title { font-size:15px; }
    .checkout-item__meta { font-size:10px; }
    .checkout-item__new-price { font-size:17px; }
    .checkout-item__actions { gap:8px; }
    .checkout-item-group__addons { padding:0 8px 8px 24px; }
    .checkout-item-group__addons::before { left:12px; }
    .checkout-item--addon .checkout-item__title { font-size:12px; }
    .checkout-item--addon .checkout-item__new-price { font-size:15px; }
    .checkout-tag { font-size:10px; padding:4px 7px; }

    #checkoutDocumentQuickMount .editor-preview {
        max-width:280px;
    }
    #checkoutDocumentQuickMount .editor-preview-main {
        padding:0 18px;
        padding-top:84px;
    }
    #checkoutDocumentQuickMount .editor-templates-loop {
        flex:0 0 88px;
    }
}