/* Editor dialogs: loaded after portal-controls, before skins. */
.portal-rule-validation-error { text-align:center !important; color:#f07057 !important; border:0 !important; background:transparent !important; box-shadow:none !important; padding:8px 16px !important; border-radius:0 !important; margin:12px 0; font-weight:400 !important; }
html body.portal-shell :is(.portal-workspace, #topNav, #topHead) .portal-rule-validation-error > button.btn { display:block; width:auto; max-width:100%; margin:6px auto 0; padding:0 !important; border:0 !important; background:transparent !important; box-shadow:none !important; color:inherit !important; font-size:13px !important; font-weight:400 !important; text-decoration:underline; text-underline-offset:3px; }
.portal-rule-discard-dialog .btn-default { border:1px solid var(--portal-box-border,#d5d9df); background:transparent; color:inherit; }
.portal-rule-discard-dialog h2 { margin:0 0 12px; font:600 28px/1.25 "Barlow Condensed","Segoe UI",sans-serif; }
.portal-service-message { padding:16px !important; color:inherit; }
.portal-settings-search-inherited { display:block; font-size:12px; font-weight:400; color:#aaa; margin-top:4px; }
.portal-rule-editor-dialog { box-sizing:border-box; width:calc(var(--portal-form-width, 1200px) + 52px); max-width:calc(100% - 32px); height:calc(100dvh - 64px); max-height:900px; padding:0; border:1px solid #d5d9df; border-radius:10px; background:#fafafa; color:#464b51; overflow:hidden; }
.portal-rule-editor-dialog[open] { display:flex; flex-direction:column; }
.portal-rule-editor-dialog.portal-account-page-dialog { width:700px; }
.portal-rule-editor-dialog.portal-export-page-dialog { width:800px; }
.portal-rule-editor-frame .portal-main .portal-export-page { min-height:0 !important; padding:0 !important; justify-content:flex-start; }
.portal-rule-editor-frame :is(.portal-admin-profile,.portal-password-change) > .row > .col-sm-6 { width:100%; max-width:100%; flex:0 0 100%; }
.portal-rule-editor-frame .portal-password-change > .row > .col-sm-3 { display:none; }
.portal-rule-editor-frame .portal-password-change table table { margin-left:0 !important; }
@media (max-width:600px) {
  .portal-rule-editor-frame .portal-password-change table table { table-layout:fixed; }
  .portal-rule-editor-frame .portal-password-change input { max-width:100%; box-sizing:border-box; }
  .portal-rule-editor-frame .portal-password-change table table > tbody > tr > td { display:block; width:100% !important; height:auto !important; padding:4px 0; overflow-wrap:anywhere; }
  .portal-rule-editor-frame .portal-password-change [id$="lblLoginOK"] { padding-left:0 !important; }
}
.portal-rule-editor-dialog.portal-tray-editor-dialog { width:calc(var(--portal-form-width, 1200px) + 52px); height:calc(100dvh - 64px); max-height:900px; }
.portal-rule-editor-frame .portal-rule-single-tab-strip { display:none !important; }
.portal-tray-editor-dialog h2 { overflow-wrap:anywhere; }
.portal-rss-subscribe-dialog { box-sizing:border-box; width:560px; max-width:calc(100% - 32px); max-height:calc(100dvh - 32px); overflow:auto; padding:24px; border:1px solid #d5d9df; border-radius:10px; background:#fafafa; color:#464b51; font:400 16px/1.5 "Source Sans 3","Segoe UI",sans-serif; }
.portal-rss-subscribe-dialog::backdrop { background:rgba(0,0,0,.65); }
.portal-rss-subscribe-dialog header { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.portal-rss-subscribe-dialog h2 { margin:0; font:600 28px/1.25 "Barlow Condensed","Segoe UI",sans-serif; }
.portal-rss-subscribe-dialog [data-close] { border:0; background:transparent; color:inherit; padding:0 4px; font-size:28px; }
.portal-rss-subscribe-dialog label { display:block; margin:16px 0; }
.portal-rss-subscribe-dialog :is(select,input) { box-sizing:border-box; display:block; width:100%; margin-top:6px; padding:8px 10px; border:1px solid #aaa; border-radius:5px; background:#fff; color:inherit; font:inherit; }
.portal-rss-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:12px; }
.portal-rss-subscribe-dialog [role="status"] { margin:12px 0 0; min-height:24px; }
html[data-portal-skin="dark"] .portal-rss-subscribe-dialog { background:#222; color:#e0e0e0; border-color:#444; }
html[data-portal-skin="dark"] .portal-rss-subscribe-dialog :is(select,input) { background:#1c1c1c; border-color:#555; }
.portal-rule-editor-dialog::backdrop { background:rgba(0,0,0,.65); }
.portal-rule-editor-dialog > header { display:flex; flex:none; align-items:center; justify-content:space-between; gap:16px; padding:16px 22px; border-bottom:1px solid #d5d9df; }
.portal-rule-editor-dialog h2 { margin:0; min-width:0; overflow-wrap:anywhere; font:600 28px/1.25 "Barlow Condensed","Segoe UI",sans-serif; color:inherit; }
.portal-rule-editor-dialog > header button { padding:0 8px; border:0; background:transparent; color:inherit; font:400 28px/1.2 "Source Sans 3",sans-serif; cursor:pointer; }
.portal-rule-editor-body { position:relative; flex:1; min-height:0; background:inherit; }
.portal-rule-editor-dialog iframe { display:block; height:100%; width:100%; border:0; background:#fafafa; }
.portal-rule-editor-loading { position:absolute; inset:0; z-index:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:20px; padding:24px; background:inherit; text-align:center; font:400 16px/1.5 "Source Sans 3",sans-serif; }
.portal-rule-editor-loading[hidden] { display:none; }
.portal-rule-editor-frame :is(#topHead,#topNav,footer,#page-title,.portal-sidebar,.portal-global-sidebar,.portal-page-heading,.portal-settings-search,.portal-customer-brand-row,.portal-page-customer-logo) { display:none !important; }
.portal-rule-editor-frame { margin:0 !important; padding-top:0 !important; padding-bottom:0 !important; min-height:0 !important; }
.portal-rule-editor-frame #wrapper { min-height:0 !important; margin:0 !important; padding-bottom:0 !important; }
.portal-shell.portal-rule-editor-frame #wrapper.portal-workspace { padding-top:0 !important; min-height:0 !important; }
.portal-rule-editor-frame :is(.portal-shell-row,.portal-dual-navigation) { display:block !important; min-height:0 !important; }
.portal-rule-editor-frame .portal-main { margin:0 auto !important; width:100% !important; min-height:0 !important; padding:16px !important; }
.portal-rule-editor-frame .portal-main > section.container { padding-bottom:0 !important; }
/* Full-page trailing spacers should not enlarge framed dialogs. */
.portal-rule-editor-frame .portal-main section.container > br:last-child,
.portal-rule-editor-frame .portal-main section.container > br:has(+ br:last-child) { display:none; }
.portal-rule-editor-frame .portal-main section.container > .row:last-of-type > :last-child > .featured-box:last-child { margin-bottom:0 !important; }
.portal-rule-editor-frame .settingspage > .row > .col-lg-2 { display:none !important; }
.portal-rule-editor-frame .settingspage > .row > .col-lg-10 { width:100% !important; max-width:100% !important; padding-inline:0 !important; }
.portal-rule-editor-frame .portal-all-settings > section.container { padding-top:0 !important; padding-bottom:0 !important; }
.portal-rule-editor-frame .portal-main .portal-section { padding-top:12px; padding-bottom:16px; }
.portal-rule-editor-frame .portal-section:has(.portal-card) > .portal-section-heading { display:none !important; }
html[data-portal-skin="dark"] .portal-rule-editor-dialog { background:#181818; color:#e0e0e0; border-color:#444; }
html[data-portal-skin="dark"] .portal-rule-editor-dialog > header { border-color:#444; }
html[data-portal-skin="dark"] .portal-rule-editor-dialog iframe { background:#181818; }
@media(max-width:600px) { .portal-rule-editor-dialog { max-width:calc(100% - 16px); height:calc(100dvh - 16px); } .portal-rule-editor-dialog > header { padding:12px 14px; } .portal-rule-editor-dialog h2 { font-size:24px; } }

/* Inventory PIN popup reuses the existing scoped native page and controls. */
.portal-pin-editor-dialog { width:900px; }
.portal-pin-editor-dialog h2 { font-size:32px; }
.portal-rule-editor-frame:has([data-portal-control="ClientDetails/InventoryClientDetailsPINCode"], [data-portal-control="ClientDetails/InventoryClientDetailsPINCodeOld"]) .portal-inventory-content { padding:8px 16px 16px; }
.portal-rule-editor-frame [data-portal-control="ClientDetails/InventoryClientDetailsPINCode"] .portal-pin-pair { display:block; margin:0; }
.portal-rule-editor-frame [data-portal-control="ClientDetails/InventoryClientDetailsPINCode"] .portal-pin-pair > .col-lg-6 { display:block; width:100%; padding:0; }
.portal-rule-editor-frame [data-portal-control="ClientDetails/InventoryClientDetailsPINCode"] .portal-pin-pair > .col-lg-6 + .col-lg-6,
.portal-rule-editor-frame .portal-pin-history { display:none; }
.portal-rule-editor-frame [data-portal-control="ClientDetails/InventoryClientDetailsPINCode"] .portal-pin-form { min-height:300px; padding:22px !important; }
.portal-rule-editor-frame [data-portal-control="ClientDetails/InventoryClientDetailsPINCode"] .portal-pin-body { display:flex; justify-content:center; padding-block:20px; }
.portal-rule-editor-frame [data-portal-control="ClientDetails/InventoryClientDetailsPINCode"] .portal-settings-table { width:540px !important; max-width:100%; }
html body.portal-rule-editor-frame [data-portal-control="ClientDetails/InventoryClientDetailsPINCode"] .portal-settings-table td { font-size:22px; }
html body.portal-rule-editor-frame [data-portal-control="ClientDetails/InventoryClientDetailsPINCode"] .portal-input { width:100% !important; }
html body.portal-rule-editor-frame [data-portal-control="ClientDetails/InventoryClientDetailsPINCode"] .portal-input input { font-size:30px !important; min-height:56px; line-height:1.3 !important; font-weight:600; letter-spacing:.12em; text-align:center; padding:10px 8px !important; }
.portal-rule-editor-frame [data-portal-control="ClientDetails/InventoryClientDetailsPINCode"] .portal-button { width:100% !important; font-size:20px; min-height:52px; }
.portal-rule-editor-frame [data-portal-control="ClientDetails/InventoryClientDetailsPINCodeOld"] { font-size:22px; }
@media(max-width:600px) {
 .portal-rule-editor-frame [data-portal-control="ClientDetails/InventoryClientDetailsPINCode"] .portal-pin-form { padding:16px !important; }
 html body.portal-rule-editor-frame [data-portal-control="ClientDetails/InventoryClientDetailsPINCode"] .portal-input input { font-size:28px !important; }
}

.portal-rule-editor-frame [data-portal-control="ClientDetails/InventoryClientDetailsPINCode"] .portal-settings-table { display:block; width:540px !important; max-width:100%; }
.portal-rule-editor-frame [data-portal-control="ClientDetails/InventoryClientDetailsPINCode"] .portal-settings-table > tbody { display:block; }
.portal-rule-editor-frame [data-portal-control="ClientDetails/InventoryClientDetailsPINCode"] .portal-settings-table > tbody > tr { display:grid; grid-template-columns:120px minmax(0,1fr); align-items:center; }
.portal-rule-editor-frame [data-portal-control="ClientDetails/InventoryClientDetailsPINCode"] .portal-settings-table > tbody > tr > td { display:block; width:auto !important; min-width:0; }
html body.portal-rule-editor-frame [data-portal-control="ClientDetails/InventoryClientDetailsPINCode"] .portal-input input { width:100% !important; min-width:0; box-sizing:border-box; }
@media(max-width:600px) {
 .portal-rule-editor-frame [data-portal-control="ClientDetails/InventoryClientDetailsPINCode"] .portal-settings-table > tbody > tr { grid-template-columns:minmax(0,1fr); }
}

html body.portal-rule-editor-frame [data-portal-control="ClientDetails/InventoryClientDetailsPINCode"] .portal-compact-heading h2 { font-size:30px !important; }
.portal-rule-editor-frame [data-portal-control="ClientDetails/InventoryClientDetailsPINCode"] .portal-heading-subtitle { font-size:18px; }
.portal-rule-editor-frame [data-portal-control="ClientDetails/InventoryClientDetailsPINCodeOld"] [id$="divPIN"] > div { font-size:48px !important; font-weight:600; letter-spacing:.12em; }

html body.portal-rule-editor-frame [data-portal-control="ClientDetails/InventoryClientDetailsPINCode"] .portal-settings-table,
html body.portal-rule-editor-frame [data-portal-control="ClientDetails/InventoryClientDetailsPINCode"] .portal-settings-table td { background:transparent !important; color:var(--portal-text,#464b51) !important; font-size:22px !important; }

.portal-rule-editor-frame [data-portal-control="ClientDetails/InventoryClientDetailsPINCode"] > .row:has(.portal-tabs),
.portal-rule-editor-frame [data-portal-control="ClientDetails/InventoryClientDetailsPINCode"] [id$="divUninstallPIN"] { display:none; }

/* Grid rows must retain native table colspan semantics in the optional SMS form. */
.portal-rule-editor-frame [data-portal-control="ClientDetails/InventoryClientDetailsPINCode"] .portal-settings-table > tbody > tr > td[colspan="2"] { grid-column:1 / -1; text-align:left; }
.portal-rule-editor-frame [id$="divBlacklistPIN2SMS"] h4 { margin:0; font:600 18px/1.4 var(--portal-font); }
html body.portal-rule-editor-frame [id$="divBlacklistPIN2SMS"] .portal-input input { font-size:20px !important; letter-spacing:normal; text-align:left; min-height:48px; }
@media(min-width:601px) {
 .portal-rule-editor-frame [id$="divBlacklistPIN2SMS"] .portal-settings-table > tbody > tr > td:first-child { white-space:nowrap; }
}
