/* Cloud Design v1.3.20 — modern upload UI + project invite polish */

/* ---- Modern file picker ------------------------------------------------ */
.cd-file-field-v1320{
  position:relative;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  width:100%;
  min-height:64px;
  padding:10px 12px;
  margin-top:2px;
  border:1px solid color-mix(in srgb,var(--line) 86%,var(--accent) 14%);
  border-radius:16px;
  background:linear-gradient(135deg,color-mix(in srgb,var(--surface) 90%,var(--accent) 3%),var(--bg2));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025);
  overflow:hidden;
  transition:border-color .18s ease,background .18s ease,box-shadow .18s ease,transform .18s ease;
}
.cd-file-field-v1320:hover{
  border-color:color-mix(in srgb,var(--accent) 42%,var(--line));
  background:linear-gradient(135deg,color-mix(in srgb,var(--surface) 86%,var(--accent) 6%),var(--bg2));
}
.cd-file-field-v1320.is-dragover{
  border-color:var(--accent);
  box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 12%,transparent),inset 0 1px 0 rgba(255,255,255,.04);
  transform:translateY(-1px);
}
.cd-file-field-v1320.has-file{
  border-color:color-mix(in srgb,#60d89a 48%,var(--line));
  background:linear-gradient(135deg,color-mix(in srgb,var(--surface) 91%,#60d89a 4%),var(--bg2));
}
.cd-file-native-v1320{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:0!important;
  opacity:0!important;
  pointer-events:none!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
}
.cd-file-button-v1320{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:42px;
  padding:0 15px;
  border:1px solid color-mix(in srgb,var(--accent) 32%,var(--line));
  border-radius:12px;
  color:var(--text);
  background:color-mix(in srgb,var(--accent) 9%,var(--surface));
  font-weight:760;
  font-size:.82rem;
  white-space:nowrap;
  cursor:pointer;
  transition:.18s ease;
}
.cd-file-button-v1320:hover{
  border-color:color-mix(in srgb,var(--accent) 65%,var(--line));
  background:color-mix(in srgb,var(--accent) 14%,var(--surface));
  transform:translateY(-1px);
}
.cd-file-button-v1320 svg{
  width:17px;
  height:17px;
  stroke:currentColor;
  fill:none;
  stroke-width:1.8;
}
.cd-file-copy-v1320{
  min-width:0;
  display:grid;
  gap:2px;
  color:var(--text);
}
.cd-file-name-v1320{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:.85rem;
  font-weight:720;
  line-height:1.25;
}
.cd-file-meta-v1320{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--muted);
  font-size:.69rem;
  font-weight:520;
  line-height:1.35;
}
.cd-file-status-v1320{
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  border-radius:11px;
  color:var(--muted);
  background:rgba(255,255,255,.035);
  border:1px solid var(--line);
  flex:0 0 34px;
}
.cd-file-status-v1320 svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.8}
.cd-file-field-v1320.has-file .cd-file-status-v1320{
  color:#60d89a;
  border-color:color-mix(in srgb,#60d89a 35%,var(--line));
  background:color-mix(in srgb,#60d89a 9%,transparent);
}
.cd-file-field-v1320.is-disabled{opacity:.58;pointer-events:none}

/* Do not interfere with custom chat/avatar controls already present. */
.native-avatar-input .cd-file-field-v1320,
[data-chat-file-input] + .cd-file-field-v1320{display:none!important}

/* Old file inputs in Director/Owner settings no longer get native browser chrome. */
.file-setting .cd-file-field-v1320{margin-top:1px}
.file-setting input[type=file].cd-file-native-v1320{min-height:0!important}

/* ---- Project invite block ---------------------------------------------- */
.project-invite-section-v1320{
  margin-top:22px;
  padding-top:20px;
  border-top:1px solid var(--line);
}
.project-invite-head-v1320{
  display:grid;
  gap:7px;
  margin-bottom:15px;
}
.project-invite-head-v1320 h3{
  margin:5px 0 0!important;
  font-size:1.15rem;
  line-height:1.15;
}
.project-invite-head-v1320 p{
  margin:0!important;
  max-width:36rem;
  font-size:.79rem;
  line-height:1.5;
}
.project-invite-form-v1320{
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(150px,.65fr);
  gap:12px;
  align-items:end;
}
.project-invite-form-v1320 label{
  min-width:0;
  gap:7px;
}
.project-invite-form-v1320 label > span{
  font-size:.72rem;
  color:var(--muted);
  font-weight:720;
}
.project-invite-form-v1320 input,
.project-invite-form-v1320 select{
  min-width:0;
  min-height:46px;
}
.project-invite-submit-v1320{
  grid-column:1/-1;
  width:100%;
  min-height:44px;
  border-radius:13px;
}

@media(max-width:620px){
  .cd-file-field-v1320{
    grid-template-columns:minmax(0,1fr) auto;
    gap:9px;
    padding:10px;
  }
  .cd-file-button-v1320{
    grid-column:1/-1;
    grid-row:2;
    width:100%;
  }
  .cd-file-copy-v1320{grid-column:1;grid-row:1}
  .cd-file-status-v1320{grid-column:2;grid-row:1}
  .project-invite-form-v1320{grid-template-columns:1fr}
  .project-invite-submit-v1320{grid-column:auto}
}
