/* V5.39 UI consolidation – Writer's Corner float, Mail composer and upload polish. */
/* Single centered modal for HALF workspaces, with clear expansion controls. */
.wc-app-shell .wc-expanded.wc-expanded-half,
.wc-app-shell .wc-deluxe .wc-expanded.wc-expanded-half{
  position:fixed!important;
  top:50%!important;
  left:50%!important;
  right:auto!important;
  bottom:auto!important;
  transform:translate(-50%,-50%)!important;
  width:min(920px,calc(100vw - 48px))!important;
  min-width:0!important;
  height:min(790px,calc(100dvh - 74px))!important;
  max-height:calc(100dvh - 24px)!important;
  box-shadow:0 28px 100px rgba(0,0,0,.87),0 0 30px rgba(198,154,92,.16);
}
.wc-app-shell .wc-expanded.wc-expanded-full,
.wc-app-shell .wc-deluxe .wc-expanded.wc-expanded-full{
  position:fixed!important;
  top:2vh!important;
  left:2vw!important;
  right:2vw!important;
  bottom:2vh!important;
  transform:none!important;
  width:96vw!important;
  height:96dvh!important;
  max-height:96dvh!important;
  min-width:0!important;
}
.wc-app-shell .wc-expanded-head{position:sticky;top:0;z-index:3;flex:none;box-shadow:0 4px 18px #0006}
.wc-app-shell .wc-expanded-actions button{min-height:37px;border-radius:8px;transition:background .15s ease,border-color .15s ease}
.wc-app-shell .wc-expanded-actions button:focus-visible{outline:2px solid #ffd99b;outline-offset:2px}
.wc-app-shell .wc-expanded-content{overflow:auto;overscroll-behavior:contain}
@media(max-width:720px){.wc-app-shell .wc-expanded.wc-expanded-half{width:calc(100vw - 18px)!important;height:calc(100dvh - 34px)!important}.wc-app-shell .wc-expanded-head{align-items:flex-start;flex-wrap:wrap}.wc-app-shell .wc-expanded-actions{flex-wrap:wrap}}
/* Top-only composer commands. Insertion tools no longer duplicate formatting ribbon or footer. */
.mail-shell-mode .v512-compose-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding:11px 13px 9px;min-height:unset;background:linear-gradient(125deg,#162938,#203745);border-bottom:1px solid #726448;overflow:visible}
.mail-shell-mode .v539-compose-insert{display:flex;flex-wrap:wrap;gap:6px;align-items:center;padding-left:10px;margin-left:3px;border-left:1px solid #5b6974}
.mail-shell-mode .v512-compose-actions button:not(.v512-send){transition:background .16s ease,border-color .16s ease,color .16s ease}
.mail-shell-mode .v512-compose-actions button:is(:hover,:focus-visible){border-color:#e4bf81;background:#304657;color:#ffe2ac}
.mail-shell-mode .v539-compose-insert .v539-insert-btn{font-size:13px!important;min-height:35px!important;padding:7px 11px!important;border:1px solid #61727c;background:#213747;color:#e9e9e7;display:inline-flex;gap:5px;align-items:center;justify-content:center}
.mail-shell-mode .v539-compose-state{display:inline-flex;align-items:center;gap:5px;color:#aebdc9;font-size:12px;margin-left:auto}
.mail-shell-mode .v539-compose-state:before{content:'';width:6px;height:6px;border-radius:50%;background:#8fc9a8}
.mail-shell-mode .v512-editor{min-height:240px}
/* Consistent upload presentation for file inputs that are visible to the user. */
.app-shell input[type=file]:not([hidden]),.mail-shell-mode input[type=file]:not([hidden]),.wc-app-shell input[type=file]:not([hidden]){
  width:100%;max-width:100%;min-height:46px;background:linear-gradient(105deg,#172c39,#17232e);color:#d7e3eb;border:1px solid #516a78;border-radius:11px;padding:7px 10px;
  font-size:13px;cursor:pointer;transition:border-color .16s ease,box-shadow .16s ease;
}
.app-shell input[type=file]:not([hidden]):is(:hover,:focus-visible),.mail-shell-mode input[type=file]:not([hidden]):is(:hover,:focus-visible),.wc-app-shell input[type=file]:not([hidden]):is(:hover,:focus-visible){border-color:#deb877;box-shadow:0 0 0 2px #b79c5733}
.app-shell input[type=file]::file-selector-button,.mail-shell-mode input[type=file]::file-selector-button,.wc-app-shell input[type=file]::file-selector-button{
  border:1px solid #d8ad6a;background:linear-gradient(120deg,#e1b973,#b88b4d);color:#101b25;border-radius:8px;padding:9px 13px;margin-right:12px;font-size:12px;font-weight:750;cursor:pointer;
}
.app-shell .upload-zone,.wc-app-shell .upload-zone{border:1px dashed #bd9764;border-radius:14px;background:radial-gradient(circle at 50% -50%,#bb90532c,transparent 70%),#13232f;padding:26px;color:#dce5ec;transition:background .16s,border-color .16s}
.app-shell .upload-zone:is(:hover,.drag),.wc-app-shell .upload-zone:is(:hover,.drag){border-color:#f0cb8c;background:#253849;box-shadow:inset 0 0 0 1px #cf9d4d38}
:where(.app-shell,.mail-shell-mode,.wc-app-shell) button:focus-visible{outline:2px solid #e6c184;outline-offset:2px}
@media(max-width:950px){.mail-shell-mode .v539-compose-insert{border-left:0;padding-left:0;margin-left:0;flex-basis:100%}.mail-shell-mode .v539-compose-state{width:100%}}
