/*
 * PrestaRma Module - Front Office Stylesheet
 */

/* General styles for RMA pages */
.rma-list .badge {
  min-width: 80px;
  display: inline-block;
}

.rma-chat-timeline {
  max-height: 500px;
  overflow-y: auto;
  padding: 1rem;
  background-color: #f8f9fa; /* Light grey background for chat area */
  border-radius: .25rem;
}

.message-item {
  display: flex;
  margin-bottom: 1rem;
}

.message-item .card {
  max-width: 75%; /* Limit message bubble width */
  border-radius: .75rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.075);
}

.message-item.justify-content-end .card {
  background-color: #007bff; /* Primary blue for customer messages (self) */
  color: #fff;
}

.message-item.justify-content-start .card {
  background-color: #fff; /* White for employee messages (other) */
  border-color: #dee2e6;
  color: #212529;
}

.message-item .card-body {
  padding: .75rem 1rem;
}

.message-item .card-text {
  margin-bottom: .5rem;
  white-space: pre-wrap; /* Preserve whitespace and line breaks */
  word-break: break-word; /* Break long words */
}

.message-item .attachments ul {
  padding-left: 20px; /* Indent attachment list */
}

.message-item .attachments li {
  font-size: 0.9em;
}

.message-item .attachments a {
  text-decoration: underline;
}

.message-item .text-muted {
  font-size: 0.8em;
}

/* Adjustments for responsive view */
@media (max-width: 767.98px) {
  .message-item .card {
    max-width: 90%;
  }
}

/* Form specific styles */
.js-rma-product-details {
  border: 1px dashed #ced4da;
  border-radius: .25rem;
  padding: 1rem;
  margin-top: 1rem;
}
.js-rma-product-details.d-none {
  display: none !important;
}

.js-rma-create-form .form-group label {
  font-weight: 500;
}

.js-rma-create-form small.form-text {
  font-size: 0.8em;
}

/* Pagination styles */
.pagination_wrapper {
  margin-top: 2rem;
}
.pagination_wrapper .page-item.active .page-link {
  background-color: #007bff;
  border-color: #007bff;
  color: #fff;
}
.pagination_wrapper .page-item .page-link {
  color: #007bff;
}
.pagination_wrapper .page-item .page-link:hover {
  background-color: #e9ecef;
}

/* General card styling (if not already handled by theme) */
.card {
  margin-bottom: 2rem;
  border-radius: .25rem;
  border: 1px solid rgba(0,0,0,.125);
  box-shadow: 0 .125rem .25rem rgba(0,0,0,.075);
}
.card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid rgba(0,0,0,.125);
  padding: .75rem 1.25rem;
}

/* Alert messages from controllers */
.alert-success, .alert-danger, .alert-info, .alert-warning {
  margin-top: 1rem;
  margin-bottom: 1rem;
}