/* These styles are generated from project.scss. */

.alert-debug {
  color: black;
  background-color: white;
  border-color: #d6e9c6;
}

.alert-error {
  color: #b94a48;
  background-color: #f2dede;
  border-color: #eed3d7;
}

/* Custom styles for better text visibility */
.text-dark-readable {
  color: #212529 !important;
}

.bg-light-contrast {
  background-color: #f8f9fa !important;
  color: #212529 !important;
}

/* Fix for Bootstrap 5 badge styling - only apply to badges, not all bg- classes */
.badge.bg-success,
.badge-success {
  background-color: #198754 !important;
  color: white !important;
}

.badge.bg-danger,
.badge-danger {
  background-color: #dc3545 !important;
  color: white !important;
}

.badge.bg-warning,
.badge-warning {
  background-color: #ffc107 !important;
  color: #212529 !important;
}

.badge.bg-info,
.badge-info {
  background-color: #0dcaf0 !important;
  color: #212529 !important;
}

.badge.bg-secondary,
.badge-secondary {
  background-color: #6c757d !important;
  color: white !important;
}

.badge.bg-primary,
.badge-primary {
  background-color: #0d6efd !important;
  color: white !important;
}

/* Ensure text visibility on colored backgrounds - but don't override explicit text color classes */

/* Table improvements */
.table td, .table th {
  color: #212529;
}

.table-striped > tbody > tr:nth-of-type(odd) > td,
.table-striped > tbody > tr:nth-of-type(odd) > th {
  background-color: rgba(0, 0, 0, 0.05);
}

/* Card improvements - Don't override Bootstrap's colored card backgrounds */
.card {
  border: 1px solid #dee2e6;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  color: #212529;
}

/* Only apply dark text to plain cards without background colors */
.card:not([class*="bg-"]):not(.text-white):not(.text-dark) .card-body {
  color: #212529;
}

/* Form improvements */
.form-control, .form-select {
  color: #212529;
  background-color: #fff;
  border: 1px solid #ced4da;
}

.form-control:focus, .form-select:focus {
  color: #212529;
  background-color: #fff;
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Button improvements */
.btn {
  border-width: 1px;
}

/* Text color fixes - ensure readability */
.text-muted {
  color: #6c757d !important;
}

.text-info {
  color: #0c63e4 !important; /* Darker blue for better contrast */
}

.text-danger {
  color: #dc3545 !important;
}

.text-success {
  color: #198754 !important;
}

.text-warning {
  color: #f57c00 !important; /* Darker yellow for better contrast */
}

.text-dark {
  color: #212529 !important;
}

/* Ensure all text in tables is readable */
.table .text-muted {
  color: #6c757d !important;
}

.table .text-info {
  color: #0dcaf0 !important;
}

/* Modal improvements */
.modal-content {
  color: #212529;
}

.modal-header {
  border-bottom: 1px solid #dee2e6;
}

.modal-footer {
  border-top: 1px solid #dee2e6;
}

/* Brand secondary text styling */
.brand-secondary {
  font-size: 0.7rem;
  line-height: 1;
}

/* Message log countdown styling */
.countdown-urgent {
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* Smooth transitions for status changes */
.status-transition {
  transition: all 0.3s ease-in-out;
}

/* Enhanced spinner for better visibility */
.countdown-spinner {
  animation: spin 1s linear infinite;
  width: 12px !important;
  height: 12px !important;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* WhatsApp-style message preview */
.whatsapp-preview {
  background-color: #e5ddd5;
  padding: 15px;
  border-radius: 8px;
  max-width: 400px;
}

.whatsapp-message {
  background-color: #dcf8c6;
  padding: 8px 12px;
  border-radius: 8px;
  position: relative;
  box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
}

.whatsapp-message::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: -5px;
  width: 0;
  height: 0;
  border: 5px solid transparent;
  border-left-color: #dcf8c6;
  border-bottom: 0;
  margin-bottom: -5px;
}

.whatsapp-message img {
  border-radius: 6px;
  display: block;
}

.whatsapp-message .text-muted {
  margin-top: 4px;
  font-size: 0.9em;
  color: #667781;
}

/* Media preview image styles */
.media-preview-image {
  max-width: 300px;
  max-height: 200px;
}

.media-preview-thumbnail {
  max-width: 40px;
  max-height: 40px;
}

.media-preview-full {
  max-width: 100%;
  max-height: 200px;
}
