/* ОБИВО V0.8 — серверные формы, изолированы от унаследованных стилей Craft. */
#overlay .obv-account-panel{color:#18304a;font:14px/1.5 Arial,Helvetica,sans-serif;max-width:530px}
#overlay .obv-account-panel h2{font:800 26px/1.2 Arial,sans-serif;letter-spacing:-.5px;margin:9px 36px 12px 0;color:#18304a}
#overlay .obv-account-panel p{font:14px/1.55 Arial,Helvetica,sans-serif;color:#677f95}
#overlay .obv-account-info{margin:0 0 20px}
#overlay .obv-account-email{color:#0868ff!important;word-break:break-all}
#overlay .obv-account-form{display:grid;gap:13px;margin-top:12px}
#overlay .obv-account-form label{display:flex;flex-direction:column;gap:6px;color:#36506c;font:700 13px/1.45 Arial,sans-serif}
#overlay .obv-account-form input,
#overlay .obv-account-form select,
#overlay .obv-account-form textarea{
 width:100%;max-width:100%;min-width:0;min-height:44px;
 padding:11px 13px;border:1px solid #dce5f1;border-radius:10px;
 background:#fff;color:#1b344e;font:14px/1.4 Arial,sans-serif;
 box-shadow:none;outline:none;box-sizing:border-box;
}
#overlay .obv-account-form textarea{min-height:95px;resize:vertical}
#overlay .obv-account-form input:focus,
#overlay .obv-account-form select:focus,
#overlay .obv-account-form textarea:focus{
 border-color:#0868ff;box-shadow:0 0 0 3px #0868ff1a;
}
#overlay .obv-form-primary,
#overlay .obv-form-secondary{
 display:block;width:100%;border-radius:10px;min-height:46px;
 padding:11px 16px;text-align:center;font:750 14px Arial,sans-serif;
 cursor:pointer;box-sizing:border-box;margin:10px 0 0;
}
#overlay .obv-form-primary{background:#0868ff;color:white;border:1px solid #0868ff}
#overlay .obv-form-primary:disabled{opacity:.6;cursor:wait}
#overlay .obv-form-secondary{background:white;color:#0868ff;border:1px solid #cbdfff}
#overlay .obv-auth-switch{display:flex;align-items:center;justify-content:center;gap:9px;margin:19px 0 10px;font:13px Arial,sans-serif;color:#6d8094}
#overlay .obv-auth-switch button{border:0;background:transparent;color:#0868ff;font:750 13px Arial,sans-serif;padding:4px;cursor:pointer}
#overlay .obv-account-panel .obv-form-error{margin:0;min-height:0;color:#bd3243;font:600 13px/1.4 Arial,sans-serif}
#overlay .obv-account-panel .obv-form-error:empty{display:none}
#overlay .obv-account-panel .obv-form-note{font:12px/1.5 Arial,sans-serif;color:#8da0b3;margin:15px 0 0}
#overlay .modal:has(.obv-account-panel){max-width:min(570px,calc(100vw - 24px));width:100%;padding:32px;border-radius:18px;background:#fff}
@media(max-width:510px){
 #overlay .modal:has(.obv-account-panel){max-height:calc(100dvh - 16px);overflow-y:auto;padding:24px 20px}
 #overlay .obv-account-panel h2{font-size:23px}
}

