/**
 * TaskBuilder - Add New Project SaaS theme
 * Scoped entirely to .wppm-anp-shell (the #wppm_add_new_project form itself)
 * so it cannot leak into other forms/modals.
 */
/* WP admin forces border-box globally; most frontend themes don't. Force it
   ourselves so the grid/field layout doesn't overflow when this renders
   outside wp-admin (shortcode). */
.wppm-anp-shell,
.wppm-anp-shell *,
.wppm-anp-shell *::before,
.wppm-anp-shell *::after {
  box-sizing: border-box;
}

.wppm-anp-shell {
  --anp-primary: #4f46e5;
  --anp-primary-dark: #4338ca;
  --anp-primary-light: #eef2ff;
  --anp-ink: #111827;
  --anp-muted: #6b7280;
  --anp-border: #e5e7eb;
  --anp-surface: #ffffff;
  --anp-bg: #f8fafc;
  --anp-radius: 14px;
  --anp-radius-sm: 10px;
  --anp-shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px -12px rgba(16,24,40,.10);
  display: block !important;
  max-width: 760px;
  margin: 20px auto 40px;
  padding: 0 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--anp-ink);
  text-align: left;
}
.wppm-anp-shell ul,
.wppm-anp-shell li {
  list-style: none;
  margin: 0;
  padding: 0;
}
.wppm-anp-shell button {
  font-family: inherit;
}

/* Header */
.wppm-anp-shell .wppm-anp-header {
  display: flex !important;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
/* Create Project / Create Task: same full-width frame as the Projects list, so the page lines up
   under the plugin header (wppm-header) instead of floating centered at 1120px with its own top gap. */
#wppm_add_new_project.wppm-anp-shell,
#wppm_add_new_task.wppm-anp-shell {
  max-width: none;
  margin: 0;
  padding: 20px 22px 24px;
  background: transparent;
}
@media (max-width: 600px) {
  #wppm_add_new_project.wppm-anp-shell,
  #wppm_add_new_task.wppm-anp-shell {
    padding: 14px 12px 18px;
  }
}
/* Task details card: same inner spacing as the Project details card (#wppm_frm_field_container) */
#wppm_add_new_task.wppm-anp-shell #wppm_task_frm_field_container {
  padding: 15px 20px 0;
}
/* Keep the title row tight to the cards so it reads as the top of the form */
#wppm_add_new_project.wppm-anp-shell .wppm-anp-header,
#wppm_add_new_task.wppm-anp-shell .wppm-anp-header {
  align-items: center;
  margin-bottom: 10px;
  padding: 0 2px;
}
.wppm-anp-shell .wppm-anp-header-title {
  display: flex !important;
  flex-direction: column;
  gap: 2px;
}
.wppm-anp-shell .wppm-heading-inline {
  font: 700 22px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--anp-ink);
  padding: 0;
  letter-spacing: -0.01em;
}
.wppm-anp-shell .wppm-anp-header-subtitle {
  font-size: 13px;
  color: var(--anp-muted);
}
/* "‹ Project List" back link above the title (same look as .wppm-op-back on the project overview) */
.wppm-anp-shell .wppm-anp-back {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 2px;
  margin: 0 0 2px -4px;
  padding: 2px 6px 2px 2px;
  border-radius: 6px;
  color: var(--anp-muted);
  font: 600 12px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  cursor: pointer;
  transition: background-color .12s ease, color .12s ease;
}
.wppm-anp-shell .wppm-anp-back .dashicons {
  width: 15px;
  height: 15px;
  font-size: 15px;
}
.wppm-anp-shell .wppm-anp-back:hover {
  background: #eef2ff;
  color: #4f46e5;
}
.wppm-anp-shell .wppm-anp-back:focus-visible {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}
.wppm-anp-shell .wppm-add-new-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 9px 16px;
  border-radius: 9px;
  border: 1px solid var(--anp-border);
  background: var(--anp-surface);
  color: var(--anp-ink);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.wppm-anp-shell .wppm-add-new-btn:hover {
  border-color: #d1d5db;
  box-shadow: var(--anp-shadow);
}
.wppm-anp-shell .wppm-pl-btn-icon {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
}
.wppm-anp-shell .wppm-pl-btn-icon .dashicons {
  font-size: 15px;
  width: 15px;
  height: 15px;
  color: var(--anp-muted);
}

