/* Project Hub dialog form controls.
 * Must beat Materialize (loads after plugin CSS) and work even if a dialog
 * is outside .tcmo-ph (CSS variables would otherwise be undefined).
 */

.tcmo-ph-dialog,
.tcmo-ph-form {
  --ph-hairline: #cfd5da;
  --ph-surface: #fff;
  --ph-ink: #1b2126;
  --ph-muted: #5c6770;
  --ph-accent: #2d6a4f;
}

.tcmo-ph-form input[type="text"],
.tcmo-ph-form input[type="number"],
.tcmo-ph-form input[type="date"],
.tcmo-ph-form input[type="search"],
.tcmo-ph-form input[type="url"],
.tcmo-ph-form input[type="tel"],
.tcmo-ph-form input[type="month"],
.tcmo-ph-form select,
.tcmo-ph-form textarea:not(.tcmo-ph-drawer-title-input),
.tcmo-ph-dialog input[type="text"],
.tcmo-ph-dialog input[type="number"],
.tcmo-ph-dialog input[type="date"],
.tcmo-ph-dialog input[type="search"],
.tcmo-ph-dialog input[type="url"],
.tcmo-ph-dialog input[type="tel"],
.tcmo-ph-dialog input[type="month"],
.tcmo-ph-dialog select,
.tcmo-ph-dialog textarea {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 10px 12px !important;
  border: 1px solid #cfd5da !important;
  border-radius: 10px !important;
  background: #fff !important;
  background-color: #fff !important;
  color: #1b2126 !important;
  font: inherit !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  height: auto !important;
  min-height: 42px !important;
  box-shadow: none !important;
  outline: none !important;
  appearance: auto !important;
  -webkit-appearance: auto !important;
}

.tcmo-ph-form textarea:not(.tcmo-ph-drawer-title-input),
.tcmo-ph-dialog textarea {
  min-height: 88px !important;
  resize: vertical !important;
  padding: 12px 14px !important;
}

.tcmo-ph-form .tcmo-ph-asg-picker-toggle,
.tcmo-ph-dialog .tcmo-ph-asg-picker-toggle {
  min-height: 42px !important;
  padding: 10px 12px !important;
  border: 1px solid #cfd5da !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #1b2126 !important;
  font: inherit !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}

.tcmo-ph-form .tcmo-ph-asg-board-btn,
.tcmo-ph-dialog .tcmo-ph-asg-board-btn {
  min-height: 38px !important;
  padding: 9px 12px !important;
  border: 1px solid #cfd5da !important;
  border-radius: 10px !important;
  background: #fff !important;
  font: inherit !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
  height: auto !important;
  width: 100% !important;
  text-transform: none !important;
  letter-spacing: 0.02em !important;
}

.tcmo-ph-form .tcmo-ph-asg-board-btn[aria-pressed="true"],
.tcmo-ph-dialog .tcmo-ph-asg-board-btn[aria-pressed="true"] {
  background: #eef5f8 !important;
  border-color: color-mix(in srgb, #2f6e8f 35%, #cfd5da) !important;
  color: #2f6e8f !important;
}

.tcmo-ph-form .tcmo-ph-asg-picker-toggle:focus,
.tcmo-ph-dialog .tcmo-ph-asg-picker-toggle:focus {
  border-color: #2d6a4f !important;
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.16) !important;
}

.tcmo-ph-form .tcmo-ph-asg-picker-menu,
.tcmo-ph-dialog .tcmo-ph-asg-picker-menu {
  z-index: 80;
}

.tcmo-ph-form .tcmo-ph-asg-picker-option,
.tcmo-ph-dialog .tcmo-ph-asg-picker-option {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 8px !important;
  height: auto !important;
  min-height: 0 !important;
  line-height: 1.3 !important;
}

.tcmo-ph-form .tcmo-ph-asg-picker-option input[type="checkbox"],
.tcmo-ph-dialog .tcmo-ph-asg-picker-option input[type="checkbox"] {
  position: static !important;
  left: auto !important;
  opacity: 1 !important;
  margin: 0 !important;
  width: 15px !important;
  height: 15px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
}

.tcmo-ph-form .tcmo-ph-asg-picker-option span,
.tcmo-ph-dialog .tcmo-ph-asg-picker-option span {
  position: static !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  margin: 0 !important;
  padding: 0 !important;
  padding-left: 0 !important;
  height: auto !important;
  width: auto !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  color: #1b2126 !important;
}

