/* Quiet foreground polish for the existing OverLife interfaces.
   Load before readable-theme-v1.css. Media, audio seats, live geometry,
   wallpaper, brand proportions and all visibility rules remain untouched. */
:root{
  --polish-radius-control:14px;
  --polish-radius-icon:12px;
  --polish-radius-message:18px;
  --polish-radius-panel:22px;
  --polish-feedback-time:140ms;
  --polish-feedback-ease:cubic-bezier(.2,.7,.2,1);
}

/* A small family of radii distinguishes fields, conversations and panels. */
body :is(.overlive-social,.social-action-dialog,.social-confirm-dialog,
  .invite-qr-dialog,.image-frame-dialog,.background-dialog,.room-youtube-dialog){
  border-radius:var(--polish-radius-panel);
}
body #overliveAccountPanel{border-radius:var(--polish-radius-panel);}
body :is(.music-control-panel,.presence-menu,.room-more-menu,.app-secondary-options){
  border-radius:18px;
}
body :is(.social-tabs,.account-tabs,.account-profile-editor){border-radius:18px;}
body :is(.social-tabs button,.account-tabs button,.social-contact-button,
  .social-pill,.social-older,.social-confirm-dialog button,.image-frame-dialog button,
  .background-buttons button,.room-youtube-actions .btn,.room-youtube-search-actions .btn){
  border-radius:var(--polish-radius-control);
}
body #overliveAccountPanel :is(.account-submit,.account-visitor,.account-profile-editor,
  .account-recovery-actions button){border-radius:var(--polish-radius-control);}
body :is(.social-private-message,.overlive-chat-message){
  border-radius:var(--polish-radius-message);
}
body .overlive-chat-embedded :is(.overlive-chat-message,.overlive-chat-message.mine){
  border-radius:16px;
}
body :is(.social-private-form textarea,.overlive-chat-form,
  .overlive-chat-form textarea){border-radius:16px;}
body .social-find input,
body #overliveAccountPanel :is(input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='color']):not([type='file']),textarea,select),
body .room-youtube-dialog input,
body .overlive-gif-search input{
  border-radius:var(--polish-radius-control);
}
body #home .chill-action{border-radius:18px;}
body .nav button{border-radius:16px;}

/* Align foreground copy without changing the existing rows, image sizes or
   touch/keyboard-specific height budgets. Long labels can reflow in panels. */
body :is(.social-heading,.social-thread-heading,.social-contact-heading,
  .account-heading,.account-profile-form,.account-recovery-actions,
  .room-youtube-heading,.room-youtube-actions,.background-buttons){min-width:0;}
body :is(.social-contact-heading h2,.social-confirm-dialog h2,
  .account-identity strong,.account-security h3,.account-reset-panel h3,
  .image-frame-dialog h2,.background-dialog h2,.room-youtube-heading h2){
  overflow-wrap:anywhere;
}
body :is(.social-contact-button,.account-submit,.account-visitor,
  .account-recovery-actions button,.background-buttons button){
  white-space:normal;overflow-wrap:anywhere;
}
body .social-row{border-bottom-color:rgb(235 240 255 / .10);}
body .social-row-text{row-gap:4px;}

/* These small controls occupy an existing header budget. The compact keyboard
   mode keeps its deliberately smaller controls and composer unchanged. */
body:not(.social-keyboard-compact) .overlive-social .social-refresh,
body:not(.social-keyboard-compact) .overlive-social .social-thread-back{
  width:44px;min-width:44px;height:44px;min-height:44px;
}
body :is(.social-action-dialog,.social-confirm-dialog) .social-close{
  width:44px;min-width:44px;height:44px;min-height:44px;
  border-radius:var(--polish-radius-icon);
}

/* Static, bounded elevation separates foreground panels from photos/GIFs.
   No backdrop sampling, media filters or animated shadows. */
body :is(.social-action-dialog,.social-confirm-dialog,.invite-qr-dialog,
  .image-frame-dialog,.background-dialog,.room-youtube-dialog){
  box-shadow:0 12px 30px rgb(0 0 0 / .36);
  overscroll-behavior:contain;scroll-padding-block:12px;
}
body :is(.social-content,.social-private-log,.overlive-chat-messages,
  .presence-list,.room-youtube-results){
  scrollbar-width:thin;scrollbar-color:rgb(195 208 229 / .4) transparent;
}

/* Focus rings remain visible without moving controls. Only interaction paint
   properties transition; the independently timed RGB/glitch effects stay intact. */
body :is(.social-thread-back,.social-close,.social-refuse,.social-more,
  .social-delete,.social-message-more,.account-password-toggle,
  .account-photo-remove,.background-close,.room-youtube-close):not(:disabled){
  transition:color var(--polish-feedback-time) var(--polish-feedback-ease),
    border-color var(--polish-feedback-time) var(--polish-feedback-ease),
    outline-color var(--polish-feedback-time) var(--polish-feedback-ease);
}
body :is(.social-thread-back,.social-close,.social-refuse,.social-more,
  .social-delete,.social-message-more,.account-password-toggle,
  .account-photo-remove,.background-close,.room-youtube-close):focus-visible{
  outline:2px solid var(--readable-focus,#fff)!important;outline-offset:2px;
}
@media(hover:hover){
  body :is(.social-thread-back,.social-close,.social-refuse,.social-more,
    .social-delete,.social-message-more,.account-password-toggle,
    .account-photo-remove,.background-close,.room-youtube-close):not(:disabled):hover{
    color:var(--readable-ink,#f8f9fc);border-color:var(--readable-border,rgb(235 240 255 / .48));
  }
}
@media(prefers-reduced-motion:reduce){
  body :is(.social-thread-back,.social-close,.social-refuse,.social-more,
    .social-delete,.social-message-more,.account-password-toggle,
    .account-photo-remove,.background-close,.room-youtube-close){transition:none!important;}
}