/* Card */
.wppm-anp-shell .wppm-anp-card {
  background: var(--anp-surface);
  border: 1px solid var(--anp-border);
  border-radius: var(--anp-radius);
  box-shadow: var(--anp-shadow);
  padding: 26px;
}

/* Fields */
.wppm-anp-shell .wppm-anp-field {
  margin-bottom: 18px;
}
.wppm-anp-shell .wppm-anp-grid-2 {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 16px;
}
.wppm-anp-shell .wppm-anp-grid-2 .wppm-anp-field {
  margin-bottom: 18px;
}
.wppm-anp-shell .wppm-anp-label {
  display: flex !important;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--anp-ink);
  margin-bottom: 6px;
}
.wppm-anp-shell .wppm-anp-label .dashicons {
  font-size: 15px;
  width: 15px;
  height: 15px;
  color: var(--anp-muted);
}
.wppm-anp-shell .wppm-anp-required {
  color: #dc2626;
  margin-left: 2px;
}
.wppm-anp-shell input.wppm-anp-input,
.wppm-anp-shell select.wppm-anp-input {
  width: 100% !important;
  border: 1px solid var(--anp-border) !important;
  border-radius: 9px !important;
  padding: 10px 12px !important;
  height: auto !important;
  font-size: 13.5px !important;
  color: var(--anp-ink);
  background-color: #fff;
  box-shadow: none !important;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.wppm-anp-shell input.wppm-anp-input:focus,
.wppm-anp-shell select.wppm-anp-input:focus {
  outline: none;
  border-color: var(--anp-primary) !important;
  box-shadow: 0 0 0 3px var(--anp-primary-light) !important;
}
.wppm-anp-shell .wppm-anp-textarea {
  width: 100%;
  min-height: 120px;
  border: 1px solid var(--anp-border);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 13.5px;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
}
.wppm-anp-shell .wppm-anp-textarea:focus {
  outline: none;
  border-color: var(--anp-primary);
  box-shadow: 0 0 0 3px var(--anp-primary-light);
}
.wppm-anp-shell .mce-tinymce {
  border: 1px solid var(--anp-border) !important;
  border-radius: 9px !important;
  box-shadow: none !important;
  overflow: hidden;
}

/* Assigned users list */
.wppm-anp-shell .wppm-anp-users-list:not(:empty) {
  margin-bottom: 18px;
}
.wppm-anp-shell .wppm-anp-users-list .wppm_user_display_container {
  display: flex !important;
  align-items: center;
  gap: 10px;
  background: var(--anp-bg);
  border: 1px solid var(--anp-border);
  border-radius: 9px;
  padding: 8px 10px;
  margin: 0 0 8px;
}
.wppm-anp-shell .wppm-anp-users-list .flex-container {
  flex: 1 !important;
  background: transparent !important;
  color: var(--anp-ink) !important;
  font-size: 13px;
  padding: 0;
  border-radius: 0;
}
.wppm-anp-shell .wppm-anp-users-list .wppm_filter_display_text {
  padding: 0;
}
.wppm-anp-shell .wppm-anp-users-list .wppm_user_role select {
  border: 1px solid var(--anp-border) !important;
  border-radius: 7px !important;
  font-size: 12px !important;
  min-height: 30px !important;
  padding: 0 8px !important;
}
.wppm-anp-shell .wppm-anp-users-list .wppm_delete_user_icon {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  cursor: pointer;
  flex: 0 0 auto !important;
}
.wppm-anp-shell .wppm-anp-users-list .wppm_delete_user_icon img {
  width: 12px;
  opacity: .55;
}
.wppm-anp-shell .wppm-anp-users-list .wppm_delete_user_icon:hover {
  background: #fee2e2;
}
.wppm-anp-shell .wppm-anp-users-list .wppm_delete_user_icon:hover img {
  opacity: 1;
}

/* Public project toggle */
.wppm-anp-shell .wppm-anp-toggle-row {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--anp-ink);
}
.wppm-anp-shell .wppm-anp-toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.wppm-anp-shell .wppm-anp-toggle-track {
  position: relative;
  width: 38px;
  height: 22px;
  background: #d1d5db;
  border-radius: 999px;
  flex-shrink: 0;
  transition: background-color .15s ease;
}
.wppm-anp-shell .wppm-anp-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
  transition: transform .15s ease;
}
.wppm-anp-shell .wppm-anp-toggle-input:checked + .wppm-anp-toggle-track {
  background: var(--anp-primary);
}
.wppm-anp-shell .wppm-anp-toggle-input:checked + .wppm-anp-toggle-track .wppm-anp-toggle-thumb {
  transform: translateX(16px);
}

