/* CAMS Custom Styles - Bootstrap Colors Only (White, Blue, Green) */

/* Package cards */
.package-card {
  transition: transform 0.2s ease-in-out;
  border: 1px solid #dee2e6;
}

.package-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Dashboard cards - Bootstrap colors only */
.earning-card {
  background-color: #0d6efd;
  /* Bootstrap primary */
  color: white;
}

.balance-card {
  background-color: #0d6efd !important;
  /* Bootstrap primary */
  color: white !important;
  border: 1px solid #0d6efd;
}

.referral-card {
  background-color: #198754;
  /* Bootstrap success */
  color: white;
}

/* Chat system */
.chat-container {
  height: 400px;
  overflow-y: auto;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
}

.chat-message {
  margin-bottom: 1rem;
}

.chat-message.own-message {
  text-align: right;
}

.chat-message .message-bubble {
  display: inline-block;
  max-width: 70%;
  padding: 0.5rem 1rem;
  border-radius: 1rem;
  word-wrap: break-word;
}

.chat-message.own-message .message-bubble {
  background-color: #0d6efd;
  /* Bootstrap primary */
  color: white;
}

.chat-message:not(.own-message) .message-bubble {
  background-color: #198754;
  /* Bootstrap success */
  color: white;
}

/* Link tracking modal */
.link-tracking {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  background: white;
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3);
}

/* Progress circle */
.progress-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: conic-gradient(#0d6efd 0deg, #e9ecef 0deg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.progress-circle .inner {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #0d6efd;
}

/* Status badges */
.status-active {
  background-color: #198754 !important;
  /* Bootstrap success */
}

.status-pending {
  background-color: #ffc107 !important;
  /* Bootstrap warning */
}

.status-completed {
  background-color: #0d6efd !important;
  /* Bootstrap primary */
}

/* Profile avatar */
.avatar {
  width: 40px;
  height: 40px;
  background-color: #0d6efd;
  /* Bootstrap primary */
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: bold;
}

/* Sidebar */
.sidebar {
  background-color: white;
  border-right: 1px solid #dee2e6;
}

.sidebar .nav-link {
  color: #6c757d;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  margin-bottom: 0.25rem;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  background-color: #0d6efd;
  color: white;
}

/* Utility classes */
.min-vh-75 {
  min-height: 75vh;
}

/* Enhanced Chat Styles */
.file-attachment a {
  transition: background-color 0.2s ease;
}

.file-attachment a:hover {
  background-color: #f8f9fa !important;
}

#messageInput {
  transition: height 0.2s ease;
}

#filePreview {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Chat message improvements */
.chat-message img {
  transition: transform 0.2s ease;
}

.chat-message img:hover {
  transform: scale(1.05);
}

/* Simple and Perfect Chat Bubble Styling (Original) */
.chat-message {
  margin-bottom: 1rem;
}

.message-bubble {
  display: inline-block;
  max-width: 80%;
  padding: 0.5rem 0.75rem;
  border-radius: 1rem;
  word-wrap: break-word;
}

.chat-message.own-message {
  text-align: right;
}

.chat-message.own-message .message-bubble {
  background-color: #0d6efd;
  color: white;
}

.chat-message:not(.own-message) .message-bubble {
  background-color: #f8f9fa;
  color: #212529;
  border: 1px solid #dee2e6;
}

.message-time {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 0.25rem;
}

/* Notification badges */
.badge.rounded-pill {
  font-size: 0.7em;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
  }

  70% {
    box-shadow: 0 0 0 5px rgba(220, 53, 69, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
  }
}

/* Silent notifications (no beep) */
.alert.position-fixed {
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Mobile Responsive Tables */
@media (max-width: 768px) {
  .table-responsive {
    font-size: 0.875rem;
  }

  .table-responsive table {
    min-width: 100%;
  }

  .table-responsive th,
  .table-responsive td {
    padding: 0.5rem 0.25rem;
    white-space: nowrap;
  }

  /* Make badges smaller on mobile */
  .table .badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.4rem;
  }

  /* Adjust card padding on mobile */
  .card-body {
    padding: 1rem;
  }

  /* Stack cards better on mobile */
  .row>[class*="col-"] {
    margin-bottom: 1rem;
  }

  /* Better font sizes on mobile */
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  h4 {
    font-size: 1.1rem;
  }

  h5 {
    font-size: 1rem;
  }

  /* Dashboard card improvements */
  .card .display-6 {
    font-size: 2rem;
  }

  .card h3 {
    font-size: 1.5rem;
  }

  .card h5 {
    font-size: 0.9rem;
  }

  .card small {
    font-size: 0.75rem;
  }
}