/* Driver Hire Page Specific Styles */

/* CRITICAL: Ensure all labels are visible */
label,
.form-label {
  color: #212529 !important;
  font-weight: 600 !important;
  margin-bottom: 0.5rem;
  display: block;
}

/* Ensure labels on white backgrounds are dark */
.bg-white label,
.bg-white .form-label,
.card label,
.card .form-label {
  color: #212529 !important;
  font-weight: 600 !important;
}

/* Form section headings */
h5.text-dark {
  color: #212529 !important;
  border-bottom: 2px solid #172a74;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem !important;
}

/* Required field indicator */
.text-danger {
  color: #dc3545 !important;
}

/* Form controls */
.form-control,
.form-select {
  border: 1px solid #ced4da;
  background-color: #fff;
  color: #212529;
  padding: 0.5rem 0.75rem;
}

.form-control:focus,
.form-select:focus {
  border-color: #172a74;
  box-shadow: 0 0 0 0.2rem rgba(23, 42, 116, 0.25);
  background-color: #fff;
}

.form-control-lg {
  padding: 0.75rem 1rem;
  font-size: 1.1rem;
}

/* Input group fixes */
.input-group-text {
  background-color: #e9ecef;
  border: 1px solid #ced4da;
  color: #495057;
}

.input-group-prepend .input-group-text {
  border-right: 0;
}

/* Small helper text */
.form-text {
  color: #6c757d !important;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Headings */
.h3,
h3 {
  color: #212529 !important;
}

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

.text-muted {
  color: #6c757d !important;
}

/* Modal improvements */
.modal-dialog-scrollable .modal-body {
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

.modal-body {
  padding: 1.5rem;
}

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

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

/* Card hover effects */
.card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background-color: #fff;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15) !important;
}

.card-body {
  padding: 1.5rem;
}

/* Badge styling */
.badge {
  padding: 0.35em 0.65em;
  font-size: 0.85em;
  font-weight: 600;
}

.badge-primary {
  background-color: #172a74;
  color: #fff;
}

.badge-info {
  background-color: #17a2b8;
  color: #fff;
}

/* Button improvements */
.btn {
  font-weight: 500;
  transition: all 0.2s ease;
  border-radius: 0.25rem;
}

.btn-block {
  display: block;
  width: 100%;
}

.btn i {
  margin-right: 4px;
}

.btn-primary {
  background-color: #172a74;
  border-color: #172a74;
}

.btn-primary:hover {
  background-color: #0f1d4d;
  border-color: #0f1d4d;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.1rem;
}

/* Card title links */
.card-title a {
  color: #172a74;
  transition: color 0.2s ease;
  font-weight: 600;
}

.card-title a:hover {
  color: #21a9af;
  text-decoration: none;
}

/* Sticky sidebar */
@media (min-width: 992px) {
  .sticky-top {
    position: sticky;
    top: 20px;
    z-index: 1020;
  }
}

/* Mobile responsive fixes */
@media (max-width: 767px) {
  .d-flex.flex-wrap {
    flex-direction: column;
  }
  
  .d-flex.flex-wrap > * {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  .btn-group {
    display: flex;
    flex-direction: column;
  }
  
  .btn-group .btn {
    border-radius: 0.25rem !important;
    margin-bottom: 0.25rem;
  }
  
  .card-body {
    padding: 1rem;
  }
}

/* Filter form improvements */
#filterForm,
form.bg-white {
  background: #ffffff !important;
  border: 1px solid #e0e0e0;
}

#filterForm .form-control,
#filterForm .form-select,
form.bg-white .form-control,
form.bg-white select {
  border: 1px solid #ced4da;
  background-color: #fff !important;
  color: #212529 !important;
}

#filterForm .form-control:focus,
form.bg-white .form-control:focus {
  background-color: #fff !important;
}

/* Job grid spacing */
#jobsGrid .col-12,
#jobsGrid .col-sm-6,
#jobsGrid .col-lg-4 {
  margin-bottom: 1.5rem;
}

/* Alert styling */
.alert {
  border-radius: 0.5rem;
  border: none;
}

.alert-info {
  background-color: #e7f3ff;
  color: #004085;
}

/* Breadcrumb styling */
.breadcrumb {
  background-color: transparent;
  padding: 0.75rem 0;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  color: #6c757d;
}

/* Modal header improvements */
.modal-header.bg-primary {
  background: linear-gradient(135deg, #172a74, #21a9af) !important;
  color: #fff;
}

.modal-header .close {
  color: #fff;
  opacity: 0.8;
  text-shadow: none;
}

.modal-header .close:hover {
  opacity: 1;
}

.modal-title {
  color: #fff !important;
}

/* Loading spinner in button */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
  border-width: 0.15em;
  margin-left: 0.5rem;
}

/* Font weight utilities */
.fw-bold,
.font-weight-bold {
  font-weight: 700 !important;
}

/* Gap utility for older Bootstrap */
.gap-2 {
  gap: 0.5rem;
}

/* Spacing utilities */
.mb-4 {
  margin-bottom: 1.5rem !important;
}

.mt-3 {
  margin-top: 1rem !important;
}

.pt-3 {
  padding-top: 1rem !important;
}

.mb-3 {
  margin-bottom: 1rem !important;
}

.p-4 {
  padding: 1.5rem !important;
}

.p-5 {
  padding: 3rem !important;
}

/* Border utilities */
.border-0 {
  border: 0 !important;
}

.border-top {
  border-top: 1px solid #dee2e6 !important;
}

/* Shadow utilities */
.shadow-sm {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.shadow-lg {
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

/* Checkbox styling */
.form-check-input {
  cursor: pointer;
}

.form-check-label {
  cursor: pointer;
  color: #212529 !important;
}

/* Responsive text */
@media (max-width: 576px) {
  .h3 {
    font-size: 1.5rem;
  }
  
  .card-title {
    font-size: 1.1rem;
  }
  
  .btn {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
  }
  
  .btn-lg {
    font-size: 1rem;
    padding: 0.65rem 1.25rem;
  }
  
  .p-5 {
    padding: 1.5rem !important;
  }
}

/* Ensure proper text color in all contexts */
textarea.form-control,
input.form-control,
select.form-control {
  color: #212529 !important;
}

/* Placeholder text */
::placeholder {
  color: #6c757d !important;
  opacity: 0.7;
}

/* Section dividers */
hr {
  border-top: 1px solid #dee2e6;
  margin: 1.5rem 0;
}
