/* messagesend.css — Send Staff TXT overlay styles */

/* ─────────────────────────────────────────────── */
/* OVERLAY BACKDROP                                  */
/* ─────────────────────────────────────────────── */

#smsOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

#smsOverlay.active {
  display: flex;
}

/* ─────────────────────────────────────────────── */
/* MODAL WINDOW                                      */
/* ─────────────────────────────────────────────── */

#smsModal {
  background: white;
  border-radius: 10px;
  width: 90vw;
  max-width: 620px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* ─────────────────────────────────────────────── */
/* HEADER BAR                                        */
/* ─────────────────────────────────────────────── */

#smsModalHeader {
  background: #321f74;
  color: white;
  padding: 16px 20px;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

#smsModalHeader span {
  font-size: 13px;
  font-weight: 400;
  opacity: 0.8;
}

#closeSms {
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.2s;
}

#closeSms:hover {
  color: #C5215D;
}

/* ─────────────────────────────────────────────── */
/* BODY                                              */
/* ─────────────────────────────────────────────── */

#smsModalBody {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

/* ─────────────────────────────────────────────── */
/* RECIPIENTS BOX (top)                              */
/* ─────────────────────────────────────────────── */

.sms-label {
  font-size: 13px;
  font-weight: 700;
  color: #321f74;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#smsRecipientBox {
  background: #f4f4f8;
  border: 1px solid #c5c5d8;
  border-radius: 6px;
  padding: 10px 14px;
  max-height: 160px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.7;
  color: #222;
}

.sms-recipient-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0;
  border-bottom: 1px dashed #ddd;
}

.sms-recipient-row:last-child {
  border-bottom: none;
}

.sms-recipient-name {
  font-weight: 600;
  color: #321f74;
  white-space: nowrap;
}

.sms-recipient-phone {
  color: #555;
  font-size: 13px;
  white-space: nowrap;
}

.sms-recipient-nophone {
  color: #C5215D;
  font-size: 12px;
  font-style: italic;
}

/* ─────────────────────────────────────────────── */
/* MESSAGE BOX (bottom)                              */
/* ─────────────────────────────────────────────── */

#smsMessageBox {
  width: 100%;
  min-height: 120px;
  max-height: 220px;
  resize: vertical;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid #c5c5d8;
  border-radius: 6px;
  box-sizing: border-box;
  line-height: 1.5;
  color: #222;
  transition: border-color 0.2s;
}

#smsMessageBox:focus {
  outline: none;
  border-color: #321f74;
}

#smsCharCount {
  text-align: right;
  font-size: 12px;
  color: #888;
  margin-top: -10px;
}

#smsCharCount.warn {
  color: #C5215D;
  font-weight: 700;
}

/* ─────────────────────────────────────────────── */
/* FOOTER BUTTONS                                    */
/* ─────────────────────────────────────────────── */

#smsModalFooter {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 14px 24px 18px;
  border-top: 1px solid #e0e0e0;
  background: #f8f9fc;
  flex-shrink: 0;
}

#smsSendBtn {
  padding: 10px 32px;
  background: #321f74;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  min-width: 140px;
}

#smsSendBtn:hover:not(:disabled) {
  background: #C5215D;
}

#smsSendBtn:disabled {
  background: #aaa;
  cursor: not-allowed;
}

#smsCancelBtn {
  padding: 10px 28px;
  background: #e0e0e0;
  color: #333;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
  min-width: 120px;
}

#smsCancelBtn:hover {
  background: #c8c8c8;
}

/* ─────────────────────────────────────────────── */
/* STATUS / RESULT MESSAGE                           */
/* ─────────────────────────────────────────────── */

#smsStatusMsg {
  font-size: 14px;
  text-align: center;
  padding: 8px 12px;
  border-radius: 6px;
  display: none;
}

#smsStatusMsg.success {
  background: #e8f7e8;
  color: #1e7e1e;
  border: 1px solid #b0d8b0;
  display: block;
}

#smsStatusMsg.error {
  background: #fde8ee;
  color: #a0122e;
  border: 1px solid #f0b0c0;
  display: block;
}

#smsStatusMsg.sending {
  background: #eef0f8;
  color: #321f74;
  border: 1px solid #b0b8d8;
  display: block;
}

/* ─────────────────────────────────────────────── */
/* WARNING BANNER (no phone numbers)                 */
/* ─────────────────────────────────────────────── */

#smsNoPhoneWarning {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  color: #7a5700;
  display: none;
}

#smsNoPhoneWarning.visible {
  display: block;
}

/* ─────────────────────────────────────────────── */
/* SEND STAFF TXT BUTTON (toolbar)                   */
/* ─────────────────────────────────────────────── */

/* #sendStaffTxtBtn styles are managed in staffmap.css as part of the staff-header-grid layout */

/* ─────────────────────────────────────────────── */
/* MOBILE                                            */
/* ─────────────────────────────────────────────── */

@media (max-width: 640px) {
  #smsModal {
    width: 96vw;
    max-width: 100%;
  }

  #smsModalBody {
    padding: 14px 16px;
  }

  #smsModalFooter {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 16px;
  }

  #smsSendBtn,
  #smsCancelBtn {
    width: 100%;
    min-width: unset;
  }
}