/* Footer */
.wppm-anp-shell .wppm-anp-footer {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding-top: 18px;
  margin-top: 4px;
  border-top: 1px solid var(--anp-border);
}
.wppm-anp-shell .wppm-submit-btn {
  border-radius: 9px !important;
  padding: 11px 24px !important;
  background: var(--anp-primary) !important;
  border-color: var(--anp-primary) !important;
  font-weight: 700 !important;
  font-size: 13.5px !important;
}
.wppm-anp-shell .wppm-submit-btn:hover {
  background: var(--anp-primary-dark) !important;
  border-color: var(--anp-primary-dark) !important;
}
.wppm-anp-shell .wppm_reset_btn {
  border-radius: 9px !important;
  padding: 11px 20px !important;
  background: var(--anp-bg) !important;
  border: 1px solid var(--anp-border) !important;
  color: var(--anp-ink) !important;
  font-weight: 600 !important;
  font-size: 13.5px !important;
}
.wppm-anp-shell .wppm_reset_btn:hover {
  background: #f1f5f9 !important;
}

@media (max-width: 782px) {
  .wppm-anp-shell {
    margin-top: 12px;
    padding: 0 10px;
  }
  .wppm-anp-shell .wppm-anp-card {
    padding: 16px;
  }
  .wppm-anp-shell .wppm-anp-grid-2 {
    grid-template-columns: 1fr !important;
  }
}

/* =====================================================================
   v2: two-column layout (details | schedule + team), sticky action bar
   ===================================================================== */
.wppm-anp-shell {
  max-width: 1120px;
}
.wppm-anp-shell .wppm-anp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: 18px;
}
.wppm-anp-shell .wppm-anp-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
.wppm-anp-shell .wppm-anp-main {
  min-width: 0;
}

/* Card heads */
.wppm-anp-shell .wppm-anp-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: -2px 0 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--anp-border);
}
.wppm-anp-shell .wppm-anp-card-icon {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px !important;
  height: 38px !important;
  border-radius: 10px;
  background: var(--anp-primary-light);
  color: var(--anp-primary);
  font-size: 19px !important;
}
.wppm-anp-shell .wppm-anp-card-title,
.wppm-anp-shell .wppm-anp-side-title {
  margin: 0;
  color: var(--anp-ink);
  font: 700 15px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.wppm-anp-shell .wppm-anp-card-desc {
  margin: 3px 0 0;
  color: var(--anp-muted);
  font-size: 12.5px;
}
.wppm-anp-shell .wppm-anp-side-card {
  padding: 18px 20px;
}
.wppm-anp-shell .wppm-anp-side-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 13.5px;
}
.wppm-anp-shell .wppm-anp-side-title .dashicons {
  color: var(--anp-primary);
  font-size: 16px;
  width: 16px;
  height: 16px;
}
.wppm-anp-shell .wppm-anp-side-card .wppm-anp-field:last-child {
  margin-bottom: 0;
}

/* Bigger name field */
.wppm-anp-shell input.wppm-anp-input.wppm-anp-input-lg {
  padding: 12px 14px !important;
  font-size: 15px !important;
  font-weight: 600;
}

/* Inputs with a leading icon; flatpickr makes dates readonly — keep them white */
.wppm-anp-shell .wppm-anp-input-icon {
  position: relative;
}
.wppm-anp-shell .wppm-anp-input-icon > .dashicons {
  position: absolute;
  top: 50%;
  left: 11px;
  z-index: 1;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 15px;
  width: 15px;
  height: 15px;
  pointer-events: none;
}
.wppm-anp-shell .wppm-anp-input-icon input.wppm-anp-input {
  padding-left: 34px !important;
}
.wppm-anp-shell input.wppm-anp-input[readonly] {
  background-color: #fff !important;
  cursor: pointer;
}

