/* Guest entry and management. Isolated from existing member/dealer/admin panels. */
.guest-notice{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:0 0 18px;padding:17px 20px;border:1px solid #c4e1f8;border-radius:15px;background:#eaf6ff;color:#174972;font-size:14px;line-height:1.6}
.guest-notice p{margin:0;flex:1 1 250px}.guest-notice a,.guest-notice button{font:inherit;color:#07549b;font-weight:700}
.guest-contact-extra{margin-top:18px;padding-top:18px;border-top:1px solid #e0eaf3}
.guest-contact-extra .field{margin-bottom:14px}.guest-contact-extra .guest-terms{display:flex;gap:9px;align-items:flex-start;line-height:1.5;margin:15px 0;font-size:13px}.guest-terms input{width:18px;height:18px;flex:none;accent-color:#008767;margin-top:2px}
.guest-primary{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:10px;background:#008767;color:white;padding:12px 19px;font:inherit;font-weight:700;cursor:pointer}
.guest-primary:disabled{opacity:.55;cursor:wait}.guest-secondary{display:inline-flex;justify-content:center;border:1px solid #b8d6ec;border-radius:10px;background:#fff;color:#07549b;padding:11px 17px;font:inherit;text-decoration:none;cursor:pointer}
.guest-password-wrap{display:flex;gap:8px}.guest-password-wrap input{min-width:0;flex:1}.guest-password-wrap button{border:1px solid #cdddeb;background:#f1f7fc;border-radius:8px;padding:0 12px;color:#07549b}
.guest-locked{border:0;padding:0;margin:0;min-width:0;opacity:.45}.guest-locked[disabled]>*{pointer-events:none}.guest-lock-note{padding:12px 16px;background:#f2f7fc;border:1px dashed #b8d1e6;border-radius:12px;color:#486681;line-height:1.6}
.guest-choice{border:1px solid #d6e6f2;border-radius:20px;max-width:580px;width:calc(100% - 30px);padding:25px;box-shadow:0 18px 65px #14375225;color:#183d5c}.guest-choice::backdrop{background:#0d294b77}.guest-choice h2{font-size:23px;margin:0 0 18px}.guest-choice p{line-height:1.7}.guest-choice .guest-primary{width:100%}.guest-choice .guest-choice-links{display:flex;gap:12px;margin-top:20px}.guest-choice .guest-choice-links a{flex:1}.guest-choice-close{float:right;background:none;border:0;font-size:26px;color:#5e7488;cursor:pointer}.guest-success{padding:20px;margin:18px 0;border-radius:15px;background:#ecf9f3;border:1px solid #bce7d4;line-height:1.7}.guest-success a{display:inline-block;margin-top:9px;color:#07549b;font-weight:700}
.guest-management-page{margin:0;background:#f2f7fc;color:#173954;font-family:Arial,sans-serif;line-height:1.5}.guest-management-page *{box-sizing:border-box}.guest-management-page header{background:#07549b;color:#fff;padding:20px 24px}.guest-management-page header>div{max-width:1040px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:16px}.guest-management-page header a{color:#fff;text-decoration:none;font-weight:700}.guest-management-page header select{padding:7px;border:0;border-radius:8px}.guest-management-page main{width:calc(100% - 32px);max-width:1040px;margin:28px auto 50px}.guest-management-page h1{font-size:28px;margin:0 0 7px}.guest-management-page h2{font-size:20px;margin:0 0 15px}.guest-management-page .guest-panel{background:#fff;border:1px solid #d8e6f2;border-radius:18px;padding:24px;box-shadow:0 6px 25px #17497207;margin:18px 0}.guest-management-page .guest-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.guest-management-page label{display:block;font-size:14px;margin:0 0 14px}.guest-management-page input:not([type=checkbox]){display:block;width:100%;font:inherit;padding:12px;border:1px solid #cbddea;border-radius:10px;margin-top:7px;background:#fff;color:#173954}.guest-management-page input:focus-visible,.guest-management-page button:focus-visible,.guest-management-page a:focus-visible{outline:3px solid #abd5fa;outline-offset:2px}.guest-message{padding:14px 18px;background:#e7f4ff;border:1px solid #c5e2f7;border-radius:12px;white-space:pre-line}.guest-message.error{background:#fff1f1;border-color:#ecc4c4;color:#a13434}.guest-management-page .guest-item{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:16px;padding:18px 0;border-top:1px solid #e4edf5}.guest-management-page .guest-item strong{display:block}.guest-management-page .guest-item small{display:block;color:#627c93;margin-top:6px}.guest-management-page .guest-item-actions{display:flex;gap:8px;flex-wrap:wrap}.guest-management-page .guest-item-actions button,.guest-management-page .guest-item-actions a{font-size:13px;padding:9px 12px}.guest-management-page .guest-help{font-size:13px;color:#607a90}.guest-management-page [hidden],.reference-editor-page .guest-notice[hidden],.reference-editor-page .guest-success[hidden]{display:none!important}.guest-login-link{display:block;padding:10px;color:#07549b;text-decoration:none;font-weight:600}
@media(max-width:650px){.guest-management-page .guest-grid{grid-template-columns:1fr}.guest-management-page .guest-panel{padding:18px}.guest-management-page h1{font-size:24px}.guest-choice{padding:20px}.guest-choice .guest-choice-links{flex-direction:column}.guest-notice{padding:14px}.guest-item-actions{width:100%}.guest-management-page .guest-primary{max-width:100%}}

/* Modal belongs to the outer viewport, never the auto-height editor iframe. */
dialog.guest-choice{position:fixed;inset:0;margin:auto;box-sizing:border-box;height:fit-content;width:min(580px,calc(100vw - 32px));max-width:580px;max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain;background:#fff}

/* Compact guest choice, with explicit type sizes in both host documents. */
dialog.guest-choice{width:min(660px,calc(100vw - 32px));max-width:660px;padding:30px;border:1px solid #ddd;border-radius:20px;color:#272727;font-family:Arial,sans-serif;font-size:16px;line-height:1.5;text-align:left;box-shadow:0 14px 40px #0002}
dialog.guest-choice::backdrop{background:rgba(0,0,0,.40)}
dialog.guest-choice h2{margin:3px 38px 24px 0;padding:0;font-family:inherit;font-size:22px;font-weight:600;line-height:1.35;color:#444}
dialog.guest-choice .guest-choice-close{position:absolute;top:25px;right:26px;float:none;padding:0;width:28px;height:28px;background:transparent;border:0;font-size:28px;font-weight:400;line-height:1;color:#666}
dialog.guest-choice .guest-primary{display:flex;align-items:center;justify-content:center;width:100%;min-height:50px;padding:12px 18px;margin:0;border:1px solid #3e927b;border-radius:11px;background:#3e927b;color:white;font-family:inherit;font-size:16px;font-weight:600;line-height:1.4;cursor:pointer;text-align:center}
dialog.guest-choice p{margin:28px 0;font-size:16px;font-weight:400;line-height:1.65;color:#272727}
dialog.guest-choice .guest-choice-links{display:flex;gap:20px;margin:0}
dialog.guest-choice .guest-choice-links a{display:flex;align-items:center;justify-content:center;flex:1;min-width:0;min-height:50px;padding:12px 16px;border:1px solid #00569e;border-radius:11px;background:#fff;color:#00569e;text-decoration:none;font-family:inherit;font-size:16px;font-weight:400;line-height:1.4;text-align:center}
dialog.guest-choice .guest-choice-links a:last-child{background:#00569e;color:#fff;font-weight:600}
dialog.guest-choice button:focus-visible,dialog.guest-choice a:focus-visible{outline:3px solid #84bbec;outline-offset:3px}
@media(max-width:520px){dialog.guest-choice{padding:22px;border-radius:17px}dialog.guest-choice h2{font-size:19px;margin-bottom:22px}dialog.guest-choice .guest-choice-close{top:20px;right:18px}dialog.guest-choice p{font-size:14px;margin:22px 0}dialog.guest-choice .guest-primary,dialog.guest-choice .guest-choice-links a{font-size:14px;min-height:48px}dialog.guest-choice .guest-choice-links{flex-direction:row;gap:10px}}

body.cm-guest-active #main>:not(#cm-guest-screen){display:none!important}body.cm-guest-active #cm-guest-screen{display:block!important}#cm-guest-screen{max-width:1070px;margin:24px auto;padding:0 20px}#cm-guest-screen iframe{background:transparent}
body.guest-embedded{background:transparent}body.guest-embedded>header{display:none}body.guest-embedded main{width:100%;max-width:none;margin:20px 0 24px}body.guest-embedded h1{font-size:26px}body.guest-embedded .guest-panel{margin:18px 0}
@media(max-width:520px){#cm-guest-screen{padding:0 10px;margin:16px auto}body.guest-embedded h1{font-size:23px}}
