/* Keep the library independent of the marketing-page and editor-card themes. */
.saved-styles-dialog{position:fixed;inset:0;margin:auto;box-sizing:border-box;width:min(580px,calc(100% - 32px));max-height:calc(100dvh - 32px);padding:0;border:1px solid #dce6df;border-radius:20px;background:#fafcf9;color:#193b30;box-shadow:0 24px 90px #0b251c33;font-family:'DM Sans',sans-serif;overflow:hidden}
.saved-styles-dialog[open]{display:flex;flex-direction:column}
.saved-styles-dialog::backdrop{background:#142c2366;backdrop-filter:blur(7px)}
.saved-styles-dialog>header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:23px 24px 20px;border-bottom:1px solid #e0e8e2;flex-shrink:0}
.saved-styles-eyebrow{font-size:10px;line-height:1.4;letter-spacing:.12em;font-weight:700;color:#52816b}
.saved-styles-dialog h2{outline:none;margin:5px 0 0;font-size:27px;line-height:1.15;color:#193b30}
.saved-styles-context{font-size:13px;line-height:1.5;color:#61786b;margin:8px 0 0}
.saved-styles-dialog [data-style-close]{width:40px;height:40px;margin:-5px -8px 0 0;padding:0;border:0;border-radius:10px;background:transparent;color:#627c70;font-size:27px;cursor:pointer;flex:none}
.saved-styles-body{padding:18px 24px 10px;overflow:auto;overscroll-behavior:contain;min-height:0}
.saved-style-list-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0 0 14px}
.saved-style-list-heading h3{display:flex;align-items:center;gap:8px;font-size:13px;line-height:1.3;margin:0;font-weight:600}
.saved-style-list-heading [data-style-count]{display:grid;place-items:center;min-width:22px;height:22px;padding:0 4px;box-sizing:border-box;border-radius:6px;background:#eaf2ed;color:#557565;font-size:11px;font-variant-numeric:tabular-nums}
.saved-style-create{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;padding:8px 11px;border:1px solid #b8d3c4;border-radius:9px;background:#fff;color:#23664b;font:600 12px 'DM Sans',sans-serif;white-space:nowrap;cursor:pointer}
.saved-style-create svg{width:16px;height:16px;flex:none}
.saved-style-list{display:grid;gap:10px}
.saved-style-row{position:relative;display:grid;grid-template-columns:42px minmax(0,1fr) 32px;column-gap:12px;row-gap:0;align-items:center;border:1px solid #d9e5dd;border-radius:13px;padding:15px;background:#fff}
.saved-style-row.is-editing{border-color:#83b29a;box-shadow:0 0 0 1px #83b29a33}
.saved-style-swatch{grid-row:1;display:grid;place-items:center;width:42px;height:42px;border-radius:10px;background:#eff5f0}
.saved-style-swatch svg{width:36px;height:30px}
.saved-style-copy{grid-row:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.saved-style-copy h4{font-size:15px;font-weight:600;line-height:1.3;overflow-wrap:anywhere;margin:0;color:#193b30}
.saved-style-copy p{color:#61786b;font-size:12px;line-height:1.4;margin:0}
.saved-style-last{display:inline-block;font-size:10px;line-height:1.4;color:#23664b;background:#e8f4ec;border-radius:4px;padding:2px 5px}
.saved-style-row-controls{grid-column:1/-1;display:flex;gap:8px;margin-top:14px}
.saved-style-row-controls button,.saved-style-confirm,.saved-style-cancel{min-height:40px;border:1px solid #b8d3c4;border-radius:8px;padding:8px 14px;font:600 12px/1.3 'DM Sans',sans-serif;white-space:nowrap;cursor:pointer}
.saved-style-apply{flex:1;background:#217a59;color:#fff;border-color:#217a59!important}
.saved-style-update{min-width:106px;background:#f7fbf8;color:#23664b}
.saved-style-confirm{background:#217a59;color:#fff;border-color:#217a59}
.saved-style-cancel{background:#fff;color:#496454;border-color:#ceded4}
.saved-style-legacy{grid-column:1/-1;margin:12px 0 0;padding:7px 9px;border-radius:7px;background:#f5f3eb;color:#706548;font-size:11px;line-height:1.45}
.saved-styles-dialog .saved-style-actions{display:block;grid-column:1/-1;grid-row:2;min-width:0;margin:0;padding:0;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;overflow:visible}
.saved-style-actions>summary{position:absolute;right:12px;top:14px;width:32px;min-height:40px;display:grid;place-items:center;list-style:none;margin:0;padding:0;border:0;border-radius:8px;background:transparent;color:#61786b;font:700 22px/1 'DM Sans',sans-serif;cursor:pointer}
.saved-style-actions>summary::-webkit-details-marker{display:none}
.saved-style-actions>summary::after{content:none!important}
.saved-style-actions>summary:hover,.saved-style-actions[open]>summary{background:#edf4ef;color:#23664b}
.saved-style-actions>div{display:flex;align-items:center;gap:18px;margin-top:12px;padding-top:6px;border-top:1px solid #e4ece6}
.saved-style-actions:not([open])>div{display:none}
.saved-style-actions button{min-height:40px;border:0;background:transparent;color:#286e4f;padding:6px 2px;font:600 12px 'DM Sans',sans-serif;cursor:pointer}
.saved-style-actions button:last-child{color:#995442;margin-left:auto}
.saved-style-update-panel{grid-column:1/-1;margin-top:12px;padding:12px;border:1px solid #d2e5d9;border-radius:9px;background:#f0f7f2}
.saved-style-update-panel strong{display:block;overflow-wrap:anywhere;font-size:13px;font-weight:600;line-height:1.4}
.saved-style-update-panel p{font-size:12px;line-height:1.45;color:#5c7566;margin:5px 0 12px}
.saved-style-update-panel>div{display:flex;justify-content:flex-end;gap:8px}
.saved-style-save{padding:14px;margin:0 0 14px;border:1px solid #c5dece;border-radius:12px;background:#edf5ef}
.saved-style-form-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.saved-style-form-heading label{font-size:13px;font-weight:600;color:#284e3d}
.saved-style-save [data-style-cancel]{border:0;background:transparent;color:#496454;min-height:32px;padding:4px 0;font:600 12px 'DM Sans',sans-serif;cursor:pointer}
.saved-style-fields{display:flex;gap:8px;align-items:center}
.saved-style-save input{box-sizing:border-box;min-width:0;width:100%;height:44px;border:1px solid #c6d7cc;border-radius:8px;padding:8px 11px;font:400 16px 'DM Sans',sans-serif;color:#193b30;background:#fff}
.saved-style-save [type=submit]{border:1px solid #217a59;border-radius:8px;background:#217a59;color:#fff;min-height:44px;padding:9px 13px;font:600 12px 'DM Sans',sans-serif;white-space:nowrap;cursor:pointer}
#savedStyleHelp{font-size:12px;line-height:1.45;color:#5c7566;margin:8px 0 0}
#savedStyleHelp.is-conflict{color:#9b4b36}
.saved-style-notice{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;margin:0 0 14px;border-radius:9px;background:#eaf4ed}
.saved-style-feedback{min-width:0;font-size:12px;line-height:1.45;color:#2a6447;margin:0}
.saved-style-feedback.is-error{color:#9b4b36}
.saved-style-undo,.saved-style-undo-remove{flex:none;border:0;background:transparent;color:#23664b;font:600 12px 'DM Sans',sans-serif;min-height:36px;padding:4px 0;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.saved-style-empty{padding:28px 12px 32px;text-align:center}
.saved-style-empty svg{display:block;width:34px;height:34px;margin:0 auto 12px;color:#83a393}
.saved-style-empty strong{display:block;font-size:15px;font-weight:600}
.saved-style-empty p{font-size:12px;line-height:1.5;color:#61786b;max-width:260px;margin:7px auto 0}
.saved-styles-dialog :is(.saved-style-includes,.saved-style-recovery){margin:14px 0 0;padding:0;border:0!important;border-top:1px solid #e0e8e2!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;overflow:visible}
.saved-styles-dialog :is(.saved-style-includes,.saved-style-recovery)>summary{display:flex;align-items:center;justify-content:flex-start;gap:7px;min-height:44px;padding:0;margin:0;list-style:none;color:#61786b;font-size:12px;line-height:1.4;font-weight:500;cursor:pointer}
.saved-styles-dialog :is(.saved-style-includes,.saved-style-recovery)>summary::-webkit-details-marker{display:none}
.saved-styles-dialog :is(.saved-style-includes,.saved-style-recovery)>summary::after{content:none!important}
.saved-styles-dialog :is(.saved-style-includes,.saved-style-recovery)>summary>span:last-child{margin-left:auto;font-size:15px}
.saved-styles-dialog :is(.saved-style-includes,.saved-style-recovery)[open]>summary>span:last-child{transform:rotate(180deg)}
.saved-style-includes-content{padding:0 0 12px}
.saved-style-includes dl{display:grid;grid-template-columns:1fr 1fr;gap:14px 20px;margin:2px 0 12px}
.saved-style-includes dt{font-size:12px;font-weight:600;color:#294d3b;line-height:1.4}
.saved-style-includes dd{font-size:12px;color:#61786b;line-height:1.45;margin:3px 0 0}
.saved-style-includes .saved-style-includes-content>p{font-size:11px;line-height:1.5;margin:0;padding:0;color:#61786b}
.saved-style-recovery [data-style-removed-count]{font-size:11px;color:#718477}
.saved-style-recovery [data-style-removed]>div{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid #e7ede8;min-height:44px;padding:3px 0}
.saved-style-recovery [data-style-removed]>div>span{font-size:12px;line-height:1.4;overflow-wrap:anywhere;min-width:0;color:#61786b}
.saved-style-recovery button{flex:none;min-height:40px;padding:6px 0;border:0;background:transparent;color:#23664b;font:600 12px 'DM Sans',sans-serif;cursor:pointer}
/* Marketing footer rules must not inflate this editor dialog. */
.saved-styles-dialog.saved-styles-dialog>footer{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:7px!important;width:auto!important;box-sizing:border-box;margin:0!important;padding:12px 24px!important;border-top:1px solid #e0e8e2!important;background:#f6f9f6!important;color:#61786b!important;font-size:11px;line-height:1.5;flex:none}
.saved-styles-dialog>footer>span{display:grid;place-items:center}
.saved-styles-dialog>footer svg{width:15px;height:15px}
.saved-styles-dialog :is(input,button,summary):focus-visible{outline:2px solid #267957;outline-offset:3px}
.saved-styles-dialog button:disabled{opacity:.5;cursor:default}
.saved-styles-dialog button:not(:disabled):hover{filter:brightness(.97)}
.saved-styles-dialog [hidden]{display:none!important}
/* One shared entry point beside Format, with no extra mobile toolbar row. */
.studio-appbar .saved-styles-open{display:inline-flex;align-items:center;justify-content:center;gap:7px;flex:none;margin-left:auto;min-height:40px;padding:0 11px;border:1px solid #ceded4;border-radius:10px;background:#fff;color:#29483a;font:600 12px/1.2 'DM Sans',sans-serif;white-space:nowrap;cursor:pointer;order:1}
.studio-appbar .saved-styles-open svg{width:18px;height:18px;flex:none}
.studio-appbar .saved-styles-open:hover{background:#eff7f2;border-color:#8cbba4}
.studio-appbar .saved-styles-open:focus-visible{outline:2px solid #267957;outline-offset:3px}
.studio-appbar:has(.saved-styles-open:not([hidden])) .studio-format-picker{margin-left:0!important;order:2}
.studio-appbar:has(>.studio-history:not([hidden])) .saved-styles-open{margin-left:0}
.studio-appbar:has(.saved-styles-open:not([hidden])) .studio-export-open{order:3}
.quick-edit .quick-style-slot .saved-style-quick{display:inline-flex;align-items:center;gap:6px;padding:4px 0;min-height:36px;background:none;border:0;color:#287a56;font:600 12px 'DM Sans',sans-serif;cursor:pointer}
@media(max-width:900px){
 .studio-appbar .saved-styles-open{width:36px;min-width:36px;min-height:44px;padding:0;border:0;background:transparent}
 .studio-appbar .saved-styles-open span{display:none}
 .studio-appbar:has(.saved-styles-open:not([hidden])) .project-mobile-save-label{display:none}
 .studio-appbar:has(.saved-styles-open:not([hidden])) .project-mobile-save-status{width:12px;justify-content:center}
}
@media(max-width:600px){
 .saved-styles-dialog{width:calc(100% - 16px);border-radius:17px}
 .saved-styles-dialog>header{padding:18px 16px 16px}
 .saved-styles-dialog h2{font-size:24px}
 .saved-styles-body{padding:14px 16px 8px}
 .saved-style-row{grid-template-columns:38px minmax(0,1fr) 32px;column-gap:10px;padding:12px}
 .saved-style-swatch{width:38px;height:38px}
 .saved-style-actions>summary{top:11px;right:10px}
 .saved-style-copy h4{font-size:14px}
 .saved-style-row-controls{margin-top:12px}
 .saved-style-row-controls button{flex:1;min-height:44px}
 .saved-style-create{min-height:44px;padding-inline:9px;font-size:12px}
 .saved-styles-dialog.saved-styles-dialog>footer{padding:10px 16px!important}
}
@media(max-width:480px){
 .studio-appbar:has(.saved-styles-open:not([hidden])){gap:4px!important}
 .studio-appbar:has(.saved-styles-open:not([hidden])) .studio-home,.studio-appbar:has(.saved-styles-open:not([hidden])) .studio-home img{width:68px;min-width:68px}
 .studio-appbar:has(.saved-styles-open:not([hidden])) .project-save-button{min-width:0;padding-inline:6px}
}
@media(max-width:380px){
 .saved-style-list-heading{gap:8px}
 .saved-style-create{padding-inline:7px}
 .saved-style-create svg{display:none}
 .saved-style-fields{flex-direction:column;align-items:stretch}
 .saved-style-update-panel>div{justify-content:stretch}
 .saved-style-update-panel button{flex:1;min-width:0}
}

.quick-edit .quick-style-slot .saved-style-quick svg{width:16px;height:16px;flex:none}
.studio-appbar .saved-styles-open[hidden],.quick-edit .quick-style-slot .saved-style-quick[hidden]{display:none!important}
@media(max-width:900px){.quick-edit .quick-style-slot .saved-style-quick{min-height:44px}}