/* OBIVO V0.24 — private WEB/MAX messaging UI */
.obv-messages-panel{width:min(100%,650px);color:#18314d}
.obv-msg-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:0 0 12px}
.obv-msg-heading h2{margin:0;font-size:24px}
.obv-msg-control{border:1px solid #dce8f7;border-radius:10px;background:#edf5ff;color:#1265c0;padding:9px 12px;font-weight:650;cursor:pointer}
.obv-msg-body{min-height:160px}
.obv-msg-empty{border:1px dashed #d5e0ee;background:#f6f9fd;color:#596c83;border-radius:14px;padding:20px;line-height:1.6}
.obv-msg-threads{display:grid;gap:10px}
.obv-msg-thread{display:flex;flex-direction:column;align-items:flex-start;gap:7px;text-align:left;width:100%;background:#fff;border:1px solid #e0e9f4;border-radius:13px;padding:14px 16px;cursor:pointer}
.obv-msg-thread:hover,.obv-msg-thread:focus-visible{border-color:#1678ef;background:#f5faff}
.obv-msg-thread-title{font-weight:750;font-size:15px}
.obv-msg-preview{font-size:13px;color:#5b708a;white-space:nowrap;overflow:hidden;max-width:100%;text-overflow:ellipsis}
.obv-msg-unread{font-size:12px;font-weight:700;color:#0e69c8;background:#ecf5ff;padding:4px 7px;border-radius:9px}
.obv-msg-subhead{display:flex;flex-direction:column;gap:4px;margin-bottom:12px}
.obv-msg-subhead strong{font-size:16px}
.obv-msg-subhead span{font-size:13px;color:#5b708a}
.obv-msg-history{height:min(52vh,440px);min-height:180px;overflow:auto;display:flex;flex-direction:column;gap:12px;background:#f4f7fb;border-radius:14px;padding:14px}
.obv-msg-bubble{max-width:86%;padding:10px 14px;border-radius:15px;background:#fff;border:1px solid #e1e8ef;overflow-wrap:anywhere;white-space:normal}
.obv-msg-bubble.mine{align-self:flex-end;background:#e4f1ff;border-color:#c7def7}
.obv-msg-bubble.theirs{align-self:flex-start}
.obv-msg-text{white-space:pre-wrap;line-height:1.45;font-size:14px}
.obv-msg-bubble small{display:block;margin-top:6px;color:#718198;text-align:right;font-size:11px}
.obv-msg-compose{display:flex;align-items:flex-end;gap:10px;margin-top:14px}
.obv-msg-compose label{display:flex;flex-direction:column;gap:6px;flex:1;min-width:0;font-size:13px}
.obv-msg-compose textarea{width:100%;box-sizing:border-box;resize:vertical;min-height:62px;max-height:180px;border-radius:12px;border:1px solid #cad6e8;padding:11px 13px;color:#17304d;font-family:inherit;font-size:14px}
.obv-msg-compose button{flex:0 0 auto;padding:14px 18px}
.obv-msg-error{color:#ad2f31;background:#fff2f2;border-radius:9px;padding:12px;font-size:13px}
.obv-msg-hint{color:#72829a;font-size:12px;margin:9px 0}
@media(max-width:600px){.obv-msg-heading h2{font-size:20px}.obv-msg-compose{flex-direction:column;align-items:stretch}.obv-msg-bubble{max-width:94%}.obv-msg-history{min-height:250px;height:45vh}}

/* OBIVO V0.24.1: compose is always stacked; no send button may cover textarea. */
#overlay .obv-messages-panel .obv-msg-compose{
 display:grid;grid-template-columns:minmax(0,1fr);align-items:stretch;gap:10px;
 min-width:0;width:100%;margin:14px 0 0;
}
#overlay .obv-messages-panel .obv-msg-compose label{display:flex;flex-direction:column;min-width:0;width:100%;gap:7px}
#overlay .obv-messages-panel .obv-msg-compose textarea{
 display:block;position:relative;min-width:0;max-width:100%;width:100%;box-sizing:border-box;
 min-height:95px;resize:vertical;line-height:1.5;padding:12px 14px;
}
#overlay .obv-messages-panel .obv-msg-compose button[type=submit]{
 display:block;width:auto;max-width:100%;min-width:155px;
 justify-self:end;align-self:start;margin:0;padding:12px 20px;
}
@media(max-width:600px){
 #overlay .obv-messages-panel .obv-msg-compose button[type=submit]{justify-self:stretch;width:100%}
}
/* Counts are pulled from the authenticated shared inbox, including while chat is closed. */
.obv-site .obv-messages-nav{position:relative;isolation:isolate;padding:8px 5px;min-width:44px;min-height:44px}
.obv-site .obv-messages-nav svg{width:24px;height:24px;stroke-width:1.9}
.obv-site .obv-unread-badge{
 position:absolute;right:-7px;top:-4px;min-width:19px;height:19px;
 padding:0 5px;display:grid;place-items:center;border-radius:100px;
 background:#ed4a3b;border:2px solid #fff;color:#fff;
 font:800 10px/1 Arial,sans-serif;box-sizing:content-box;
}
.obv-site .obv-unread-badge[hidden]{display:none!important}
.obv-site.obv-max-site .obv-messages-nav{min-width:48px;min-height:48px;padding:9px}
.obv-site.obv-max-site .obv-messages-nav svg{width:28px;height:28px;stroke-width:2.05}
.obv-site.obv-max-site .obv-unread-badge{top:0;right:0}
@media(max-width:740px){
 .obv-site .obv-messages-nav{padding:7px;min-width:43px}
 .obv-site .obv-messages-nav svg{width:25px;height:25px}
}
@media(max-width:430px){
 .obv-site .obv-user-nav{gap:4px}
 .obv-site .obv-messages-nav{min-width:40px;padding:6px}
 .obv-site .obv-messages-nav svg{width:25px;height:25px}
}

.listing-photo-editor{display:grid;gap:8px;padding:12px;border:1px solid #dce6f0;border-radius:14px;background:#f5f8fc}
.listing-photo-row{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.listing-photo-row img{width:56px;height:56px;background:#fff;object-fit:contain;border:1px solid #e0e8f1;border-radius:8px}
.listing-photo-editor button,.obv-legal-actions button{font:inherit;font-weight:700;color:#174078;background:#fff;border:1px solid #afc3da;border-radius:10px;min-height:42px;padding:8px 12px;cursor:pointer}
.listing-photo-editor button:disabled,.obv-legal-actions button:disabled{opacity:.52;cursor:default}
.listing-photo-editor button:focus-visible,.obv-legal-actions button:focus-visible{outline:2px solid #1756ad;outline-offset:2px}
.listing-photo-editor>button{justify-self:start}
.obv-legal-dialog{box-sizing:border-box;max-width:48rem;width:calc(100% - 24px);max-height:85dvh;overflow:auto;border:1px solid #dce6f0;border-radius:18px;padding:clamp(16px,4vw,28px);color:#18304a;background:#fff;font:14px/1.5 Arial,sans-serif}
.obv-legal-dialog::backdrop{background:#14283a99}
.obv-legal-decisions:not([hidden]){display:grid;gap:10px;margin-top:20px}
.obv-legal-decisions label{display:flex;align-items:flex-start;gap:10px;cursor:pointer}
.obv-legal-decisions input{flex:none;width:18px;height:18px;margin:2px 0 0;accent-color:#174c98}
.obv-legal-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}
.obv-legal-actions .obv-legal-submit{background:#174c98;color:#fff;border-color:#174c98}
.obv-legal-actions .obv-legal-refuse{color:#982638;border-color:#d8a4ae}

#overlay .obv-owner-card{display:grid;grid-template-columns:clamp(68px,22%,108px) minmax(0,1fr);gap:14px;margin:12px 0;padding:12px;border:1px solid #dce6f0;border-radius:14px;background:#fff}
.obv-owner-media{height:86px;display:grid;grid-template:minmax(0,1fr)/minmax(0,1fr);place-items:center;border-radius:10px;background:#f0f5fa;color:#526881;overflow:hidden}
.obv-owner-media img{width:100%;height:100%;min-width:0;min-height:0;object-fit:contain}
.obv-owner-body{min-width:0;overflow-wrap:anywhere}
.obv-owner-body h3{margin:0 0 3px}
.obv-owner-body p{margin:3px 0 6px}
.obv-owner-status{display:inline-block;background:#edf4fd;color:#174078;padding:2px 8px;border-radius:8px}
.obv-owner-actions{display:flex;flex-wrap:wrap;gap:6px}
#overlay .obv-owner-actions button{font-size:12px;padding:5px 8px;margin:6px 0 0;min-height:38px}
#overlay .obv-owner-editor{max-width:none}
#overlay .modal:has(.obv-owner-editor){max-width:min(680px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;border-top:4px solid #ef8931}


/* OBIVO 2026-12-02 — ordered photo previews, unified across WEB/MAX. */
#overlay .listing-photo-editor{display:grid;gap:12px;padding:15px;background:#f4f8fd;border:1px solid #d5e4f6;border-radius:14px;color:#213951;min-width:0}
#overlay .listing-photo-heading{display:flex;flex-direction:column;gap:4px;font:normal 13px/1.45 Arial,sans-serif}
#overlay .listing-photo-heading strong{font-size:15px;font-weight:750;color:#173b5b}
#overlay .listing-photo-heading span{color:#607991}
#overlay .listing-photo-list{display:grid;gap:9px}
#overlay .listing-photo-row{display:grid;grid-template-columns:84px minmax(0,1fr) auto;align-items:center;gap:11px;padding:9px;background:#fff;border:1px solid #e0eaf4;border-radius:12px;min-width:0}
#overlay .listing-photo-row:first-child{border-color:#ffab55;box-shadow:inset 3px 0 #f28a20}
#overlay .listing-photo-row img{width:84px;height:76px;border-radius:9px;object-fit:contain;background:#f2f6fb;border:0}
#overlay .listing-photo-info{display:flex;flex-direction:column;gap:4px;min-width:0;font:normal 12px/1.4 Arial,sans-serif}
#overlay .listing-photo-info strong{font-size:13px;font-weight:750;color:#1b3d59}
#overlay .listing-photo-info small{color:#71889a}
#overlay .listing-photo-controls{display:flex;gap:5px}
#overlay .listing-photo-controls button{width:37px;min-width:37px;height:39px;min-height:39px;padding:0;display:grid;place-items:center;font-size:19px;border-radius:9px}
@media(max-width:450px){
 #overlay .listing-photo-editor{padding:10px}
 #overlay .listing-photo-row{grid-template-columns:66px minmax(0,1fr);gap:8px}
 #overlay .listing-photo-row img{width:66px;height:68px}
 #overlay .listing-photo-controls{grid-column:1/-1;justify-content:flex-end}
 #overlay .listing-photo-controls button{width:44px;min-width:44px;height:42px}
}
