/* Mediana Group CRM 1.5.0: isolated request detail layout, no dashboard overrides. */
.request-detail-compact-page {min-width:0;width:100%;}
.request-detail-compact-page :is(.content-card,.row>[class*="col-"],.list-group-item,.file-row>div,.chat-message,.chat-attachment) {min-width:0;max-width:100%;}
.request-detail-compact-page :is(.request-description,.file-row,.list-group-item,.chat-text,.chat-attachment) {overflow-wrap:anywhere;word-break:normal;}
.request-detail-compact-page .rd-chat-heading {font-size:15px!important;line-height:1.3;}
.request-detail-compact-page .rd-toolbar {align-items:stretch;}
.request-detail-compact-page .rd-toolbar .btn {display:inline-flex;align-items:center;justify-content:center;}
.request-detail-compact-page .request-chat-form {margin-left:0;margin-right:0;}
.request-detail-compact-page .request-chat-form>.col-12 {padding-left:0;padding-right:0;}
.request-detail-compact-page .request-chat-form .upload-drop-main {display:flex;align-items:center;justify-content:center;gap:8px;padding:5px;}
.request-detail-compact-page .request-chat-form .upload-drop-icon {font-size:20px;}
.request-detail-compact-page .request-chat-form .file-dropzone-title {font-size:12px;}
.request-detail-compact-page .request-chat-form .chat-file-dropzone {min-height:0;padding:8px;}
.request-detail-compact-page .request-chat-form .upload-drop-actions {margin-top:6px;}
.request-sync-status {display:flex;gap:8px;justify-content:space-between;flex-wrap:wrap;color:#52647a;}
.ann-heading {display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:12px;}
.ann-heading h1 {font-size:22px;margin:0;}
.sync-job-card {overflow-wrap:anywhere;}
body.crm-compact .request-detail-compact-page .btn {display:inline-flex;align-items:center;justify-content:center;gap:5px;text-align:center;white-space:normal;line-height:1.3;}
@media (max-width:900px) {
 body.crm-compact .request-detail-compact-page {font-size:14px;gap:8px!important;}
 body.crm-compact .request-detail-compact-page :is(.content-card,.page-header-card) {padding:10px!important;border-radius:8px;}
 body.crm-compact .request-detail-compact-page :is(.mb-3,.mb-4) {margin-bottom:10px!important;}
 body.crm-compact .request-detail-compact-page :is(.g-3,.g-4) {--bs-gutter-x:10px;--bs-gutter-y:10px;}
 body.crm-compact .request-detail-compact-page .section-title {font-size:15px;}
 body.crm-compact .request-detail-compact-page .compact-order-summary-card {padding:0!important;border:0!important;box-shadow:none!important;}
 body.crm-compact .request-detail-compact-page .customer-orders-table-wrap {overflow:visible;border:0;border-radius:0;}
 body.crm-compact .request-detail-compact-page .compact-order-summary-card :is(table,tbody) {display:block;width:100%;min-width:0;max-width:100%;}
 body.crm-compact .request-detail-compact-page .compact-order-summary-card thead {display:none;}
 body.crm-compact .request-detail-compact-page .compact-order-summary-card tbody tr {display:grid!important;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:6px 10px;padding:10px!important;border:1px solid #dbe3ec;border-radius:8px;background:#fff;}
 body.crm-compact .request-detail-compact-page .compact-order-summary-card td {display:block!important;width:auto!important;min-width:0!important;max-width:none!important;padding:0!important;margin:0!important;border:0!important;white-space:normal!important;overflow-wrap:anywhere;box-shadow:none;line-height:1.4;}
 body.crm-compact .request-detail-compact-page .compact-order-summary-card td::before {display:none!important;}
 body.crm-compact .request-detail-compact-page .compact-order-summary-card .rd-name {grid-column:1;grid-row:1;font-size:14px;font-weight:600;}
 body.crm-compact .request-detail-compact-page .compact-order-summary-card .rd-date {grid-column:2;grid-row:1;text-align:right;color:#52647a;font-size:12px;}
 body.crm-compact .request-detail-compact-page .compact-order-summary-card .rd-service {grid-column:1;grid-row:2;}
 body.crm-compact .request-detail-compact-page .compact-order-summary-card .rd-status {grid-column:2;grid-row:2;text-align:right;}
 body.crm-compact .request-detail-compact-page .compact-order-summary-card .rd-amount {grid-column:1;grid-row:3;}
 body.crm-compact .request-detail-compact-page .compact-order-summary-card .rd-payment {grid-column:2;grid-row:3;text-align:right;}
 body.crm-compact .request-detail-compact-page .compact-order-summary-card .rd-number {grid-column:1;font-size:12px;color:#52647a;}
 body.crm-compact .request-detail-compact-page .compact-order-summary-card .rd-customer {grid-column:2;text-align:right;font-size:12px;}
 body.crm-compact .request-detail-compact-page .compact-order-summary-card .rd-executor {grid-column:1 / -1;font-size:12px;}
 body.crm-compact .request-detail-compact-page .compact-order-summary-card .rd-actions {grid-column:1 / -1;justify-self:stretch;}
 body.crm-compact .request-detail-compact-page .compact-order-summary-card .rd-actions .btn {width:100%;}
 body.crm-compact .request-detail-compact-page .status-badge {white-space:normal;max-width:100%;font-size:12px;}
 body.crm-compact .request-detail-compact-page .rd-toolbar {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px!important;}
 body.crm-compact .request-detail-compact-page .btn {min-height:40px;max-width:100%;padding:7px 8px;font-size:13px;text-align:center;white-space:normal!important;}
 body.crm-compact .request-detail-compact-page :is(.form-select,.form-control) {font-size:16px;max-width:100%;min-width:0;}
 body.crm-compact .request-detail-compact-page :is(textarea,.chat-box) {scroll-margin-top:60px;}
 body.crm-compact .request-detail-compact-page .chat-box {height:auto;min-height:100px;max-height:360px;max-height:min(48dvh,420px);padding:8px;overscroll-behavior-y:auto;overscroll-behavior-x:contain;}
 body.crm-compact .request-detail-compact-page .chat-message {font-size:14px;padding:8px;}
 body.crm-compact .request-detail-compact-page .chat-meta {display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;gap:3px 8px;font-size:11px;}
 body.crm-compact .request-detail-compact-page .chat-attachment>div {display:flex;gap:6px!important;}
 body.crm-compact .request-detail-compact-page .chat-attachment .fw-semibold {flex:1 1 100%;min-width:0;}
 body.crm-compact .request-detail-compact-page .chat-attachment .btn {flex:1;min-width:0;font-size:12px;}
 body.crm-compact .request-detail-compact-page .request-chat-form {margin-top:4px!important;--bs-gutter-y:6px;}
 body.crm-compact .request-detail-compact-page .request-chat-form textarea {min-height:72px;}
 body.crm-compact .request-detail-compact-page .request-chat-form .upload-drop-main {display:none;}
 body.crm-compact .request-detail-compact-page .request-chat-form .compact-chat-label {display:none;}
 body.crm-compact .request-detail-compact-page .request-chat-form .chat-file-dropzone {border:0;background:transparent;padding:0!important;}
 body.crm-compact .request-detail-compact-page .request-chat-form .upload-drop-actions {margin-top:0;}
 body.crm-compact .request-detail-compact-page .request-chat-form :is(.upload-bottom-btn,[type="submit"]) {width:100%;}
 body.crm-compact .request-detail-compact-page .selected-file-list {margin:0 0 6px;overflow-wrap:anywhere;}
 body.crm-compact .request-detail-compact-page .selected-file-empty {font-size:12px;}
 body.crm-compact .request-detail-compact-page .list-group-item {display:flex!important;flex-wrap:wrap!important;gap:8px!important;padding:10px!important;}
 body.crm-compact .request-detail-compact-page .list-group-item>div:first-child {flex:1 1 100%;min-width:0;}
 body.crm-compact .request-detail-compact-page .list-group-item>div:last-child {display:flex;flex:1 1 100%;gap:6px!important;}
 body.crm-compact .request-detail-compact-page .list-group-item>div:last-child .btn {flex:1 1 0;min-width:0;padding:6px 3px;font-size:12px;}
 body.crm-compact .request-detail-compact-page :is(.file-row,.preview-card) {max-width:100%;min-width:0;}
 body.crm-compact .request-detail-compact-page .file-row>div {width:100%;text-align:left;}
 body.crm-compact .request-detail-compact-page .preview-card {min-height:110px!important;}
 body.crm-compact .request-detail-compact-page :is(iframe,img,video) {max-width:100%;}
}
@media (max-width:360px) {
 body.crm-compact .request-detail-compact-page .list-group-item>div:last-child .btn {font-size:11px;}
}

body.crm-compact .request-detail-compact-page .request-chat-form .upload-drop-actions {display:flex;align-items:stretch;justify-content:flex-end;gap:8px;}
body.crm-compact .request-detail-compact-page .request-chat-form .upload-drop-actions .btn {flex:0 1 auto;min-width:130px;width:auto;min-height:40px;}
@media(max-width:900px){
 body.crm-compact .request-detail-compact-page .compact-order-summary-card :is(.rd-name,.rd-service,.rd-amount,.rd-number,.rd-executor){text-align:left!important;}
 body.crm-compact .request-detail-compact-page .request-chat-form .upload-drop-actions .btn {flex:1 1 0;min-width:0;width:auto;min-height:42px;}
}

/* Inline chat belongs to the order page. Do not apply drawer scroll isolation. */
@media(max-width:900px){
 body.crm-compact .request-detail-compact-page .chat-widget,
 body.crm-compact .request-detail-compact-page .chat-box {overscroll-behavior-y:auto;}
}