/* Assigned users inside the narrower sidebar */
.wppm-anp-shell .wppm-anp-side .wppm-anp-users-list .wppm_user_display_container {
  flex-wrap: nowrap;
  margin-left: 0;
  margin-right: 0;
}
.wppm-anp-shell .wppm-anp-side .wppm-anp-users-list .wppm_user_display_container > [class*="col-"] {
  width: auto;
  float: none;
  padding: 0;
}
.wppm-anp-shell .wppm-anp-side .wppm-anp-users-list .flex-container {
  min-width: 0;
  max-width: none;
  height: auto;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 600;
}
.wppm-anp-shell .wppm-anp-side .wppm-anp-users-list .wppm_user_role {
  flex: 0 0 112px;
}
.wppm-anp-shell .wppm-anp-side .wppm-anp-users-list .wppm_user_role select {
  width: 100% !important;
}

/* Public toggle + hint */
.wppm-anp-shell .wppm-anp-public {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--anp-border);
}
.wppm-anp-shell .wppm-anp-hint {
  margin: 6px 0 0 48px;
  color: var(--anp-muted);
  font-size: 12px;
  line-height: 1.45;
}

/* Add-on fields (e.g. Custom Fields) in the main card */
.wppm-anp-shell .wppm-anp-addons:empty {
  display: none;
}
.wppm-anp-shell .wppm-anp-addons .wppm_custom_fields[style*="inline"] {
  display: block !important;
  margin-top: 6px;
  padding-top: 18px;
  border-top: 1px dashed var(--anp-border);
}
.wppm-anp-shell .wppm-anp-addons .row {
  margin-left: 0;
  margin-right: 0;
}
.wppm-anp-shell .wppm-anp-addons [class*="col-"] {
  padding-left: 0;
  padding-right: 0;
}
.wppm-anp-shell .wppm-anp-addons .wppm_custom_field_label {
  display: inline-block;
  margin-bottom: 12px !important;
  color: var(--anp-ink);
  font-size: 13.5px;
}
.wppm-anp-shell .wppm-anp-addons .wppm_form_field_label {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--anp-ink);
  font-size: 12.5px;
}
.wppm-anp-shell .wppm-anp-addons .wppm_custom_field {
  margin-bottom: 14px;
}
.wppm-anp-shell .wppm-anp-addons .form-control {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--anp-border);
  border-radius: 9px;
  box-shadow: none;
  font-size: 13.5px;
}
.wppm-anp-shell .wppm-anp-addons textarea.form-control {
  height: auto;
  min-height: 80px;
  padding: 10px 12px;
}
.wppm-anp-shell .wppm-anp-addons .form-control:focus {
  outline: none;
  border-color: var(--anp-primary);
  box-shadow: 0 0 0 3px var(--anp-primary-light);
}

/* Action bar: bottom of the Project details card, below a divider */
.wppm-anp-shell .wppm-anp-footer {
  margin: 22px 0 0;
  padding: 18px 0 12px;
  border-top: 1px solid var(--anp-border);
  background: transparent;
}
.wppm-anp-shell .wppm-anp-footer-note {
  margin-right: auto;
  color: var(--anp-muted);
  font-size: 12.5px;
}
.wppm-anp-shell .wppm-anp-footer .wppm-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.wppm-anp-shell .wppm-anp-footer .wppm-submit-btn .dashicons {
  font-size: 18px;
  width: 18px;
  height: 18px;
}

@media (max-width: 960px) {
  .wppm-anp-shell .wppm-anp-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 600px) {
  .wppm-anp-shell .wppm-anp-footer {
    flex-wrap: wrap;
  }
  .wppm-anp-shell .wppm-anp-footer-note {
    width: 100%;
  }
  .wppm-anp-shell .wppm-anp-footer .wppm-submit-btn,
  .wppm-anp-shell .wppm-anp-footer .wppm_reset_btn {
    flex: 1 1 0;
    justify-content: center;
  }
}

/* Keep footer button labels on one line on narrow screens */
.wppm-anp-shell .wppm-anp-footer .wppm-submit-btn,
.wppm-anp-shell .wppm-anp-footer .wppm_reset_btn {
  white-space: nowrap;
}

/* Buttons and the Required note sit together on the left: [Add Project] [Reset Form]  * Required */
.wppm-anp-shell .wppm-anp-footer {
  justify-content: flex-start;
  gap: 10px;
}
.wppm-anp-shell .wppm-anp-footer-note {
  margin-right: 0;
  margin-left: 6px;
}
@media (max-width: 600px) {
  .wppm-anp-shell .wppm-anp-footer-note {
    order: -1;
    margin-left: 0;
  }
}

