/* Global styles */
body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark mode adjustments */
[data-bs-theme="dark"] {
  --bs-body-bg: #1a1a1a;
  --bs-body-color: #e0e0e0;
  --bs-card-bg: #252525;
  --bs-card-border-color: #3a3a3a;
  --bs-card-cap-bg: #2d2d2d; /* Slightly lighter than card bg */
  --bs-table-striped-bg: rgba(255, 255, 255, 0.05);
  --bs-table-hover-bg: rgba(255, 255, 255, 0.08);
}

/* Light mode adjustments - softer colors */
[data-bs-theme="light"] {
  --bs-body-bg: #f5f7fa;
  --bs-body-color: #3c4858;
  --bs-card-bg: #ffffff;
  --bs-card-border-color: #eaedf1;
  --bs-card-cap-bg: #f8f9fa; /* Slightly off-white */
  --bs-table-striped-bg: rgba(0, 0, 0, 0.02);
  --bs-table-hover-bg: rgba(0, 0, 0, 0.04);
}

/* Table styling */
.table-responsive {
  overflow-x: auto;
}

.table th {
  white-space: nowrap;
}

/* Phone number styling */
.phone-number {
  font-family: monospace;
  font-weight: 600;
  font-size: 0.95rem;
  color: #2673b3; /* Darker blue for better contrast in light mode */
  background-color: rgba(52, 152, 219, 0.15);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  display: inline-block;
  border: 1px solid rgba(52, 152, 219, 0.3);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

[data-bs-theme="dark"] .phone-number {
  color: #81d4fa; /* Lighter, brighter blue for dark mode */
  background-color: rgba(129, 212, 250, 0.15);
  border-color: rgba(129, 212, 250, 0.3);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Card styling */
.card {
  transition: box-shadow 0.3s ease;
  border-radius: 0.5rem;
}

.card:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

[data-bs-theme="dark"] .card:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3) !important;
}

/* Phone numbers card styling */
.card-header .btn-link {
  color: #2673b3;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  margin: -0.5rem -0.75rem;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
}

.card-header .btn-link:hover {
  background-color: rgba(38, 115, 179, 0.1);
}

[data-bs-theme="dark"] .card-header .btn-link {
  color: #81d4fa;
}

[data-bs-theme="dark"] .card-header .btn-link:hover {
  background-color: rgba(129, 212, 250, 0.1);
}

/* Custom text truncation */
.text-truncate-custom {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}

/* Button hover effects */
.btn {
  transition: all 0.2s ease;
}

/* Primary button enhancement */
.btn-primary {
  background-color: #2673b3;
  border-color: #2673b3;
}

.btn-primary:hover, .btn-primary:focus {
  background-color: #1e5c8f;
  border-color: #1e5c8f;
}

/* Outline primary button enhancement */
.btn-outline-primary {
  color: #2673b3;
  border-color: #2673b3;
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
  background-color: #2673b3;
  border-color: #2673b3;
}

/* Dark mode button adjustments */
[data-bs-theme="dark"] .btn-primary {
  background-color: #4a9edd;
  border-color: #4a9edd;
}

[data-bs-theme="dark"] .btn-primary:hover, 
[data-bs-theme="dark"] .btn-primary:focus {
  background-color: #5eacec;
  border-color: #5eacec;
}

[data-bs-theme="dark"] .btn-outline-primary {
  color: #4a9edd;
  border-color: #4a9edd;
}

[data-bs-theme="dark"] .btn-outline-primary:hover,
[data-bs-theme="dark"] .btn-outline-primary:focus {
  background-color: #4a9edd;
  border-color: #4a9edd;
  color: #1a1a1a;
}

/* Danger button adjustments */
.btn-outline-danger {
  color: #dc3545;
  border-color: #dc3545;
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
  background-color: #dc3545;
  border-color: #dc3545;
  color: white;
}

[data-bs-theme="dark"] .btn-outline-danger {
  color: #f06672;
  border-color: #f06672;
}

[data-bs-theme="dark"] .btn-outline-danger:hover,
[data-bs-theme="dark"] .btn-outline-danger:focus {
  background-color: #f06672;
  border-color: #f06672;
  color: #1a1a1a;
}

/* Agent ID formatting */
.agent-id {
  font-family: monospace;
  font-size: 0.85rem;
}

/* Dark mode toggle styling */
.form-switch .form-check-input:checked {
  background-color: #6f42c1;
  border-color: #6f42c1;
}

.form-switch .form-check-input:focus {
  box-shadow: 0 0 0 0.25rem rgba(111, 66, 193, 0.25);
}

/* Badge styling enhancements */
.badge.bg-primary {
  background-color: #3498db !important;
}

[data-bs-theme="dark"] .badge.bg-primary {
  background-color: #5dade2 !important;
}

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

[data-bs-theme="dark"] .badge.bg-secondary {
  background-color: #8c9aa5 !important;
}

/* Phone badge styling */
.phone-badge {
  background-color: #2673b3; /* Darker blue for better contrast in light mode */
  color: white;
  font-family: monospace;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

[data-bs-theme="dark"] .phone-badge {
  background-color: #81d4fa; /* Lighter, brighter blue for dark mode */
  color: #1a1a1a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Loading animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

/* Toast styling */
.toast {
  opacity: 1 !important; /* Override Bootstrap default to ensure visibility */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-bs-theme="dark"] .toast {
  background-color: #2d2d2d;
  color: #e0e0e0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .toast-header {
  background-color: #333333;
  color: #e0e0e0;
  border-color: #444444;
}

.toast.border-success {
  border-left: 4px solid #198754 !important;
}

.toast.border-danger {
  border-left: 4px solid #dc3545 !important;
}

.toast.border-info {
  border-left: 4px solid #0dcaf0 !important;
}

.toast.border-warning {
  border-left: 4px solid #ffc107 !important;
}

/* Button group spacing */
.btn-group .btn {
  margin-right: 0; /* Reset margin */
}

/* Adjust button width for better readability */
.btn-group .btn {
  min-width: 90px;
} 