/* SOHBERA PLATINUM · Chat Tools V1
   Presentation-only. Retains original elements, IDs, event listeners and media upload flows.
   Loaded after existing Platinum files.
*/
body.sohbera-platinum{
  --pt-ink:#233f4e;
  --pt-sub:#6e8793;
  --pt-teal:#258597;
  --pt-teal-dark:#1c7587;
  --pt-border:#dce8eb;
  --pt-panel:#fbfdfe;
  --pt-fog:#f1f6f7;
  --pt-card-shadow:0 22px 65px rgba(33,65,79,.16),0 2px 8px rgba(33,65,79,.03);
}

/* Shared heads: uniform text hierarchy, accessible close controls */
body.sohbera-platinum :is(.emoji-panel,.sticker-panel,.effects-panel,.youtube-compose-card,.image-compose-card,.file-compose-card){
  color:var(--pt-ink);
  background:var(--pt-panel);
  border:1px solid var(--pt-border);
  box-shadow:var(--pt-card-shadow);
  border-radius:19px;
  overscroll-behavior:contain;
}
body.sohbera-platinum :is(.emoji-panel-head,.sticker-panel-head,.effects-panel-head,.youtube-compose-head,.image-compose-head,.file-compose-head){
  box-sizing:border-box;
  height:66px;
  min-height:66px;
  padding:0 19px;
  background:linear-gradient(110deg,#fff 0%,#f0f7f8 100%);
  border-bottom:1px solid var(--pt-border);
}
body.sohbera-platinum :is(.emoji-panel-head,.sticker-panel-head,.effects-panel-head,.youtube-compose-head,.image-compose-head,.file-compose-head) :is(small){
  display:block;font-size:9px;font-weight:850;letter-spacing:.19em;color:#328c9b;
}
body.sohbera-platinum :is(.emoji-panel-head,.sticker-panel-head,.effects-panel-head,.youtube-compose-head,.image-compose-head,.file-compose-head) b{
  display:block;font-size:17px;line-height:1.2;letter-spacing:-.035em;font-weight:850;color:#223e4d;margin-top:4px;
}
body.sohbera-platinum :is(.emoji-panel-head,.sticker-panel-head,.effects-panel-head,.youtube-compose-head,.image-compose-head,.file-compose-head) button{
  display:grid;place-items:center;flex:0 0 34px;
  width:34px;height:34px;min-width:34px;
  background:#fff;color:#6c8793;border:1px solid #dce7eb;border-radius:11px;
  font-size:16px;transition:background .15s,border-color .15s,color .15s;
}
body.sohbera-platinum :is(.emoji-panel-head,.sticker-panel-head,.effects-panel-head,.youtube-compose-head,.image-compose-head,.file-compose-head) button:hover{
  background:#eaf4f5;color:#206d80;border-color:#b8d5db;
}
body.sohbera-platinum :is(.emoji-panel,.sticker-panel,.effects-panel,.youtube-compose-card,.image-compose-card,.file-compose-card) :is(button,input,a):focus-visible{
  outline:2px solid #3f9fac;outline-offset:2px;
}
body.sohbera-platinum :is(.emoji-panel,.sticker-panel,.effects-panel,.youtube-compose-card,.image-compose-card,.file-compose-card) button{font-family:inherit}

/* Emoji picker */
body.sohbera-platinum .emoji-panel{
  width:min(415px,calc(100vw - 20px));
  max-height:min(565px,calc(100dvh - var(--top) - var(--composer) - 28px));
}
body.sohbera-platinum .emoji-search{
  margin:15px 16px 11px;padding:0 12px;height:44px;
  border:1px solid #dbe8eb;border-radius:13px;background:#f0f5f7;
  color:var(--pt-sub);gap:9px;
}
body.sohbera-platinum .emoji-search:focus-within,
body.sohbera-platinum .sticker-search:focus-within{
  border-color:#85bdc6;box-shadow:0 0 0 3px #e5f4f5;
}
body.sohbera-platinum .emoji-search input{font-size:12px;color:var(--pt-ink)}
body.sohbera-platinum .emoji-search input::placeholder{color:#90a2ab}
body.sohbera-platinum .emoji-search button,
body.sohbera-platinum .sticker-search button{width:27px;height:27px;border-radius:8px}
body.sohbera-platinum .emoji-tabs{
  gap:5px;padding:0 15px 11px;border-bottom:1px solid #e6eef0;
}
body.sohbera-platinum .emoji-tabs button{
  height:35px;width:35px;flex-basis:35px;border-radius:10px;background:transparent;
}
body.sohbera-platinum .emoji-tabs button.active{
  background:#e3f2f3;box-shadow:inset 0 0 0 1px #b6d9df;
}
body.sohbera-platinum .emoji-panel-body{
  padding:12px 14px 14px;min-height:220px;max-height:340px;background:#fff;
}
body.sohbera-platinum .emoji-grid{grid-template-columns:repeat(8,minmax(0,1fr));gap:4px}
body.sohbera-platinum .emoji-item{border-radius:11px;min-height:40px;transition:background .14s ease}
body.sohbera-platinum .emoji-item:hover{background:#e9f4f5;transform:none}
body.sohbera-platinum .emoji-item .emoji-native-fallback{font-size:23px}
body.sohbera-platinum .emoji-item .twemoji-picker{height:26px;width:26px}
body.sohbera-platinum .emoji-panel-foot{
  min-height:43px;padding:9px 16px;background:#f4f8f9;border-color:#e4eced;
}
body.sohbera-platinum .emoji-panel-foot span{font-size:10.5px;color:#657e88}
body.sohbera-platinum .emoji-panel-foot a{font-size:10px;color:#478591}

/* Sticker and GIF picker */
body.sohbera-platinum .sticker-panel{
  width:min(410px,calc(100vw - 20px));
  max-height:min(600px,calc(100dvh - var(--top) - var(--composer) - 28px));
}
body.sohbera-platinum .sticker-search{
  height:44px;padding:0 12px;margin:15px 16px 11px;
  border:1px solid #dce8eb;border-radius:13px;background:#f0f5f7;gap:9px;
}
body.sohbera-platinum .sticker-search input{font-size:12px;color:var(--pt-ink)}
body.sohbera-platinum .sticker-search input::placeholder{color:#90a2ab}
body.sohbera-platinum .sticker-tabs{height:43px;gap:7px;padding:0 16px 10px;border-bottom:1px solid #e5edef}
body.sohbera-platinum .sticker-tabs button{
  height:33px;min-width:0;padding:0 12px;border-radius:10px;font-size:11px;
  color:#637d88;background:transparent;
}
body.sohbera-platinum .sticker-tabs button.active{background:#e2f1f3;color:#207a8c}
body.sohbera-platinum .sticker-panel-body{padding:15px;min-height:235px;max-height:355px;background:#fff}
body.sohbera-platinum .sticker-grid{gap:9px;grid-template-columns:repeat(4,minmax(0,1fr))}
body.sohbera-platinum .sticker-item{
  border:1px solid #e3eaee;border-radius:13px;padding:7px;background:#f5f8f9;
  transition:border-color .16s ease,background .16s ease,box-shadow .16s ease;
}
body.sohbera-platinum .sticker-item:hover{
  background:#edf7f8;border-color:#9bc9d0;box-shadow:0 7px 17px rgba(35,111,130,.10);transform:none;
}
body.sohbera-platinum .sticker-item img{border-radius:9px}
body.sohbera-platinum .sticker-item .sticker-gif-badge{font-size:9px;padding:3px 6px;border-radius:6px}
body.sohbera-platinum .sticker-empty{min-height:230px;gap:10px}
body.sohbera-platinum .sticker-empty b{font-size:13px;color:var(--pt-ink)}
body.sohbera-platinum .sticker-empty span{font-size:11px;color:var(--pt-sub)}
body.sohbera-platinum .sticker-panel-foot{
  min-height:52px;padding:9px 16px;background:#f4f8f9;border-color:#e4eced;
}
body.sohbera-platinum .sticker-panel-foot span{font-size:10.5px;color:#557581}
body.sohbera-platinum .sticker-panel-foot small{font-size:9px;color:#869aa3;margin-top:4px}

/* Special effects: neat, compact 4-by-4 layout */
body.sohbera-platinum .effects-panel{
  width:min(505px,calc(100vw - 22px));max-height:min(650px,75dvh);
  background:var(--pt-panel);bottom:calc(var(--composer) + 16px);z-index:190;
}
body.sohbera-platinum .effects-grid{
  gap:9px;padding:17px;background:#fff;max-height:min(490px,calc(75dvh - 120px));
}
body.sohbera-platinum .effect-item{
  min-height:89px;padding:9px 5px;border:1px solid #dfe9ec;border-radius:15px;
  background:#f7fafb;color:#294656;gap:7px;
}
body.sohbera-platinum .effect-item:hover{
  border-color:#a9d6dc;background:#eaf5f6;box-shadow:0 8px 17px rgba(36,104,120,.09);transform:none;
}
body.sohbera-platinum .effect-item span{font-size:28px;filter:none}
body.sohbera-platinum .effect-item b{font-size:11.5px;line-height:1.2;font-weight:800}
body.sohbera-platinum .effects-panel footer{
  padding:12px 16px;text-align:center;background:#f3f8f9;
  color:#67818a;font-size:11px;border-top:1px solid #e4edee;
}

/* YouTube search + link compose */
body.sohbera-platinum .youtube-compose-overlay,
body.sohbera-platinum .image-compose-overlay,
body.sohbera-platinum .file-compose-overlay{
  background:rgba(30,55,65,.30);backdrop-filter:blur(5px);
}
body.sohbera-platinum .youtube-search-card{width:min(700px,calc(100vw - 30px));max-height:min(780px,calc(100dvh - 36px));display:flex;flex-direction:column}
body.sohbera-platinum .youtube-compose-tabs{
  padding:12px 19px 0;gap:8px;background:#fff;border-color:#e3ebee;
}
body.sohbera-platinum .youtube-compose-tabs button{
  min-height:39px;padding:0 16px;border-radius:10px 10px 0 0;
  font-size:12px;color:#728792;
}
body.sohbera-platinum .youtube-compose-tabs button.active{
  border-color:#dde8eb;border-bottom-color:#eaf4f5;
  background:#eaf4f5;color:#227c8b;
}
body.sohbera-platinum .youtube-search-pane{padding:19px;min-height:0;overflow-y:auto}
body.sohbera-platinum .youtube-search-box,
body.sohbera-platinum .youtube-url-box{
  height:49px;border-radius:13px;border:1px solid #dce8ea;
  background:#f1f6f8;padding:0 9px 0 15px;gap:10px;
}
body.sohbera-platinum .youtube-search-box:focus-within,
body.sohbera-platinum .youtube-url-box:focus-within{
  border-color:#8ac0c9;box-shadow:0 0 0 3px #e5f3f5;
}
body.sohbera-platinum .youtube-search-box input,
body.sohbera-platinum .youtube-url-box input{font-size:12px;color:var(--pt-ink)}
body.sohbera-platinum .youtube-search-box button{
  height:35px;min-width:82px;padding:0 14px;border-radius:10px;
  font-size:11px;background:var(--pt-teal);font-weight:800;
}
body.sohbera-platinum .youtube-search-box button:hover,
body.sohbera-platinum .youtube-search-send:hover{background:var(--pt-teal-dark)}
body.sohbera-platinum .youtube-search-state{min-height:215px;padding:18px}
body.sohbera-platinum .youtube-search-state>i{width:52px;height:52px;background:#e9f4f5;color:#278899;border-radius:16px}
body.sohbera-platinum .youtube-search-state>b{font-size:14px}
body.sohbera-platinum .youtube-search-state>span{font-size:11px;color:#778d98;line-height:1.6}
body.sohbera-platinum .youtube-search-results{gap:10px;margin-top:14px;max-height:min(50vh,465px)}
body.sohbera-platinum .youtube-search-result{
  grid-template-columns:160px minmax(0,1fr);min-height:102px;
  border:1px solid #e0e9eb;border-radius:15px;background:#f7fafb;
}
body.sohbera-platinum .youtube-search-thumb,
body.sohbera-platinum .youtube-search-thumb img{min-height:102px}
body.sohbera-platinum .youtube-search-copy{padding:13px 15px}
body.sohbera-platinum .youtube-search-copy>b{font-size:12px;line-height:1.4;color:#263e4b}
body.sohbera-platinum .youtube-search-copy>span{font-size:10px;color:#7c939d}
body.sohbera-platinum .youtube-search-copy>div{gap:9px}
body.sohbera-platinum .youtube-search-send{
  height:34px;padding:0 13px;border-radius:9px;background:var(--pt-teal);font-size:10px;
}
body.sohbera-platinum .youtube-search-copy a{width:34px;height:34px;border-color:#d8e5e8;border-radius:9px}
body.sohbera-platinum .youtube-compose-body{padding:20px}
body.sohbera-platinum .youtube-compose-body>label{font-size:11px;margin-bottom:10px;color:#607a86}
body.sohbera-platinum .youtube-compose-preview{border-color:#dfeaec;border-radius:13px;grid-template-columns:145px 1fr}
body.sohbera-platinum .youtube-compose-preview img{width:145px;height:88px}
body.sohbera-platinum .youtube-compose-preview>div{padding:13px}
body.sohbera-platinum .youtube-compose-preview small{font-size:9px;color:#298695}
body.sohbera-platinum .youtube-compose-preview b{font-size:12px}
body.sohbera-platinum .youtube-compose-preview span{font-size:10px;color:#79909a}
body.sohbera-platinum .youtube-compose-error{font-size:11px}
body.sohbera-platinum .youtube-compose-actions{padding:0 20px 19px;gap:10px}
body.sohbera-platinum .youtube-compose-actions button{height:44px;font-size:12px;border-radius:12px}
body.sohbera-platinum .youtube-compose-actions .secondary{border-color:#dce8eb;color:#5f7985}
body.sohbera-platinum .youtube-compose-actions .primary{background:var(--pt-teal)}

/* Image + file preparation */
body.sohbera-platinum .image-compose-card{width:min(500px,calc(100vw - 30px));max-height:min(790px,calc(100dvh - 30px));overflow-y:auto}
body.sohbera-platinum .file-compose-card{width:min(510px,calc(100vw - 30px))}
body.sohbera-platinum .image-compose-preview{
  margin:17px 19px 0;min-height:200px;max-height:min(430px,48dvh);
  border:1px solid #dee9ec;border-radius:16px;background:#f0f5f7;
}
body.sohbera-platinum .image-compose-preview img{max-height:min(430px,48dvh)}
body.sohbera-platinum .image-compose-meta{gap:10px;padding:14px 19px 0}
body.sohbera-platinum .image-compose-meta>div,
body.sohbera-platinum .file-compose-meta>div{
  padding:12px 14px;border:1px solid #e0eaed;border-radius:13px;background:#f5f9fa;
}
body.sohbera-platinum .image-compose-meta small,
body.sohbera-platinum .file-compose-meta small,
body.sohbera-platinum .file-compose-preview small{font-size:9px;letter-spacing:.12em;color:#7c959d}
body.sohbera-platinum .image-compose-meta b,
body.sohbera-platinum .file-compose-meta b{font-size:12px;color:#294756;margin-top:6px}
body.sohbera-platinum .image-compose-note,
body.sohbera-platinum .file-compose-note{
  margin:12px 20px 0;font-size:11px;line-height:1.6;color:#728a94;
}
body.sohbera-platinum .image-compose-actions{padding:17px 19px 20px;gap:10px}
body.sohbera-platinum .file-compose-actions{padding:17px 19px 20px;gap:10px}
body.sohbera-platinum .image-compose-actions button,
body.sohbera-platinum .file-compose-actions button{height:46px;font-size:12px;border-radius:12px}
body.sohbera-platinum .image-compose-actions .secondary,
body.sohbera-platinum .file-compose-actions .secondary{color:#647d88;border-color:#d9e5e9;background:#fff}
body.sohbera-platinum .image-compose-actions .primary,
body.sohbera-platinum .file-compose-actions .primary{background:var(--pt-teal);box-shadow:0 7px 17px rgba(37,133,151,.14)}
body.sohbera-platinum .file-compose-preview{
  grid-template-columns:60px minmax(0,1fr);gap:14px;
  margin:18px 19px 0;padding:17px;
  border:1px solid #e0ebed;border-radius:16px;background:#f3f8f9;
}
body.sohbera-platinum .file-compose-icon{
  height:60px;width:60px;border-radius:17px;background:#e6f2f3;border-color:#cfe4e7;color:#258597;
}
body.sohbera-platinum .file-compose-preview b{font-size:13px;margin-top:7px}
body.sohbera-platinum .file-compose-preview span{font-size:10.5px;margin-top:6px;color:#6b8591}
body.sohbera-platinum .file-compose-meta{gap:10px;padding:14px 19px 0}

/* Attachment type chooser */
body.sohbera-platinum .attach-menu{
  width:260px;padding:9px;gap:5px;border-radius:16px;border:1px solid #d8e7e9;
  background:#fff;box-shadow:0 17px 40px rgba(30,68,78,.16);
}
body.sohbera-platinum .attach-menu::after{background:#fff;border-color:#d8e7e9}
body.sohbera-platinum .attach-menu button{
  min-height:61px;padding:9px;border-radius:11px;grid-template-columns:40px minmax(0,1fr);gap:10px;
}
body.sohbera-platinum .attach-menu button:hover{background:#eff7f8}
body.sohbera-platinum .attach-menu button>i{
  width:40px;height:40px;border-radius:12px;background:#e5f1f3;
  border:1px solid #d6e8eb;color:#268397;font-size:16px;
}
body.sohbera-platinum .attach-menu button b{font-size:12px;color:#264554}
body.sohbera-platinum .attach-menu button small{font-size:10px;color:#8096a0;margin-top:5px}

/* Breakpoints: keep tool popovers in the viewport and avoid overflowing mobile */
@media(max-width:1050px) and (min-width:761px){
  body.sohbera-platinum .emoji-panel,body.sohbera-platinum .sticker-panel{right:calc(var(--people) + 28px)}
  body.sohbera-platinum .app.people-collapsed :is(.emoji-panel,.sticker-panel){right:24px}
}
@media(max-width:760px){
  body.sohbera-platinum :is(.emoji-panel,.sticker-panel),
  body.sohbera-platinum .app.people-collapsed :is(.emoji-panel,.sticker-panel){
    position:fixed;left:8px;right:8px;bottom:calc(58px + var(--composer) + 7px);
    width:auto;max-height:min(540px,calc(100dvh - 146px));border-radius:18px;
  }
  body.sohbera-platinum :is(.emoji-panel-head,.sticker-panel-head,.effects-panel-head,.youtube-compose-head,.image-compose-head,.file-compose-head){
    height:56px;min-height:56px;padding:0 15px;
  }
  body.sohbera-platinum :is(.emoji-panel-head,.sticker-panel-head,.effects-panel-head,.youtube-compose-head,.image-compose-head,.file-compose-head) b{font-size:15px}
  body.sohbera-platinum .emoji-panel-body{max-height:min(310px,36dvh);padding:9px 10px}
  body.sohbera-platinum .emoji-grid{gap:2px}
  body.sohbera-platinum .emoji-item{min-height:34px}
  body.sohbera-platinum .emoji-item .twemoji-picker{width:23px;height:23px}
  body.sohbera-platinum .sticker-panel-body{max-height:min(325px,39dvh);padding:10px}
  body.sohbera-platinum .sticker-grid{gap:7px}
  body.sohbera-platinum .effects-panel{bottom:calc(58px + var(--composer) + 7px);max-height:calc(100dvh - 152px)}
  body.sohbera-platinum .effects-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;padding:10px;max-height:calc(100dvh - 272px)}
  body.sohbera-platinum .effect-item{min-height:73px;padding:7px 3px;gap:4px}
  body.sohbera-platinum .effect-item span{font-size:25px}
  body.sohbera-platinum .effect-item b{font-size:10px}
  body.sohbera-platinum :is(.youtube-compose-overlay,.image-compose-overlay,.file-compose-overlay){padding:9px;align-items:end}
  body.sohbera-platinum :is(.youtube-search-card,.image-compose-card,.file-compose-card){
    width:100%;max-height:90dvh;border-radius:19px 19px 0 0;
  }
  body.sohbera-platinum .youtube-search-pane{padding:12px}
  body.sohbera-platinum .youtube-search-results{max-height:min(52dvh,430px)}
  body.sohbera-platinum .youtube-search-result{grid-template-columns:112px minmax(0,1fr);min-height:83px}
  body.sohbera-platinum .youtube-search-thumb,
  body.sohbera-platinum .youtube-search-thumb img{min-height:83px}
  body.sohbera-platinum .youtube-search-copy{padding:8px 9px}
  body.sohbera-platinum .youtube-search-copy>b{font-size:11px}
  body.sohbera-platinum .youtube-search-copy>span{font-size:9px}
  body.sohbera-platinum .youtube-search-send{height:30px;padding:0 9px;font-size:9px}
  body.sohbera-platinum .image-compose-preview{min-height:160px;max-height:38dvh;margin:12px 13px 0}
  body.sohbera-platinum .image-compose-preview img{max-height:38dvh}
  body.sohbera-platinum :is(.image-compose-meta,.file-compose-meta){padding:10px 13px 0;gap:7px}
  body.sohbera-platinum :is(.image-compose-meta,.file-compose-meta)>div{padding:10px}
  body.sohbera-platinum .file-compose-preview{margin:12px 13px 0;padding:12px}
  body.sohbera-platinum :is(.image-compose-note,.file-compose-note){margin:8px 13px 0;font-size:10px}
  body.sohbera-platinum :is(.image-compose-actions,.file-compose-actions){padding:12px 13px 16px}
  body.sohbera-platinum .attach-menu{left:8px;right:8px;width:auto;padding:7px}
  body.sohbera-platinum .attach-menu button{min-height:63px;padding:7px;grid-template-columns:36px minmax(0,1fr)}
  body.sohbera-platinum .attach-menu button>i{width:36px;height:36px}
}
@media(max-width:380px){
  body.sohbera-platinum .effects-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  body.sohbera-platinum .emoji-tabs{gap:2px;padding-left:9px;padding-right:9px}
  body.sohbera-platinum .emoji-tabs button{width:32px;flex-basis:32px}
  body.sohbera-platinum .sticker-tabs button{padding:0 8px}
  body.sohbera-platinum .youtube-search-send{width:31px;padding:0;justify-content:center}
}
@media(prefers-reduced-motion:reduce){
  body.sohbera-platinum :is(.emoji-item,.sticker-item,.effect-item){transition:none!important;transform:none!important}
}
