.suitecrm-case-detail-wrapper {
  background-color: #f0f8ff;
  padding: 1.5em;
  margin-bottom: 2em;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Case Title */
.suitecrm-case-detail-wrapper h2 {
  font-size: 1.8em;
  margin-top: 0;
  margin-bottom: 1em;
}

/* Info Grid Layout */
.case-info-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  margin-bottom: 1.5em;
}

.case-info-item {
  flex: 1 1 298px;
  min-width: 298px;
  background-color: #ffffff;
  border: 1px solid #ddd;
  padding: 0.75em 1em;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.case-info-item strong {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25em;
}

/* Case Description & Resolution */
.case-description,
.case-resolution {
  margin-bottom: 1.5em;
  background: #fff;
  border: 1px solid #ddd;
  padding: 1em;
  border-radius: 6px;
}

.case-description p,
.case-resolution p {
  margin: 0;
}
/*case updates***/
.case-updates-thread {
  border-top: 2px solid #ccc;
  padding-top: 1.5em;
  margin-top: 2em;
}

.case-update {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1em;
  margin-bottom: 1em;
  background-color: #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.case-update.client {
  background-color: #e9f7ef;
  border-left: 4px solid #2ecc71;
}

.case-update.internal {
  background-color: #fef9e7;
  border-left: 4px solid #f1c40f;
}

.update-meta {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 0.5em;
}

.update-text {
  white-space: pre-wrap;
}
.case-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.case-update.staff {
    background: aliceblue;
    margin-left: 20px;
    border-left: 4px solid cadetblue;
}
.case-header-row h2 {
  margin: 0;
}

.return-to-list-button {
  background-color: #0073aa;
  color: white;
  padding: 6px 12px;
  text-decoration: none;
  border-radius: 3px;
  font-size: 14px;
  white-space: nowrap;
}
.case-update.internal {
    margin-left: 20px;
}
.return-to-list-button:hover {
  background-color: #005177;
}
/******case updates input*************/

.suitecrm-modal { position: fixed; inset: 0; display: none; z-index: 9999; }
.suitecrm-modal.is-open { display: block; }
.suitecrm-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.suitecrm-modal__dialog {
  position: relative; max-width: 640px; margin: 10% auto; background: #fff;
  border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.25); overflow: hidden;
}
.suitecrm-modal__header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #eee; }
.suitecrm-modal__title { margin: 0; font-size: 16px; }
.suitecrm-modal__close { border: 0; background: transparent; font-size: 22px; line-height: 1; cursor: pointer; }
.suitecrm-modal__body { padding: 16px; }
form#suitecrm-update-form {
    width: 95%;
}
.suitecrm-modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  line-height: 1;
}
.suitecrm-modal-close:hover {
  color: #000;
}

.suitecrm-modal__close {
    border: 0;
    background: #0073aa !important;
    font-size: 22px;
    cursor: pointer;
    width: 7%;
    margin: 8px;
    height: 44px;
}
/*  small badge styles */

.source-badge {
  display:inline-block;
  font-size:11px;
  line-height:1;
  padding:3px 6px;
  border-radius:10px;
  margin-left:8px;
  background:#eee;
  color:#333;
}
.source-badge.source-email  { background:#e6f0ff; color:#244a8f; }
.source-badge.source-portal { background:#e8f7ee; color:#1e7a3c; }
.source-badge.source-crm    { background:#fff4e6; color:#8a5200; }
.source-badge.source-unknown{ background:#f0f0f0; color:#666; }
