/* Desktop-only Valerie Coding workspace. Namespaced to avoid styling chat code cards. */
#v3CodeWorkspace.v3-code-workspace{
  position:fixed;
  top:64px;
  right:16px;
  width:min(760px,46vw);
  height:calc(100vh - 82px);
  z-index:1200;
  background:rgba(10,9,7,.985);
  border:1px solid rgba(201,168,76,.34);
  border-radius:18px;
  box-shadow:0 24px 90px rgba(0,0,0,.72),0 0 50px rgba(201,168,76,.10);
  overflow:hidden;
  backdrop-filter:blur(20px);
}
#v3CodeWorkspace.hidden{display:none!important}
#v3CodeWorkspace .v3-code-head{
  height:58px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px 10px 16px;
  border-bottom:1px solid rgba(201,168,76,.18);
  background:linear-gradient(180deg,rgba(35,29,18,.95),rgba(18,15,10,.96));
}
#v3CodeWorkspace .v3-code-title{font-family:'Cormorant Garamond',serif;color:var(--gold3);font-size:18px;letter-spacing:.04em}
#v3CodeWorkspace .v3-code-sub{font-size:11px;color:var(--text3);max-width:430px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}
#v3CodeWorkspace .v3-code-tabs{display:flex;align-items:center;gap:7px}
#v3CodeWorkspace .v3-code-tabs button{
  height:32px;
  padding:0 11px;
  border:1px solid rgba(201,168,76,.25);
  border-radius:9px;
  background:rgba(255,255,255,.035);
  color:var(--text2);
  cursor:pointer;
  font:600 11px/1 'DM Sans',sans-serif;
}
#v3CodeWorkspace .v3-code-tabs button:hover,
#v3CodeWorkspace .v3-code-tabs button.active{background:rgba(201,168,76,.15);border-color:rgba(201,168,76,.55);color:var(--gold3)}
#v3CodeWorkspace .v3-code-tabs button:disabled{opacity:.35;cursor:not-allowed}
#v3CodeWorkspace #v3CloseCode{width:34px;padding:0;font-size:20px}
#v3CodeWorkspace .v3-code-body{height:calc(100% - 58px);background:#060607}
#v3CodeFrame{width:100%;height:100%;border:0;background:#fff}
#v3CodeView{width:100%;height:100%;margin:0;box-sizing:border-box;padding:18px;overflow:auto;background:#050507;color:#e9e2cf;font:12px/1.55 'DM Mono',ui-monospace,monospace;white-space:pre-wrap}
#v3CodeFrame.hidden,#v3CodeView.hidden{display:none!important}
.v3-code-download-card{margin-top:10px;padding:10px 12px;border:1px solid rgba(201,168,76,.24);border-radius:14px;background:rgba(201,168,76,.07);display:flex;align-items:center;gap:8px;flex-wrap:wrap;max-width:min(680px,80vw)}
.v3-code-ready{font-size:12px;color:var(--text2);width:100%}
.v3-code-download-btn,.v3-code-open-btn{border:1px solid rgba(201,168,76,.35);background:rgba(201,168,76,.10);color:var(--gold3);border-radius:10px;padding:7px 10px;font:600 12px/1 'DM Sans',sans-serif;cursor:pointer}
.v3-code-download-btn:hover,.v3-code-open-btn:hover{border-color:rgba(201,168,76,.7);background:rgba(201,168,76,.18)}
@media(max-width:1100px){#v3CodeWorkspace.v3-code-workspace{left:12px;right:12px;top:64px;width:auto;height:calc(100vh - 78px)}}
@media(prefers-reduced-motion:reduce){#v3CodeWorkspace.v3-code-workspace{backdrop-filter:none}}

/* Persistent Coding Workspace state + live project updates */
#v3CodeWorkspace .v3-code-live{
  min-width:0;
  max-width:190px;
  color:rgba(240,224,160,.72);
  font:600 10px/1.2 'DM Sans',sans-serif;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
#v3CodeWorkspace .v3-code-live.active::before{
  content:"";
  display:inline-block;
  width:6px;
  height:6px;
  margin-right:6px;
  border-radius:50%;
  background:var(--gold2,#e8c97a);
  box-shadow:0 0 10px rgba(232,201,122,.8);
  animation:v3CodeLivePulse 1s ease-in-out infinite;
}
@keyframes v3CodeLivePulse{0%,100%{opacity:.35;transform:scale(.75)}50%{opacity:1;transform:scale(1)}}
.v3-code-download-card .v3-code-ready{color:rgba(240,232,216,.72)}
@media(max-width:1250px){#v3CodeWorkspace .v3-code-live{display:none}}