/* =====================================================================
   Create Task form — reuses the Create Project design (.wppm-anp-*).
   Extra pieces: header icon actions, member chips, and a container query so
   the two columns collapse when the form is narrow (e.g. inside a popup).
   ===================================================================== */
.wppm-anp-shell {
  container-type: inline-size;
}
@container (max-width: 860px) {
  .wppm-anp-layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Header icon actions (Create Task / Task List / add-on buttons) */
.wppm-ant-shell .wppm-ant-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.wppm-ant-shell .wppm-ant-header-actions > span {
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin: 0 !important;
  padding: 0;
  border: 1px solid var(--anp-border);
  border-radius: 9px;
  background: var(--anp-surface);
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
  line-height: 0;
  cursor: pointer;
  transition: border-color .12s ease, background-color .12s ease, box-shadow .12s ease;
}
/* Only visible buttons become icon squares; a "display:none" permission style still hides them. */
.wppm-ant-shell .wppm-ant-header-actions > span:not([style*="none"]) {
  display: inline-flex !important;
}
.wppm-ant-shell .wppm-ant-header-actions > span:hover {
  border-color: #c7d2fe;
  background: var(--anp-primary-light);
  box-shadow: var(--anp-shadow);
}
.wppm-ant-shell .wppm-ant-header-actions > span img {
  width: 17px;
  height: 17px;
  margin: 0;
}

/* Project picker (select2) */
.wppm-ant-shell .wppm_project_autocomplete_container .select2-container {
  width: 100% !important;
  max-width: 100% !important;
}
.wppm-ant-shell .wppm_project_autocomplete_container .select2-selection--single {
  height: 42px !important;
  border: 1px solid var(--anp-border);
  border-radius: 9px;
}
.wppm-ant-shell .wppm_project_autocomplete_container .select2-selection__rendered {
  margin-top: 0 !important;
  padding-left: 12px;
  line-height: 40px !important;
  font: 13.5px/40px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}
.wppm-ant-shell .wppm_project_autocomplete_container .select2-selection__arrow {
  height: 40px !important;
}
.wppm-ant-shell .wppm_project_autocomplete_container .select2-container--open .select2-selection--single,
.wppm-ant-shell .wppm_project_autocomplete_container .select2-container--focus .select2-selection--single {
  border-color: var(--anp-primary);
  box-shadow: 0 0 0 3px var(--anp-primary-light);
}

/* Member chips */
.wppm-ant-shell .wppm-ant-members .wppm_filter_display_users_container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.wppm-ant-shell .wppm-ant-members .wppm_filter_display_element .flex-container {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  height: auto;
  margin: 0;
  padding: 5px 6px 5px 12px;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  background: var(--anp-primary-light);
}
.wppm-ant-shell .wppm-ant-members .wppm_filter_display_element .flex-container > div {
  margin: 0;
  padding: 0;
}
.wppm-ant-shell .wppm-ant-members .wppm_filter_display_text {
  overflow: hidden;
  color: var(--anp-primary-dark);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.wppm-ant-shell .wppm-ant-members .wppm_filter_display_remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
}
.wppm-ant-shell .wppm-ant-members .wppm_filter_display_remove:hover {
  background: rgba(79,70,229,.15);
}
.wppm-ant-shell .wppm-ant-members .wppm_filter_display_remove img {
  width: 9px;
  height: 9px;
}

/* =====================================================================
   Add New Project > Custom Fields "File" upload (taskbuilder-custom-field add-on)
   Markup from wppm_upload_file_cf(): #wppm_attach_file_cf trigger, then
   .wppm_attachment_container > .wppm_attachment > .progress > .progress-bar
   (file name, width = % uploaded) + .wppm_attachment_cancel.
   CSS only, same file-card look as the task / project comment uploads:
   tinted fill grows behind the card, accent line along the bottom, name on top.
   ===================================================================== */
.wppm-anp-shell #wppm_attach_file_cf {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: 1px dashed #c7d2fe;
  border-radius: 9px;
  background: var(--anp-primary-light);
  color: var(--anp-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .12s ease, border-color .12s ease;
}
.wppm-anp-shell #wppm_attach_file_cf::before {
  content: "\f317"; /* dashicons-upload */
  font: normal 16px/1 dashicons;
}
.wppm-anp-shell #wppm_attach_file_cf:hover {
  border-color: var(--anp-primary);
  background: #e0e7ff;
}
.wppm-anp-shell .wppm_attachment_container:not([style*="none"]) {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.wppm-anp-shell .wppm_attachment_container .wppm_attachment {
  flex: 0 1 260px;
  min-width: 0;
  max-width: 100%;
}
.wppm-anp-shell .wppm_attachment_container .progress {
  position: relative;
  display: flex;
  align-items: center;
  height: 44px;
  margin: 0;
  padding: 0 6px 0 42px;
  overflow: hidden;
  border: 1px solid var(--anp-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16,24,40,.05);
}
/* File icon tile */
.wppm-anp-shell .wppm_attachment_container .progress::before {
  content: "\f498"; /* dashicons-media-default */
  position: absolute;
  z-index: 2;
  left: 8px;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--anp-primary-light);
  color: var(--anp-primary);
  font: normal 15px/1 dashicons;
  transform: translateY(-50%);
}
/* The bar: soft fill behind the card, name drawn on top (visible from 0%). */
.wppm-anp-shell .wppm_attachment_container .progress-bar {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  left: 0;
  float: none;
  height: auto;
  min-width: 0;
  padding: 0;
  text-indent: 42px; /* not padding: the fill must be able to start at 0% */
  overflow: visible;
  background: linear-gradient(90deg, rgba(99,102,241,.10), rgba(139,92,246,.16)) !important;
  box-shadow: inset 0 -3px 0 #6366f1;
  color: var(--anp-ink);
  font: 600 12.5px/42px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  text-align: left;
  white-space: nowrap;
  transition: width .3s ease, background-color .2s ease;
}
/* Still uploading: gentle shimmer */
.wppm-anp-shell .wppm_attachment_container .progress-bar:not(.progress-bar-success):not(.progress-bar-danger) {
  background-image: linear-gradient(90deg, rgba(99,102,241,.08) 0%, rgba(139,92,246,.22) 50%, rgba(99,102,241,.08) 100%) !important;
  background-size: 200% 100% !important;
  animation: wppm-anp-upload-shimmer 1.4s linear infinite;
}
@keyframes wppm-anp-upload-shimmer {
  from { background-position: 100% 0; }
  to   { background-position: -100% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .wppm-anp-shell .wppm_attachment_container .progress-bar {
    animation: none !important;
  }
}
/* Done */
.wppm-anp-shell .wppm_attachment_container .progress-bar.progress-bar-success {
  background: rgba(16,185,129,.08) !important;
  box-shadow: inset 0 -3px 0 #10b981;
}
.wppm-anp-shell .wppm_attachment_container .progress:has(.progress-bar-success)::before {
  content: "\f147"; /* dashicons-yes */
  background: #ecfdf5;
  color: #059669;
  font-size: 18px;
}
/* Failed */
.wppm-anp-shell .wppm_attachment_container .progress-bar.progress-bar-danger {
  background: rgba(239,68,68,.08) !important;
  box-shadow: inset 0 -3px 0 #ef4444;
  color: #b91c1c;
}
.wppm-anp-shell .wppm_attachment_container .progress:has(.progress-bar-danger) {
  border-color: #fecaca;
}
.wppm-anp-shell .wppm_attachment_container .progress:has(.progress-bar-danger)::before {
  content: "\f534"; /* dashicons-warning */
  background: #fef2f2;
  color: #dc2626;
}
/* Remove button, pinned to the right edge of the card */
.wppm-anp-shell .wppm_attachment_container .wppm_attachment_cancel {
  position: absolute;
  z-index: 3;
  right: 6px;
  top: 50%;
  float: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  border-radius: 7px;
  background: rgba(255,255,255,.9);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color .12s ease;
}
.wppm-anp-shell .wppm_attachment_container .wppm_attachment_cancel:not([style*="none"]) {
  display: inline-flex !important;
}
.wppm-anp-shell .wppm_attachment_container .wppm_attachment_cancel:hover {
  background: #fee2e2;
}
.wppm-anp-shell .wppm_attachment_container .wppm_attachment_cancel img {
  width: 10px;
  height: 10px;
}

/* Create Task opened inside a project (Tasks / Kanban tab): the project shell already pads the page,
   so line the form up with the tabs instead of insetting it again. */
.wppm-op-shell #wppm_add_new_task.wppm-anp-shell {
  padding: 20px 0 0;
}
