/* A focused editor with a correctly proportioned live card preview. */
.profile-ad-dialog:has(.profile-ad-editor){box-sizing:border-box;width:min(700px,calc(100% - 24px));max-height:88dvh;padding:18px;border-radius:16px}
.profile-ad-dialog:has(.profile-ad-editor) header{position:sticky;top:-18px;z-index:2;align-items:center;margin:0 0 10px;padding:10px 0;background:#fff;border-bottom:1px solid #dce6f0}
.profile-ad-dialog:has(.profile-ad-editor) header h2{font-size:18px;line-height:1.3;margin:0}
.profile-ad-dialog:has(.profile-ad-editor) [data-ad-close]{flex:0 0 32px;width:32px;min-height:32px;padding:0;border-radius:8px}
.profile-ad-dialog:has(.profile-ad-editor)>p{font-size:12px;line-height:1.45;margin:7px 0}
.profile-ad-editor{display:grid;grid-template-columns:minmax(0,1fr) 186px;align-items:start;gap:20px;margin-top:12px}
.profile-ad-dialog .profile-ad-editor form{min-width:0;width:100%;max-width:none;margin:0;gap:10px}
.profile-ad-dialog .profile-ad-editor label{min-width:0;font-size:12px;line-height:1.35;gap:4px}
.profile-ad-dialog .profile-ad-editor input:not([type=checkbox]),.profile-ad-dialog .profile-ad-editor select{box-sizing:border-box;max-width:100%;width:100%;min-height:36px;padding:7px 8px;font-size:13px}
.profile-ad-editor label>small{font-size:10px;color:#5e7188;line-height:1.4}
.profile-ad-editor input[type=file]{font-size:11px!important;padding:6px!important}
.profile-ad-editor form>button{min-height:40px;padding:8px 10px;font-size:12px;white-space:normal}
.profile-ad-live-preview{position:sticky;top:55px;display:flex;flex-direction:column;align-items:center;gap:10px;min-width:0;padding:12px;border:1px solid #d6e3ef;border-radius:12px;background:#f3f7fb}
.profile-ad-live-preview .preview-caption{font-size:9px;line-height:1.5;color:#59718a;text-align:center;letter-spacing:.5px}
.profile-preview-card{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;gap:6px;width:150px;min-height:222px;padding:18px 10px 12px;border:1px solid #d4e1ee;border-top:3px solid #bc922c;border-radius:13px;background:linear-gradient(145deg,#fff,#edf4fb);box-shadow:0 4px 0 #cbd9e7,0 7px 12px #173d6112;text-align:center;color:#173858}
.profile-preview-photo{display:grid;place-items:center;width:90px;height:98px;flex-shrink:0;overflow:hidden;border:2px solid #fff;border-radius:15px;background:#e6eef6;box-shadow:0 2px 5px #17385820;color:#698198;font-size:11px}
.profile-preview-photo img{display:block;width:100%;height:100%;object-fit:contain;background:#e6eef6}
.profile-preview-photo [hidden]{display:none!important}
.profile-preview-card strong{max-width:100%;font-size:12px;line-height:1.4;overflow-wrap:anywhere}
.profile-preview-card>span:not(.profile-preview-photo){font-size:11px;line-height:1.4;overflow-wrap:anywhere}
.profile-preview-card>small{max-width:100%;font-size:10px;line-height:1.4;overflow-wrap:anywhere}
.profile-ad-live-preview [data-preview-link]{max-width:100%;font-size:10px;line-height:1.4;color:#1d628f;overflow-wrap:anywhere;text-align:center}
.profile-ad-dialog:has(.profile-ad-editor)>.ad-photo-preview{display:none}
@media(max-width:560px){.profile-ad-dialog:has(.profile-ad-editor){padding:14px}.profile-ad-editor{grid-template-columns:minmax(0,1fr);gap:14px}.profile-ad-live-preview{position:static;order:-1;display:grid;grid-template-columns:150px minmax(0,1fr);align-items:center;padding:10px;column-gap:12px}.profile-ad-live-preview>.preview-caption:first-child{grid-column:1/-1}.profile-preview-card{grid-column:1;grid-row:2/4;min-height:196px;padding:12px 8px}.profile-preview-photo{width:78px;height:84px}.profile-ad-dialog .profile-ad-editor input:not([type=checkbox]),.profile-ad-dialog .profile-ad-editor select{font-size:16px}.profile-ad-dialog:has(.profile-ad-editor) header{top:-14px}}
.profile-ad-dialog:has(#profileAdBuy):has(.profile-ad-editor){width:min(680px,calc(100% - 24px));padding:18px;max-height:88dvh}
@media(max-width:560px){.profile-ad-dialog:has(#profileAdBuy):has(.profile-ad-editor){padding:14px}}
