/* NextStop Courier - Custom Bootstrap 5 Theme */
/* Yellow and Blue Color Scheme */
:root {
    /*   Colors from the client app*/
    --nextstop-orange: #FCE205;
    --nextstop-blue: #004e89;
    --nextstop-light-orange: #ffff7f;
    --nextstop-light-blue: #1a6daa;
    --nextstop-dark-blue: #003366;
    --nextstop-dark-orange: #FCD12A;
 
}

:root {
    /* Primary Colors */
    --nextstop-orange-primary: #FCE205;
    --nextstop-orange-light: #ffff7f;
    --nextstop-orange-dark: #FCD12A;
    --nextstop-blue-primary: #004e89;
    --nextstop-blue-light: #1a6daa;
    --nextstop-blue-dark: #003366;
    /* Secondary Colors */
    --nextstop-gray-light: #F8F9FA;
    --nextstop-gray-medium: #6C757D;
    --nextstop-gray-dark: #343A40;
    /* Status Colors */
    --nextstop-success: #28A745;
    --nextstop-warning: #FFC107;
    --nextstop-danger: #DC3545;
    --nextstop-info: #17A2B8;
    /* Bootstrap Override */
    --bs-primary: var(--nextstop-orange-primary);
    --bs-secondary: var(--nextstop-blue-primary);
    --bs-success: var(--nextstop-success);
    --bs-warning: var(--nextstop-warning);
    --bs-danger: var(--nextstop-danger);
    --bs-info: var(--nextstop-info);
}

/* Custom Button Styles */
.btn-nextstop-orange {
  background-color: var(--nextstop-orange-primary);
  border-color: var(--nextstop-orange-primary);
  color: white;
}

.btn-nextstop-orange:hover {
  background-color: var(--nextstop-orange-dark);
  border-color: var(--nextstop-orange-dark);
  color: white;
}

.btn-nextstop-blue {
  background-color: var(--nextstop-blue-primary);
  border-color: var(--nextstop-blue-primary);
  color: white;
}

.btn-nextstop-blue:hover {
  background-color: var(--nextstop-blue-dark);
  border-color: var(--nextstop-blue-dark);
  color: white;
}

/* Dashboard Cards */
.dashboard-card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  margin-bottom: 1.5rem;
}

.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.dashboard-card .card-header {
  background: linear-gradient(135deg, var(--nextstop-orange-primary), var(--nextstop-orange-light));
  color: white;
  border-radius: 12px 12px 0 0 !important;
  border: none;
  font-weight: 600;
  padding: 1rem 1.25rem;
}

.dashboard-card .card-header.blue-header {
  background: linear-gradient(135deg, var(--nextstop-blue-primary), var(--nextstop-blue-light));
}

.dashboard-card .card-body {
  padding: 1.5rem 1.25rem;
}

.dashboard-card .card-footer {
  background-color: var(--nextstop-gray-light);
  border-top: 1px solid #dee2e6;
  border-radius: 0 0 12px 12px;
  padding: 1rem 1.25rem;
}

/* Status Badges */
.status-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.375rem 0.75rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-requested {
  background-color: var(--nextstop-info);
  color: white;
}

.status-accepted {
  background-color: var(--nextstop-warning);
  color: white;
}

.status-assigned {
  background-color: var(--nextstop-blue-primary);
  color: white;
}

.status-in-transit {
  background-color: var(--nextstop-orange-primary);
  color: white;
}

.status-delivered {
  background-color: var(--nextstop-success);
  color: white;
}

.status-cancelled {
  background-color: var(--nextstop-danger);
  color: white;
}

/* Navigation Styles */
.navbar-nextstop-client {
    background: linear-gradient(135deg, var(--nextstop-orange-primary), var(--nextstop-blue-primary));
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.courier {
    background: linear-gradient(135deg, var(--nextstop-blue-primary), var(--nextstop-blue-dark));
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.navbar-nextstop-admin {
    background: linear-gradient(135deg, var(--nextstop-orange-dark), var(--nextstop-orange-primary));
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-nextstop-client .navbar-brand,
.navbar-nextstop-client .nav-link {
  color: white !important;
  font-weight: 500;
}

.navbar-nextstop-client .nav-link:hover {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Form Styles */
.form-nextstop .form-control {
  border-radius: 8px;
  border: 2px solid #e9ecef;
  padding: 0.75rem 1rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-nextstop .form-control:focus {
  border-color: var(--nextstop-orange-primary);
  box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.25);
}

.form-nextstop .form-label {
  font-weight: 600;
  color: var(--nextstop-gray-dark);
  margin-bottom: 0.5rem;
}

/* Alert Styles */
.alert-nextstop {
  border: none;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.alert-nextstop.alert-info {
  background-color: rgba(46, 134, 171, 0.1);
  color: var(--nextstop-blue-dark);
  border-left: 4px solid var(--nextstop-blue-primary);
}

.alert-nextstop.alert-warning {
  background-color: rgba(255, 193, 7, 0.1);
  color: #856404;
  border-left: 4px solid var(--nextstop-warning);
}

/* Table Styles */
.table-nextstop {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

    .table-nextstop thead th {
        background-color: var(--nextstop-blue-dark);
        color: white;
        font-weight: 600;
        border: none;
        padding: 1rem;
    }

.table-nextstop tbody tr {
  transition: background-color 0.15s ease-in-out;
}

.table-nextstop tbody tr:hover {
  background-color: rgba(255, 107, 53, 0.05);
}

.table-nextstop td {
  padding: 1rem;
  vertical-align: middle;
  border-top: 1px solid #dee2e6;
}

/* Action Button Groups */
.action-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.action-buttons .btn {
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
}

/* Chat Interface */
.chat-container {
  height: 400px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  background-color: #f8f9fa;
}

.chat-message {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 18px;
  max-width: 70%;
  word-wrap: break-word;
}

.chat-message.client {
  background-color: var(--nextstop-blue-primary);
  color: white;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.chat-message.courier {
  background-color: var(--nextstop-orange-primary);
  color: white;
  margin-right: auto;
  border-bottom-left-radius: 4px;
}

.chat-message.agent {
  background-color: var(--nextstop-gray-medium);
  color: white;
  margin-right: auto;
  border-bottom-left-radius: 4px;
}

.chat-input {
  padding: 1rem;
  border-top: 1px solid #dee2e6;
  background-color: white;
  border-radius: 0 0 8px 8px;
}

/* Loading Spinner */
.nextstop-spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid rgba(255, 107, 53, 0.3);
  border-top: 3px solid var(--nextstop-orange-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .dashboard-card {
    margin-bottom: 1rem;
  }
  
  .action-buttons {
    justify-content: center;
  }
  
  .chat-message {
    max-width: 85%;
  }
  
  .table-responsive {
    font-size: 0.875rem;
  }
}

/* PWA Styles */
.pwa-install-prompt {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: linear-gradient(135deg, var(--nextstop-orange-primary), var(--nextstop-blue-primary));
  color: white;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1050;
  display: none;
}

.pwa-install-prompt.show {
  display: block;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Utility Classes */
.text-nextstop-orange {
  color: var(--nextstop-orange-primary) !important;
}

.text-nextstop-blue {
  color: var(--nextstop-blue-primary) !important;
}

.bg-nextstop-orange {
  background-color: var(--nextstop-orange-primary) !important;
}

.bg-nextstop-blue {
  background-color: var(--nextstop-blue-primary) !important;
}

.border-nextstop-orange {
  border-color: var(--nextstop-orange-primary) !important;
}

.border-nextstop-blue {
  border-color: var(--nextstop-blue-primary) !important;
}
