/* RENGANURA_VOICE_ASSISTED_MATTER_R1 */

.rg-matter-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.rg-matter-label-row > label {
  margin: 0;
}

.rg-input-mode {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid #c5d7e8;
  border-radius: 10px;
  background: #edf4fb;
}

.rg-input-mode__option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #315a82;
  font-size: 0.83rem;
  font-weight: 750;
  cursor: pointer;
}

.rg-input-mode__option:hover {
  background: #dfeefa;
}

.rg-input-mode__option.is-selected {
  background: #ffffff;
  color: #0b5ea8;
  box-shadow:
    0 2px 8px rgba(18, 62, 105, 0.14);
}

.rg-voice-modal[hidden] {
  display: none !important;
}

.rg-voice-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.rg-voice-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 23, 43, 0.7);
  backdrop-filter: blur(4px);
}

.rg-voice-dialog {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 22px;
  border: 1px solid #c6d9ea;
  border-radius: 16px;
  background: #ffffff;
  box-shadow:
    0 24px 70px rgba(4, 26, 51, 0.35);
}

.rg-voice-modal-open {
  overflow: hidden;
}

.rg-voice-dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 17px;
  border-bottom: 1px solid #dce8f2;
}

.rg-voice-dialog__header h2 {
  margin: 2px 0 6px;
  color: #153d66;
  font-size: 1.4rem;
}

.rg-voice-dialog__header p {
  margin: 0;
  color: #526b82;
  line-height: 1.45;
}

.rg-voice-eyebrow {
  color: #0b5ea8 !important;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rg-voice-close {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid #c9d9e8;
  border-radius: 10px;
  background: #f5f9fc;
  color: #254d73;
  font-size: 1.45rem;
  cursor: pointer;
}

.rg-voice-dialog__controls {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.rg-voice-dialog__controls label,
.rg-voice-transcript-label {
  display: grid;
  gap: 7px;
  color: #274a6d;
  font-weight: 700;
}

.rg-voice-dialog input,
.rg-voice-dialog select,
.rg-voice-dialog textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #bfd2e4;
  border-radius: 9px;
  background: #ffffff;
  color: #173d63;
  font: inherit;
}

.rg-voice-dialog input,
.rg-voice-dialog select {
  min-height: 42px;
  padding: 8px 10px;
}

.rg-voice-dialog textarea {
  min-height: 120px;
  padding: 11px 12px;
  line-height: 1.5;
  resize: vertical;
}

.rg-voice-status {
  margin: 16px 0;
  padding: 11px 13px;
  border: 1px solid #9bc1e3;
  border-radius: 9px;
  background: #edf6ff;
  color: #0b5ea8;
  font-weight: 750;
  line-height: 1.4;
}

.rg-voice-status.is-error {
  border-color: #e4a7a7;
  background: #fff1f1;
  color: #a52121;
}

.rg-voice-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d1dfeb;
  border-radius: 9px;
  background: #f7fafc;
  color: #385873;
  line-height: 1.45;
}

.rg-voice-consent input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin-top: 2px;
}

.rg-voice-actions,
.rg-voice-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 15px;
}

.rg-voice-footer-actions {
  justify-content: flex-end;
  padding-top: 15px;
  border-top: 1px solid #dce8f2;
}

.rg-voice-dialog button {
  min-height: 39px;
  padding: 8px 13px;
  border: 1px solid #bdd0e1;
  border-radius: 8px;
  background: #f4f8fb;
  color: #244c73;
  font-weight: 750;
  cursor: pointer;
}

.rg-voice-dialog button:hover:not(:disabled) {
  background: #e5f0f8;
}

.rg-voice-dialog button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.rg-voice-dialog .rg-voice-primary {
  border-color: #0b5ea8;
  background: #0b5ea8;
  color: #ffffff;
}

.rg-voice-dialog .rg-voice-primary:hover:not(:disabled) {
  background: #084d89;
}

#rg-voice-preview {
  width: 100%;
  margin: 15px 0;
}

.rg-voice-guidance {
  margin: 10px 0 15px;
  color: #516d87;
  font-size: 0.9rem;
  line-height: 1.5;
}

.rg-voice-proposal-heading {
  margin-bottom: 13px;
}

.rg-voice-proposal-heading h3 {
  margin: 0 0 5px;
  color: #173e66;
}

.rg-voice-proposal-heading p {
  margin: 0;
  color: #567086;
}

#rg-voice-proposal-list {
  display: grid;
  gap: 13px;
}

.rg-voice-proposal {
  padding: 14px;
  border: 1px solid #c9dbea;
  border-radius: 11px;
  background: #fbfdff;
}

.rg-voice-proposal__header {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  color: #173f68;
}

.rg-voice-proposal__header input {
  width: 18px;
  height: 18px;
  min-height: 0;
}

.rg-voice-comparison {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.rg-voice-small-label {
  display: block;
  margin-bottom: 6px;
  color: #527089;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.rg-voice-existing {
  min-height: 88px;
  padding: 10px;
  border: 1px solid #d6e2ec;
  border-radius: 8px;
  background: #f2f6f9;
  color: #4b657c;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.rg-voice-proposal-editor {
  min-height: 110px !important;
}

.rg-voice-strategy {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 10px;
  color: #46657f;
  font-size: 0.85rem;
  font-weight: 700;
}

.rg-voice-strategy select {
  width: auto;
  min-width: 150px;
}

.rg-voice-field-note {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 7px;
  background: #fff6df;
  color: #745315;
  font-size: 0.85rem;
}

#rg-voice-follow-ups {
  margin-top: 14px;
  padding: 13px;
  border: 1px solid #e0c98f;
  border-radius: 9px;
  background: #fff9e9;
  color: #654b18;
}

#rg-voice-follow-ups:empty {
  display: none;
}

#rg-voice-follow-ups h4 {
  margin: 0 0 8px;
}

#rg-voice-follow-ups ul {
  margin: 0;
  padding-left: 20px;
}

@media (max-width: 760px) {
  .rg-matter-label-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .rg-input-mode {
    width: 100%;
  }

  .rg-input-mode__option {
    flex: 1;
    justify-content: center;
  }

  .rg-voice-modal {
    padding: 10px;
  }

  .rg-voice-dialog {
    max-height: calc(100vh - 20px);
    padding: 16px;
    border-radius: 12px;
  }

  .rg-voice-dialog__controls,
  .rg-voice-comparison {
    grid-template-columns: 1fr;
  }

  .rg-voice-footer-actions {
    justify-content: stretch;
  }

  .rg-voice-footer-actions button {
    flex: 1;
  }

  .rg-voice-strategy {
    align-items: stretch;
    flex-direction: column;
  }

  .rg-voice-strategy select {
    width: 100%;
  }
}
