/* V31 · rich ticket details and bounded attachment picker */
.v31-rich-field{margin-top:18px;margin-bottom:18px}
.v31-rich-field>label{font-size:15px;font-weight:800;color:#242424;display:block;margin-bottom:10px}
.v31-required-mark{color:#EF4B2B}
.v31-rich-shell{border:1px solid #DCDDDC;border-radius:14px;overflow:hidden;background:#fff;transition:border-color .18s,box-shadow .18s}
.v31-rich-shell:focus-within{border-color:#EF4B2B;box-shadow:0 0 0 3px rgba(239,75,43,.10)}
.v31-editor-toolbar{display:flex;gap:5px;align-items:center;flex-wrap:wrap;padding:10px 11px;background:#F8F8F8;border-bottom:1px solid #E9E8E6}
.v31-editor-toolbar button{height:38px;min-width:38px;padding:0 11px;border-radius:8px;border:1px solid transparent;background:transparent;color:#222;display:inline-flex;align-items:center;justify-content:center;font:750 14px 'DM Sans',Arial,sans-serif;cursor:pointer}
.v31-editor-toolbar button:hover,.v31-editor-toolbar button:focus-visible{background:#fff;border-color:#E5E1DF;color:#D43B20;outline:none}
.v31-editor-toolbar button svg{width:17px;height:17px}
.v31-tool-divider{height:22px;border-left:1px solid #E0E0E0;margin:0 5px}
.v31-rich-editable{min-height:180px;max-height:440px;overflow:auto;outline:none;padding:19px 20px;font:400 16px/1.7 'DM Sans',Arial,sans-serif;color:#252525;overflow-wrap:anywhere}
.v31-rich-editable:empty:before{content:attr(data-placeholder);color:#858585;pointer-events:none}
.v31-rich-editable p,.v31-ticket-message-body p{margin:0 0 12px}
.v31-rich-editable h3,.v31-ticket-message-body h3{font-size:21px;line-height:1.4;margin:9px 0 12px;color:#1A1A1A}
.v31-rich-editable ul,.v31-rich-editable ol,.v31-ticket-message-body ul,.v31-ticket-message-body ol{margin:6px 0 12px;padding-left:24px;list-style-position:outside}
.v31-rich-editable ul,.v31-ticket-message-body ul{list-style-type:disc}
.v31-rich-editable ol,.v31-ticket-message-body ol{list-style-type:decimal}
.v31-rich-editable li,.v31-ticket-message-body li{margin:3px 0}
.v31-rich-editable a,.v31-ticket-message-body a{color:#D73B22;text-decoration:underline;overflow-wrap:anywhere}
.v31-rich-editable blockquote,.v31-ticket-message-body blockquote{border-left:3px solid #EF4B2B;padding:8px 14px;margin:12px 0;background:#FFF8F6}
.v31-editor-meta{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;margin-top:9px;font-size:14px!important;color:#707070;line-height:1.55}
.v31-char-count{white-space:nowrap;font-size:14px!important;font-weight:750;color:#777}
.v31-char-count.over-limit{color:#CE3820}
.v31-attachment-section{border:1px solid #E7E5E2;border-radius:16px;background:#FCFCFB;padding:20px 21px 16px;margin:18px 0 22px}
.v31-attachment-top{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:15px}
.v31-attachment-top h4{margin:0 0 5px;font-size:19px;color:#171717;display:flex;align-items:center;gap:9px}
.v31-attachment-top h4 .icon{width:19px;height:19px;color:#EF4B2B}
.v31-attachment-top p{margin:0;color:#6D6D6D;font-size:15px;line-height:1.5}
.v31-optional{font-size:13px;font-weight:700;color:#868686;border:1px solid #E3E3E3;border-radius:99px;padding:4px 8px}
.v31-file-badge{color:#D63B23;background:#FFF1EC;border:1px solid #FADBD3;border-radius:99px;padding:7px 11px;font-size:14px;font-weight:750;white-space:nowrap}
.v31-dropzone{padding:25px 18px;background:#fff;border:1.5px dashed #CBCBCB;border-radius:12px;display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;cursor:pointer;color:#4E4E4E;outline:none;text-align:center;min-height:115px}
.v31-dropzone:hover,.v31-dropzone:focus-visible,.v31-dropzone.is-dragging{border-color:#EF4B2B;background:#FFF9F7}
.v31-dropzone .v31-drop-icon{display:inline-grid;place-items:center;background:#FFF1EA;border-radius:12px;width:41px;height:41px;color:#EF4B2B;margin-right:6px}
.v31-dropzone .v31-drop-icon .icon{height:20px;width:20px}
.v31-dropzone strong{color:#D63B22;font-size:15px}
.v31-dropzone span:not(.v31-drop-icon){font-size:15px}
.v31-dropzone small{font-size:14px!important;flex-basis:100%;color:#757575;margin-top:5px}
.v31-upload-rules{display:flex;gap:8px;flex-wrap:wrap;margin:13px 0}
.v31-upload-rules span{padding:6px 11px;border:1px solid #E7E5E2;border-radius:99px;font-size:14px!important;color:#484848;font-weight:650;background:#fff}
.v31-attachment-list{display:grid;gap:8px}
.v31-file-row{display:flex;gap:12px;align-items:center;border:1px solid #E8E5E3;background:#fff;border-radius:11px;padding:10px 11px;min-width:0}
.v31-file-row .v31-file-icon{color:#EF4B2B;display:flex;flex:none}
.v31-file-row .v31-file-icon svg{width:20px;height:20px}
.v31-file-row>div{min-width:0;flex:1}
.v31-file-row strong{font-size:14px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.v31-file-row small{font-size:14px!important;color:#787878}
.v31-file-row button{display:grid;place-items:center;flex:none;width:34px;height:34px;border:0;border-radius:8px;background:#F6F6F6;color:#777;cursor:pointer}
.v31-file-row button:hover{background:#FFF1EC;color:#EF4B2B}
.v31-file-row button svg{width:16px;height:16px}
.v31-upload-note{margin:13px 0 0!important;font-size:14px!important;line-height:1.55;color:#6C6C6C}
.v31-upload-note strong{color:#C83A20}
.v31-ticket-message-body{font-size:16px;line-height:1.75;color:#383838;overflow-wrap:anywhere}
.v31-ticket-message-body>:last-child{margin-bottom:0}
.v31-message-attachments{margin-top:17px;background:#F9F9F9;border:1px solid #ECECEC;border-radius:12px;padding:15px}
.v31-message-attachments>b{font-size:14px;color:#252525}
.v31-message-attachments>p{font-size:14px;margin:4px 0 10px;color:#727272}
.v31-message-attachments ul{list-style:none;padding:0;margin:0;display:grid;gap:7px}
.v31-message-attachments li{display:flex;flex-wrap:wrap;align-items:center;gap:9px;border:1px solid #E9E9E9;background:white;border-radius:8px;padding:9px 10px;color:#252525;font-size:14px}
.v31-message-attachments li .icon{width:17px;height:17px;color:#EF4B2B}
.v31-message-attachments li>span{flex:1;min-width:80px;overflow-wrap:anywhere}
.v31-message-attachments small{color:#A34332;font-size:13px}
#ticketReplyForm .v31-rich-field{margin-top:5px}
#ticketReplyForm .v31-rich-editable{min-height:125px}
#ticketReplyForm .v31-attachment-section{margin:10px 0 15px}
@media(max-width:700px){
 .v31-editor-toolbar{gap:3px;padding:7px}
 .v31-editor-toolbar button{min-width:35px;padding:0 8px}
 .v31-rich-editable{min-height:190px;padding:16px}
 .v31-editor-meta{display:block}
 .v31-editor-meta .v31-char-count{display:block;margin-top:6px}
 .v31-attachment-section{padding:15px 14px;margin:15px 0 20px}
 .v31-attachment-top{display:block}
 .v31-file-badge{display:inline-flex;margin-top:10px}
 .v31-dropzone{padding:20px 10px}
}


/* V33: give customer/admin ticket replies the same full-width editing experience as New Ticket */
#ticketReplyForm {
  padding: 30px 28px 32px !important;
  gap: 20px !important;
  align-items: stretch !important;
  background: #fff;
}
#ticketReplyForm .v31-rich-field {
  width: 100%;
  min-width: 0;
  margin: 0 !important;
}
#ticketReplyForm .v31-rich-field > label {
  font-size: 16px !important;
  margin-bottom: 12px !important;
}
#ticketReplyForm .v31-rich-shell {
  width: 100%;
  border-radius: 14px;
}
#ticketReplyForm .v31-editor-toolbar {
  padding: 12px 14px;
  gap: 7px;
}
#ticketReplyForm .v31-rich-editable {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-height: 225px;
  max-height: 560px;
  padding: 22px 24px;
  font-size: 16px;
  line-height: 1.75;
}
#ticketReplyForm .v31-editor-meta {
  margin-top: 11px;
  font-size: 14px !important;
}
#ticketReplyForm .v31-attachment-section {
  width: 100%;
  margin: 4px 0 2px !important;
}
#ticketReplyForm > button[type="submit"] {
  align-self: flex-end;
  min-height: 50px;
  padding-inline: 24px;
  font-size: 15px;
}
/* Clean message formatting so a formatted reply reads like a conversation rather than nested bubbles. */
.ticket-message-content .v31-ticket-message-body {
  border: 1px solid #efedeb;
  border-radius: 12px;
  background: #f9f9f8;
  padding: 18px 20px;
}
.ticket-message.from-team .ticket-message-content .v31-ticket-message-body {
  background: #fff7f4;
  border-color: #f6e7e1;
}
.ticket-message-content .v31-ticket-message-body p {
  margin: 0 0 13px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  white-space: normal;
  font-size: 16px;
  line-height: 1.75;
}
.ticket-message-content .v31-ticket-message-body > :last-child { margin-bottom: 0; }
@media (max-width: 700px) {
  #ticketReplyForm { padding: 22px 17px 26px !important; gap: 17px !important; }
  #ticketReplyForm .v31-editor-toolbar { padding: 9px; gap: 4px; }
  #ticketReplyForm .v31-rich-editable { min-height: 200px; padding: 18px 17px; }
  #ticketReplyForm .v31-attachment-section { margin: 0 !important; }
  #ticketReplyForm > button[type="submit"] { align-self: stretch; width: 100%; }
  .ticket-message-content .v31-ticket-message-body { padding: 15px 16px; }
}
