/* BuildAne v1.4.3 — Project Room Window Controls
   Project title belongs to Meu APP. Desktop conversation is a movable/resizable tool window. */

/* Header: brand only on the left. Project identity lives inside Meu APP. */
.creator-v140 .v140-topbar{
  grid-template-columns:minmax(180px,1fr) auto minmax(270px,1fr);
}
.creator-v140 .v140-brand-cluster{gap:0}
.creator-v140 .v140-brand img{max-width:170px}

/* Editable project title in the Meu APP command bar. */
.creator-v140 .simple-project-heading-body{min-width:0}
.creator-v140 .simple-project-title-row{display:flex;align-items:center;gap:6px;min-width:0;min-height:31px}
.creator-v140 .simple-project-title-row h1{margin:0;max-width:min(430px,34vw)}
.creator-v140 .simple-title-edit-btn,
.creator-v140 .simple-title-action-btn{
  width:30px;height:30px;display:inline-grid;place-items:center;flex:0 0 auto;
  border:1px solid #d7e3ed;border-radius:9px;background:#f6fafd;color:#466982;
  cursor:pointer;transition:.16s ease;padding:0;
}
.creator-v140 .simple-title-edit-btn:hover,
.creator-v140 .simple-title-action-btn:hover{background:#eaf4fc;border-color:#b8d6ed;color:#0875d1}
.creator-v140 .simple-title-edit-btn svg{width:15px;height:15px;display:block}
.creator-v140 .simple-title-action-btn.save{color:#177a4c;background:#f1fbf6}
.creator-v140 .simple-title-action-btn.cancel{color:#85545a;background:#fff7f7}
.creator-v140 .simple-project-title-input{
  width:min(430px,35vw);height:36px;border:1px solid #91bee1;border-radius:10px;background:#fff;
  color:#102d4a;padding:0 11px;outline:none;font-size:17px;font-weight:800;line-height:1.2;
  box-shadow:0 0 0 3px rgba(24,132,225,.07);
}
.creator-v140 .simple-project-title-input:focus{border-color:#0b7fe5;box-shadow:0 0 0 3px rgba(24,132,225,.12)}

/* Window controls are explicit, high-contrast and always visible in Desktop mode. */
.creator-v140 .desktop-chat-window-controls{display:none;align-items:center;gap:5px;flex:0 0 auto}
.creator-v140 .desktop-chat-window-btn{
  width:32px;height:32px;display:inline-grid;place-items:center;padding:0;
  border:1px solid #bdd3e4;border-radius:9px;background:#edf6fd;color:#315f7f;
  cursor:pointer;transition:.16s ease;box-shadow:0 1px 2px rgba(12,54,86,.04)
}
.creator-v140 .desktop-chat-window-btn:hover{background:#dceefa;border-color:#8ebfe2;color:#076dbe}
.creator-v140 .desktop-chat-window-btn.active{background:#d8ecfb;border-color:#72b4e4;color:#075f9f}
.creator-v140 .desktop-chat-window-btn svg{width:17px;height:17px;display:block;pointer-events:none}
.creator-v140 .desktop-chat-resize-handle{display:none}

@media (min-width:1000px){
  .creator-v140 .simple-stage.device-desktop .simple-chat-card{
    position:fixed;
    right:auto;
    bottom:auto;
    z-index:76;
    min-width:340px;
    min-height:360px;
    max-width:calc(100vw - 24px);
    max-height:calc(100vh - 96px);
    border-color:#c9d8e6;
    border-radius:20px;
    box-shadow:0 26px 90px rgba(5,34,61,.24),0 4px 18px rgba(15,57,93,.10);
    overflow:hidden;
    background:rgba(255,255,255,.985);
    backdrop-filter:blur(16px);
    transition:box-shadow .15s ease;
  }
  .creator-v140 .simple-stage.device-desktop .simple-chat-card.desktop-chat-dragging,
  .creator-v140 .simple-stage.device-desktop .simple-chat-card.desktop-chat-resizing{
    box-shadow:0 34px 110px rgba(5,34,61,.31),0 5px 22px rgba(15,57,93,.14);
    user-select:none;
  }
  .creator-v140 .simple-stage.device-desktop .simple-chat-head{
    background:rgba(249,252,255,.98);
    cursor:move;
    user-select:none;
    touch-action:none;
  }
  .creator-v140 .simple-stage.device-desktop .simple-chat-head button,
  .creator-v140 .simple-stage.device-desktop .simple-chat-head .channel-switch{cursor:pointer}
  .creator-v140 .simple-stage.device-desktop .desktop-chat-window-controls{display:flex}
  .creator-v140 .simple-stage.device-desktop .desktop-chat-toggle{display:none!important}
  .creator-v140 .simple-stage.device-desktop .simple-chat-actions{display:flex;align-items:center;gap:7px;flex-wrap:nowrap}

  /* Explicit resize affordance instead of a nearly invisible browser resize corner. */
  .creator-v140 .simple-stage.device-desktop .desktop-chat-resize-handle{
    display:block;position:absolute;right:2px;bottom:2px;width:22px;height:22px;z-index:8;
    cursor:nwse-resize;touch-action:none;border-radius:0 0 17px 0;
    background:
      linear-gradient(135deg,transparent 0 47%,#8eacc2 48% 53%,transparent 54% 100%) 8px 8px/10px 10px no-repeat,
      linear-gradient(135deg,transparent 0 47%,#b0c5d5 48% 53%,transparent 54% 100%) 3px 3px/15px 15px no-repeat;
  }
  .creator-v140 .simple-stage.device-desktop .desktop-chat-resize-handle:hover{
    background:
      linear-gradient(135deg,transparent 0 47%,#2388d2 48% 53%,transparent 54% 100%) 8px 8px/10px 10px no-repeat,
      linear-gradient(135deg,transparent 0 47%,#77b8e7 48% 53%,transparent 54% 100%) 3px 3px/15px 15px no-repeat;
  }

  /* Minimized chat remains draggable and visibly restorable. */
  .creator-v140 .simple-stage.device-desktop .simple-chat-card.desktop-chat-collapsed{
    width:min(360px,calc(100vw - 24px))!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    grid-template-rows:auto;
  }
  .creator-v140 .simple-stage.device-desktop .simple-chat-card.desktop-chat-collapsed .v140-messages,
  .creator-v140 .simple-stage.device-desktop .simple-chat-card.desktop-chat-collapsed .v140-composer,
  .creator-v140 .simple-stage.device-desktop .simple-chat-card.desktop-chat-collapsed .desktop-chat-resize-handle{display:none}
  .creator-v140 .simple-stage.device-desktop .simple-chat-card.desktop-chat-collapsed .simple-chat-head{border-bottom:0}

  /* Maximized is still a floating work window, not a takeover of the whole app. */
  .creator-v140 .simple-stage.device-desktop .simple-chat-card.desktop-chat-maximized .desktop-chat-resize-handle{display:none}
}

@media (max-width:999px){
  .creator-v140 .desktop-chat-window-controls,.creator-v140 .desktop-chat-resize-handle{display:none!important}
  .creator-v140 .simple-project-title-row h1{max-width:68vw}
  .creator-v140 .simple-project-title-input{width:min(72vw,430px)}
}

@media (max-width:700px){
  .creator-v140 .simple-project-title-row{flex-wrap:wrap}
  .creator-v140 .simple-project-title-row h1{max-width:calc(100vw - 130px)}
  .creator-v140 .simple-project-title-input{width:calc(100vw - 105px);font-size:15px}
}
