/* SMS Campaign Management System - Custom Styles */

/* Layout */
body {
  padding-top: 56px;
}

.sidebar {
  position: fixed;
  top: 56px;
  bottom: 0;
  left: 0;
  z-index: 100;
  padding: 0;
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
  overflow-x: hidden;
  overflow-y: auto;
}

.sidebar-sticky {
  height: calc(100vh - 56px);
  padding-top: .5rem;
}

.sidebar .nav-link {
  font-weight: 500;
  color: #333;
  padding: 0.5rem 1rem;
}

.sidebar .nav-link:hover {
  color: #0d6efd;
  background-color: rgba(13, 110, 253, 0.1);
}

.sidebar .nav-link.active {
  color: #0d6efd;
}

.sidebar .nav-link i {
  margin-right: 0.5rem;
}

/* Cards */
.card {
  border: none;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  margin-bottom: 1rem;
}

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

/* Tables */
.table th {
  font-weight: 600;
  background-color: #f8f9fa;
}

/* Badges */
.badge {
  font-weight: 500;
}

/* Forms */
.form-label {
  font-weight: 500;
}

/* Buttons */
.btn-group-sm > .btn, .btn-sm {
  font-size: 0.8125rem;
}

/* Pagination */
.pagination {
  margin-bottom: 0;
}

/* Alert dismissible adjustments */
.alert-dismissible .btn-close {
  padding: 0.75rem 1rem;
}

/* Stats cards */
.card .card-footer {
  background-color: rgba(0,0,0,0.05);
  border-top: 1px solid rgba(0,0,0,0.1);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Campaign status badges */
.badge.bg-running { background-color: #0dcaf0; }
.badge.bg-scheduled { background-color: #6c757d; }
.badge.bg-completed { background-color: #198754; }
.badge.bg-failed { background-color: #dc3545; }
.badge.bg-draft { background-color: #adb5bd; }

/* Responsive adjustments */
@media (max-width: 767.98px) {
  .sidebar {
    position: static;
    height: auto;
  }

  body {
    padding-top: 56px;
  }
}

/* Message preview */
.message-preview {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  padding: 1rem;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 200px;
  overflow-y: auto;
}

/* Phone number input */
.phone-list {
  font-family: monospace;
  font-size: 0.875rem;
}

/* Ticket conversation */
.ticket-message {
  border-left: 3px solid #0d6efd;
  padding-left: 1rem;
  margin-bottom: 1rem;
}

.ticket-message.internal {
  border-left-color: #ffc107;
  background-color: #fff3cd;
  padding: 0.75rem 1rem;
  border-radius: 0.25rem;
}

.ticket-message .meta {
  font-size: 0.8125rem;
  color: #6c757d;
}

/* Loading spinner */
.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* Quick stat boxes */
.stat-box {
  text-align: center;
  padding: 1.5rem;
}

.stat-box h3 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.stat-box p {
  color: #6c757d;
  margin-bottom: 0;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #6c757d;
}

.empty-state i {
  font-size: 4rem;
  opacity: 0.5;
}

/* Custom file upload */
.file-upload-wrapper {
  position: relative;
  overflow: hidden;
}

.file-upload-wrapper input[type=file] {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

/* SMS segment counter */
.segment-counter {
  font-size: 0.875rem;
  padding: 0.5rem;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-top: none;
  border-radius: 0 0 0.375rem 0.375rem;
}

.segment-counter .segments {
  font-weight: bold;
  color: #0d6efd;
}

/* Progress bars */
.progress {
  height: 1.5rem;
  border-radius: 0.375rem;
}

.progress-bar {
  font-size: 0.75rem;
  line-height: 1.5rem;
}
