/*
  The inbox Compose drawer for the pilot (class.compose_wizard.php, compose_wizard.js): the
  company cards, the people cards with Everyone / Admin staff up top, the message panel.

  NOTE: no rem units in here. lib/bootstrap_old sets html { font-size: 10px }, so a rem is 10px
  on this site. px throughout.

  Everything is scoped under .compose_wizard_container, the mchat frame inside the drawer.
*/

.compose_wizard_container
{
  --cw_ink: #0F2044;
  --cw_muted: #61727a;
  --cw_faint: #8a9a9f;
  --cw_line: #dbe4e6;
  --cw_brand: #007A85;
  --cw_brand_deep: #006470;
  --cw_brand_wash: #e6f3f4;
  --cw_brand_edge: #9fd3d8;
  --cw_radius: 10px;

  color: var(--cw_ink);
  font-size: 15px;
  line-height: 1.4;
}

.compose_wizard_container *,
.compose_wizard_container *:before,
.compose_wizard_container *:after { box-sizing: border-box; }

/* ---- header dots: which of the three steps this is ---- */

.cw_steps
{
  display: flex;
  gap: 6px;
  flex: none;
  margin-left: 10px;
}
.cw_step
{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
}
.cw_step_now { background: #ffffff; }

/* ---- body ---- */

.cw_body { padding: 18px 14px 28px; }

.cw_errors
{
  margin: 0 0 14px;
  border-radius: 6px;
  padding: 10px 12px;
}

.cw_question
{
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.2;
  margin: 0 2px 6px;
}
.cw_hint
{
  color: var(--cw_muted);
  font-size: 14px;
  margin: 0 2px 16px;
}
.cw_list_label
{
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--cw_faint);
  margin: 18px 2px 8px;
}
.cw_empty
{
  color: var(--cw_muted);
  font-size: 14px;
  padding: 18px 4px;
  text-align: center;
}

/* ---- the cards: one column, the whole card is the tap target ---- */

.cw_cards
{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cw_card
{
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 62px;
  padding: 10px 12px;
  text-align: left;
  background: #ffffff;
  border: 1.5px solid var(--cw_line);
  border-radius: var(--cw_radius);
  color: var(--cw_ink);
  font: inherit;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
}
.cw_card:hover { border-color: var(--cw_brand_edge); }
.cw_card:active { background: #f4fafa; }
.cw_card[disabled]
{
  opacity: 0.45;
  cursor: default;
}

.cw_card_icon
{
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cw_brand_wash);
  color: var(--cw_brand);
  font-size: 18px;
}
.cw_avatar
{
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.3px;
}
.cw_group_icon
{
  background: var(--cw_ink);
  color: #ffffff;
}

.cw_card_text
{
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cw_card_name
{
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cw_card_sub
{
  font-size: 13px;
  color: var(--cw_muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cw_card_sub:empty { display: none; }

/* the check: an empty ring until picked */
.cw_card_check
{
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--cw_line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 15px;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}

.cw_card.cw_on
{
  border-color: var(--cw_brand);
  background: var(--cw_brand_wash);
  box-shadow: 0 0 0 1px var(--cw_brand) inset;
}
.cw_card.cw_on .cw_card_check
{
  border-color: var(--cw_brand);
  background: var(--cw_brand);
  color: #ffffff;
}

/* the two group cards sit as a pair above the list */
.cw_groups { margin-bottom: 4px; }
.cw_groups .cw_card { min-height: 56px; }

/* ---- the filter box on the people panel ---- */

.cw_search_wrap
{
  position: relative;
  margin: 8px 0 14px;
}
.cw_search_icon
{
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cw_faint);
  font-size: 15px;
  pointer-events: none;
}
.cw_search
{
  width: 100%;
  height: 44px;
  padding: 0 40px 0 38px;
  border: 1.5px solid var(--cw_line);
  border-radius: 22px;
  background: #ffffff;
  font-size: 16px;   /* 16px stops ios zooming the page on focus */
  color: var(--cw_ink);
  outline: none;
  -webkit-appearance: none;
}
.cw_search:focus { border-color: var(--cw_brand); }
.cw_search_clear
{
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: #e9eef0;
  color: var(--cw_muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: none;
}
.cw_has_text .cw_search_clear { display: inline-flex; align-items: center; justify-content: center; }

/* ---- the message panel ---- */

.cw_to
{
  background: #ffffff;
  border: 1.5px solid var(--cw_line);
  border-radius: var(--cw_radius);
  padding: 10px 12px 12px;
  margin: 12px 0 10px;
}
.cw_to_head
{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.cw_to_label
{
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--cw_faint);
}
.cw_to_count
{
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--cw_muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cw_to_edit
{
  border: none;
  background: transparent;
  color: var(--cw_brand);
  font-size: 13px;
  font-weight: 700;
  padding: 2px 4px;
  cursor: pointer;
}
.cw_chips
{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cw_chip
{
  display: inline-block;
  padding: 5px 10px;
  border-radius: 14px;
  background: var(--cw_brand_wash);
  color: var(--cw_brand_deep);
  font-size: 13px;
  font-weight: 600;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cw_form
{
  background: #ffffff;
  border: 1.5px solid var(--cw_line);
  border-radius: var(--cw_radius);
  overflow: hidden;
  margin-bottom: 12px;
}
.cw_form .form-control
{
  border: none;
  border-radius: 0;
  box-shadow: none;
  font-size: 16px;
  color: var(--cw_ink);
  padding: 12px 14px;
  height: auto;
}
.cw_form .cw_subject
{
  border-bottom: 1px solid var(--cw_line);
  font-weight: 700;
}
.cw_form .cw_message
{
  resize: vertical;
  min-height: 170px;
  line-height: 1.45;
}
.cw_form .form-control:focus { box-shadow: none; }

/* ---- footer: Back on the left, Next / Send filling the rest ---- */

.cw_foot
{
  flex: none;
  background: #ffffff;
  border-top: 1px solid var(--cw_line);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
}
.cw_foot_row
{
  display: flex;
  gap: 8px;
}
.cw_foot .btn
{
  height: 46px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  padding: 0 16px;
  box-shadow: none;
}
.cw_next
{
  flex: 1;
  background: var(--cw_brand);
  border: 1px solid var(--cw_brand);
  color: #ffffff !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.cw_next:hover, .cw_next:focus { background: var(--cw_brand_deep); border-color: var(--cw_brand_deep); color: #ffffff; }
.cw_next[disabled] { opacity: 0.4; }
.cw_back
{
  flex: none;
  background: #ffffff;
  border: 1px solid var(--cw_line);
  color: var(--cw_ink);
}
