.customer-online-service-request-page {
  padding: 16px;
  padding-bottom: 120px;
}

/* HEADER */
.customer-online-service-request-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.customer-online-service-request-back-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 14px;
  background: #2563eb;
  color: white;
  font-size: 18px;
}

.customer-online-service-request-header-content {
  flex: 1;
}

.customer-online-service-request-title {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
}

.customer-online-service-request-subtitle {
  margin-top: 4px;
  font-size: 13px;
  color: #6b7280;
}

/* STATUS */

.customer-online-service-request-status-card {
  background: white;
  border-radius: 24px;
  padding: 18px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.customer-online-service-request-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.customer-online-service-request-status-badge.waiting_customer {
  background: #fef3c7;
  color: #d97706;
}

.customer-online-service-request-status-badge.completed {
  background: #dcfce7;
  color: #16a34a;
}

.customer-online-service-request-status-badge.pending {
  background: #dbeafe;
  color: #2563eb;
}

.customer-online-service-request-status-message {
  margin-top: 12px;
  font-size: 14px;
  color: #374151;
  line-height: 1.5;
}

/* CONVERSATION */
.customer-online-service-request-conversation {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* MESSAGE */

.customer-online-service-request-message {
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.customer-online-service-request-message.customer {
  background: #eff6ff;
}

.customer-online-service-request-message.technician {
  background: #fff7ed;
}

.customer-online-service-request-message-header {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 10px;
  color: #6b7280;
}

.customer-online-service-request-message-text {
  font-size: 14px;
  line-height: 1.7;
  color: #111827;
  white-space: pre-wrap;
  word-break: break-word;
}

.customer-online-service-request-message-date {
  margin-top: 14px;
  font-size: 12px;
  color: #9ca3af;
}

/* READINGS */

.customer-online-service-request-readings-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.customer-online-service-request-reading-chip {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
}

.customer-online-service-request-reading-chip.low {
  background: #fee2e2;
  color: #dc2626;
}

.customer-online-service-request-reading-chip.ok {
  background: #dcfce7;
  color: #16a34a;
}

.customer-online-service-request-reading-chip.high {
  background: #fef3c7;
  color: #d97706;
}

/* DOSAGES */

.customer-online-service-request-dosages {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.customer-online-service-request-dosage-item {
  min-height: 46px;
  border-radius: 16px;
  background: #ecfeff;
  color: #0f766e;
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
}

/* REPLY */

.customer-online-service-request-reply {
  margin-top: 24px;
}

/* CARD */

.customer-online-service-request-card {
  background: white;
  border-radius: 24px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.customer-online-service-request-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.customer-online-service-request-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  color: #111827;
}

.customer-online-service-request-card-title i {
  color: #2563eb;
}

.customer-online-service-request-card-body {
  padding-top: 18px;
}

/* TEXTAREA */

.customer-online-service-request-textarea {
  width: 100%;
  min-height: 120px;
  border: none;
  border-radius: 20px;
  background: #f8fafc;
  padding: 16px;
  resize: none;
  font-size: 14px;
  line-height: 1.6;
}

.customer-online-service-request-textarea:focus {
  outline: none;
}

.customer-online-service-request-counter {
  margin-top: 10px;
  text-align: right;
  font-size: 12px;
  color: #94a3b8;
}

/* BUTTONS */

.customer-online-service-request-add-btn,
.customer-online-service-request-send-btn {
  width: 100%;
  height: 56px;
  border: none;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
}

.customer-online-service-request-add-btn {
  background: #eff6ff;
  color: #2563eb;
}

.customer-online-service-request-send-btn {
  margin-top: 10px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.28);
}

/* TOP */
.customer-online-service-request-message-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

/* AVATAR */
.customer-online-service-request-avatar {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.customer-online-service-request-avatar.customer {
  background: #dbeafe;
  color: #2563eb;
}

.customer-online-service-request-avatar.technician {
  background: #fed7aa;
  color: #ea580c;
}

/* INFO */
.customer-online-service-request-message-info {
  flex: 1;
}

/* BUBBLE */
.customer-online-service-request-message-bubble {
  min-width: 0;
  background: rgba(255, 255, 255, 0.78);
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 13px;
  line-height: 1.3;
  color: #111827;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  display: block;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  transition: 0.2s ease;
}

.customer-online-service-request-message-bubble p {
  margin: 0;
}

/* READINGS GRID */
.customer-online-service-request-readings-list {
  display: grid;
  grid-template-columns: repeat(3, calc(33.333% - 8px));
  justify-content: space-between;
  gap: 12px 0;
  margin-top: 14px;
}

/* MINI CARD */

.customer-online-service-request-reading-mini {
  background: white;
  border-radius: 14px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 92px;
  box-sizing: border-box;
  margin-bottom: 12px;
}

/* ICON */
.customer-online-service-request-reading-mini-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  margin-bottom: 6px;
}

/* NAME */
.customer-online-service-request-reading-mini-name {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.05;
  text-align: center;
  color: #6b7280;
  min-height: 22px;
  margin-bottom: 6px;
}

/* VALUE */

.customer-online-service-request-reading-mini-value {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  text-align: center;
}

/* PHOTOS */

.customer-online-service-request-photos {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 12px;
}

.customer-online-service-request-photo {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 10px;
}

/* HEADER ROW */
.customer-online-service-request-message-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.customer-online-service-request-message-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* COLLAPSE */
.customer-online-service-request-message-body {
  margin-top: 8px;
  min-width: 0;
}

.customer-online-service-request-message-body.collapsed {
  display: none;
}

/* ARROW */
.customer-online-service-request-collapse-arrow {
  color: #94a3b8;
  transition: 0.2s;
}

.customer-online-service-request-collapse-arrow.active {
  transform: rotate(180deg);
}

/* LABEL */
.customer-online-service-request-message-label {
  font-size: 10px;
  font-weight: 700;
  color: #9ca3af;
  margin-bottom: 2px;
  line-height: 1;
}

/* LABEL ROW */
.customer-online-service-request-message-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

/* MESSAGE */
.customer-online-service-request-message-bubble.collapsed-text {
  height: 30px;

  overflow: hidden;

  white-space: nowrap;

  text-overflow: ellipsis;

  line-height: 18px;
}

/* READ MORE */
.customer-online-service-request-read-more {
  margin-top: 0px;
  font-size: 12px;
  font-weight: 700;
  color: #2563eb;
}

/* DOSAGE ICON */

.customer-online-service-request-reading-mini-icon.dosage {
  background: #dbeafe;
  color: #2563eb;
}

/* TECH NOTE */

.customer-online-service-request-tech-note {
  margin-top: 12px;

  font-size: 12px;

  line-height: 1.5;

  color: #6b7280;
}

/* ============================================================================================= */
/* CHAT CONVERSACIONAL */
/* ============================================================================================= */

/* ======================================
   THREAD MESSAGES
====================================== */

.online-service-thread-message {
  border-radius: 22px;
  margin-bottom: 16px;
  overflow: hidden;
}

.online-service-thread-message.customer {
  background: #eff6ff;
}

.online-service-thread-message.technician {
  background: #fff7ed;
}

/* HEADER */

.online-service-thread-message-header {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.online-service-thread-message-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* AVATAR */

.online-service-thread-message-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.online-service-thread-message-avatar.customer {
  background: #dbeafe;
  color: #2563eb;
}

.online-service-thread-message-avatar.technician {
  background: #fed7aa;
  color: #ea580c;
}

/* NAME */

.online-service-thread-message-name {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
}

/* DATE */

.online-service-thread-message-date {
  margin-top: 3px;
  font-size: 12px;
  color: #9ca3af;
}

/* BODY */

.online-service-thread-message-body {
  padding: 0 16px 16px;
}

.online-service-thread-message-body.collapsed {
  display: none;
}

/* TEXT */

.online-service-thread-message-text {
  background: rgba(255, 255, 255, 0.75);
  border-radius: 16px;
  padding: 14px;
  font-size: 14px;
  line-height: 1.7;
  color: #111827;
  word-break: break-word;
}

/* ARROW */

.online-service-thread-message-arrow i {
  color: #94a3b8;
}

/* ======================================
   READINGS HISTORY
====================================== */

.online-service-reading-history-group {
  background: #f8fafc;
  border-radius: 22px;
  margin-bottom: 16px;
  overflow: hidden;
}

/* HEADER */

.online-service-reading-history-header {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

/* TITLE */

.online-service-reading-history-title {
  font-size: 13px;
  font-weight: 800;
  color: #111827;
}

/* DATE */

.online-service-reading-history-date {
  font-size: 12px;
  color: #94a3b8;
}

/* BODY */

.online-service-reading-history-body {
  padding: 0 16px 16px;
}

.online-service-reading-history-body.collapsed {
  display: none;
}

.online-service-history-photos-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.online-service-history-photo {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  background: #f3f4f6;
}

.online-service-history-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ======================================
   HEADER TOP
====================================== */

.customer-online-service-request-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.customer-online-service-request-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.customer-online-service-request-header-id {
  font-size: 24px;
  font-weight: 800;
  color: #111827;
}

.customer-online-service-request-header-date {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

/* ======================================
   STATUS BADGE
====================================== */

.customer-online-service-request-header-status {
  display: flex;
  align-items: center;
  gap: 6px;

  padding: 8px 12px;

  border-radius: 999px;

  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

/* PENDING */

.customer-online-service-request-header-status.pending {
  background: #fef3c7;
  color: #b45309;
}

/* REVIEWING */

.customer-online-service-request-header-status.reviewing {
  background: #dbeafe;
  color: #1d4ed8;
}

/* WAITING CUSTOMER */

.customer-online-service-request-header-status.waiting_customer {
  background: #ede9fe;
  color: #7c3aed;
}

/* COMPLETED */

.customer-online-service-request-header-status.completed {
  background: #dcfce7;
  color: #15803d;
}

/* CANCELLED */

.customer-online-service-request-header-status.cancelled {
  background: #fee2e2;
  color: #dc2626;
}