.tcmo-ph-form .tcmo-ph-asg-picker-option [type="checkbox"] + span::before,
.tcmo-ph-form .tcmo-ph-asg-picker-option [type="checkbox"] + span::after,
.tcmo-ph-dialog .tcmo-ph-asg-picker-option [type="checkbox"] + span::before,
.tcmo-ph-dialog .tcmo-ph-asg-picker-option [type="checkbox"] + span::after {
  content: none !important;
  display: none !important;
}

.tcmo-ph-field--title textarea,
.tcmo-ph-field--title #tcmo-ph-field-title {
  font-size: 1.35rem !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
  min-height: 52px !important;
  padding: 12px 14px !important;
  border: 1px solid #cfd5da !important;
  border-radius: 12px !important;
}

.tcmo-ph-form input:focus,
.tcmo-ph-form select:focus,
.tcmo-ph-form textarea:not(.tcmo-ph-drawer-title-input):focus,
.tcmo-ph-dialog input:focus,
.tcmo-ph-dialog select:focus,
.tcmo-ph-dialog textarea:focus {
  border-color: #2d6a4f !important;
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.16) !important;
}

/* Keep range control borderless */
.tcmo-ph-progress-ctl input[type="range"],
.tcmo-ph-dialog .tcmo-ph-progress-ctl input[type="range"] {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  min-height: 0 !important;
  padding: 0 !important;
}

.tcmo-ph-form-cells {
  border: none;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  flex: 0 0 auto;
}

.tcmo-ph-form-section {
  margin-top: 18px;
  border: none;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  flex: 0 0 auto;
}

.tcmo-ph-form-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 2px 8px;
  border-bottom: none;
  background: transparent;
}

.tcmo-ph-form-section-title {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #5c6770;
}

.tcmo-ph-form-section-body {
  padding: 0 2px;
}

.tcmo-ph-form-section .tcmo-ph-docs-field {
  margin: 0;
  padding: 0;
  border: none;
}

.tcmo-ph-form-section .tcmo-ph-docs-head {
  display: none;
}

.tcmo-ph-form-section .tcmo-ph-tasks-editor {
  margin-top: 0;
}

/* Drawer project title — must beat generic .tcmo-ph-form textarea rules above */
.tcmo-ph-drawer-head .tcmo-ph-drawer-title-input,
.tcmo-ph-drawer-head #tcmo-ph-field-title {
  font-size: clamp(1.75rem, 4vw, 2.125rem) !important;
  font-family: var(--font-serif, Georgia, 'Times New Roman', serif) !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.2 !important;
  min-height: 1.35em !important;
  max-height: 4.5em !important;
  height: auto !important;
  padding: 4px 6px !important;
  margin: 0 !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  background: transparent !important;
  background-color: transparent !important;
  resize: none !important;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  box-shadow: none !important;
}

.tcmo-ph-drawer-head .tcmo-ph-drawer-title-input:hover {
  border-color: color-mix(in srgb, var(--ph-hairline, #cfd5da) 80%, transparent) !important;
}

.tcmo-ph-drawer-head .tcmo-ph-drawer-title-input:focus {
  border-color: color-mix(in srgb, var(--ph-accent, #2d6a4f) 35%, #cfd5da) !important;
  background: color-mix(in srgb, var(--ph-accent, #2d6a4f) 4%, transparent) !important;
  box-shadow: none !important;
}

.tcmo-ph-drawer-subtitle-wrap {
  display: block;
  margin-top: 2px;
}

.tcmo-ph-drawer-head .tcmo-ph-drawer-subtitle-input,
.tcmo-ph-drawer-head #tcmo-ph-field-subtitle {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 2px 6px !important;
  min-height: 0 !important;
  height: auto !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  color: var(--ph-muted, #5c6770) !important;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  background: transparent !important;
  box-shadow: none !important;
}

.tcmo-ph-drawer-head .tcmo-ph-drawer-subtitle-input:hover {
  border-color: color-mix(in srgb, var(--ph-hairline, #cfd5da) 80%, transparent) !important;
}

.tcmo-ph-drawer-head .tcmo-ph-drawer-subtitle-input:focus {
  color: var(--ph-ink, #1b2126) !important;
  border-color: color-mix(in srgb, var(--ph-accent, #2d6a4f) 35%, #cfd5da) !important;
  background: color-mix(in srgb, var(--ph-accent, #2d6a4f) 4%, transparent) !important;
}
