/* Contact Us reply modal (pages/contactUs/Index.jsx). Everything is scoped to
   .kk-cu-modal so it never leaks to other modals. Loaded after style.css so
   equal-specificity rules win by source order. */

/* ---------------------------------------------------------------- shell */
.kk-cu-modal.modal-content {
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(20, 22, 43, 0.22);
}
.kk-cu-modal .modal-header {
  align-items: center;
  border-bottom: 1px solid #eef0f7;
  padding: 16px 22px;
}
.kk-cu-modal .modal-title {
  font-weight: 700;
  font-size: 15px;
}
.kk-cu-modal .modal-body {
  padding: 22px;
  /* the theme's .modal-content is overflow:hidden with no x-guard, so long
     reply lines were being clipped instead of wrapping — contain it here. */
  overflow-x: hidden;
}
.kk-cu-modal .modal-footer {
  border-top: 1px solid #eef0f7;
  padding: 12px 20px;
  gap: 8px;
}

/* -------------------------------------------------------- section titles */
.kk-cu-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8a90a2;
  margin: 0 0 12px;
}
.kk-cu-to {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  color: #a2a7b5;
  margin-left: 6px;
}
.kk-cu-divider {
  border: 0;
  border-top: 1px solid #eef0f7;
  margin: 22px 0;
}

/* ------------------------------------------------------- detail info grid */
.kk-cu-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px 22px;
}
.kk-cu-info__item {
  min-width: 0;
}
.kk-cu-info__label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #a2a7b5;
  margin-bottom: 3px;
}
.kk-cu-info__value {
  font-weight: 600;
  color: #33374d;
  overflow-wrap: anywhere;
}

/* status pill (detail header) */
.kk-cu-status {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  color: #fff;
}
.kk-cu-status--NEW {
  background: #3ba0ff;
}
.kk-cu-status--READ {
  background: #8a8f9e;
}
.kk-cu-status--RESOLVED {
  background: #2dce89;
}

/* ------------------------------------------------------- quoted message */
.kk-cu-quote {
  border-left: 3px solid var(--primary-bg-color, #6259ca);
  background: #f6f7fc;
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  color: #4a4f63;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------- composer */
.kk-cu-field {
  margin-bottom: 16px;
}
.kk-cu-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #4a4f63;
  margin-bottom: 6px;
}
.kk-cu-hint {
  display: block;
  font-size: 12px;
  color: #a2a7b5;
  margin-top: 5px;
}
/* Quill editor polished to match the theme's form controls */
.kk-cu-modal .ql-toolbar.ql-snow {
  border-color: #e8e8f7;
  border-radius: 8px 8px 0 0;
  background: #fbfbfe;
}
.kk-cu-modal .ql-container.ql-snow {
  border-color: #e8e8f7;
  border-radius: 0 0 8px 8px;
  font-size: 14px;
}
.kk-cu-modal .ql-editor {
  min-height: 140px;
}
.kk-cu-modal .ql-editor.ql-blank::before {
  color: #b6bac6;
  font-style: normal;
}
.kk-cu-send {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

/* ---------------------------------------------------------- reply thread */
.kk-cu-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.kk-cu-reply {
  min-width: 0; /* allow the card to shrink instead of forcing modal overflow */
  border: 1px solid #eef0f7;
  border-left: 3px solid var(--primary-bg-color, #6259ca);
  border-radius: 10px;
  background: #fff;
  padding: 13px 15px;
}
.kk-cu-reply--failed {
  border-left-color: #e6533c;
}
.kk-cu-reply__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 3px;
}
.kk-cu-reply__subject {
  font-weight: 700;
  color: #33374d;
  min-width: 0;
  overflow-wrap: anywhere;
}
.kk-cu-reply__meta {
  font-size: 12px;
  color: #a2a7b5;
  margin-bottom: 9px;
}
.kk-cu-reply__body {
  color: #4a4f63;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.kk-cu-reply__body p {
  margin: 0 0 8px;
  white-space: normal;
}
.kk-cu-reply__body > :last-child {
  margin-bottom: 0;
}
.kk-cu-reply__body img {
  max-width: 100%;
  height: auto;
}
.kk-cu-reply__body a {
  word-break: break-all;
}
.kk-cu-reply__body pre,
.kk-cu-reply__body table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

/* status pill (reply card) */
.kk-cu-pill {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  color: #fff;
  background: #2dce89;
}
.kk-cu-pill--failed {
  background: #e6533c;
}

/* attachment chip */
.kk-cu-attach {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 11px;
  max-width: 100%;
  padding: 6px 11px;
  border-radius: 8px;
  background: var(--primary-transparentcolor, #f0eefb);
  color: var(--primary-bg-color, #6259ca) !important;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kk-cu-attach:hover {
  text-decoration: none;
  opacity: 0.85;
}

.kk-cu-empty {
  color: #a2a7b5;
  font-size: 13px;
  margin: 0;
}

/* ---------------------------------------------------------------- dark mode */
body.dark-theme .kk-cu-modal .modal-header,
body.dark-theme .kk-cu-modal .modal-footer,
body.dark-theme .kk-cu-divider {
  border-color: rgba(255, 255, 255, 0.08);
}
body.dark-theme .kk-cu-info__value,
body.dark-theme .kk-cu-reply__subject {
  color: #e6e7ee;
}
body.dark-theme .kk-cu-quote {
  background: rgba(255, 255, 255, 0.03);
  color: #c4c7d1;
}
body.dark-theme .kk-cu-reply {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.08);
}
body.dark-theme .kk-cu-reply__body {
  color: #c4c7d1;
}
body.dark-theme .kk-cu-modal .ql-toolbar.ql-snow,
body.dark-theme .kk-cu-modal .ql-container.ql-snow {
  border-color: rgba(255, 255, 255, 0.12);
}
body.dark-theme .kk-cu-modal .ql-toolbar.ql-snow {
  background: rgba(255, 255, 255, 0.03);
}
body.dark-theme .kk-cu-modal .ql-editor {
  color: #e6e7ee;
}
body.dark-theme .kk-cu-modal .ql-snow .ql-stroke {
  stroke: #c4c7d1;
}
body.dark-theme .kk-cu-modal .ql-snow .ql-fill {
  fill: #c4c7d1;
}
body.dark-theme .kk-cu-modal .ql-snow .ql-picker {
  color: #c4c7d1;
}
