.td-toolbar-download {
    position: relative;
    z-index: 90;
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(189, 74, 120, .18);
}
.td-toolbar-download-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border: 1px solid #bd4a78;
    border-radius: 8px;
    background: #bd4a78;
    color: #fff;
    cursor: pointer;
    gap: 7px;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    min-width: 126px;
    padding: 8px 12px;
}
.td-toolbar-download-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-height: 40px;
    border: 1px solid #bd4a78;
    border-left: 1px solid rgba(255, 255, 255, .24);
    border-radius: 0 8px 8px 0;
    background: #bd4a78;
    color: #fff;
    cursor: pointer;
    padding: 0;
}
.td-toolbar-download-primary:hover,
.td-toolbar-download.is-open .td-toolbar-download-primary {
    background: #a93e69;
    border-color: #a93e69;
}
.td-toolbar-download-caret {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}
.td-toolbar-download .td-preview-svg-icon {
    width: 18px;
    height: 18px;
}

/* Headerless hosts budget the local action row and shell together. */
#create-renewal-app:has(.td-editor-top-bar) { --td-editor-header-height: 0px; }
#create-renewal-app .td-app:has(> .td-editor-top-bar) { display: flex; flex-direction: column; }
.td-editor-top-bar.create-editor-header-space {
  display: flex; align-items: center; justify-content: flex-end; flex: 0 0 56px;
  height: 56px; min-height: 56px; box-sizing: border-box; padding: 0 14px;
  background: #fff; border-bottom: 1px solid #e7e0e3;
}
.td-app > .td-editor-top-bar ~ :is(.td-editor-shell, .td-mobile-editor-shell) {
  flex: 1 1 0; height: auto; min-height: 0;
}
.td-editor-top-bar .td-toolbar-download-primary:disabled { opacity: .45; cursor: not-allowed; }
.td-editor-top-bar .td-toolbar-download-primary:focus-visible { outline: 2px solid #c64b7f; outline-offset: 2px; }

body:has(> #create-renewal-app .td-editor-top-bar) { margin: 0; }
.td-editor-top-bar .td-compact-header-actions > .td-compact-history-actions { order: -1; }

/* Portaled settings must not inherit the hidden desktop toolbar on small screens. */
.create-editor-header-space.td-anchored-download-portal { display: contents !important; }
@media (max-width: 1180px) {
  .create-editor-header .create-editor-brand { flex: 0 0 22px; width: 22px; padding: 0; overflow: visible; }
}

.create-header-template-info {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  width: 100%; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; font: inherit;
}
@media (max-width: 1180px) {
  .create-editor-header .create-editor-header-space { padding-right: 0; }
  .create-editor-header-space .td-compact-header-actions > .create-template-header-info { display: none; }
  .create-editor-header-space .td-compact-header-actions { width: 100%; gap: 12px; }
  .create-editor-header-space .td-compact-history-actions { gap: 12px; }
  .create-editor-header-space .td-compact-history-action { width: 40px; height: 40px; }
  .create-editor-header-space .td-compact-download { margin-left: auto; }
}

.create-header-template-info:hover { background: #fff5fa; }
