/* =============================================================
   QAS eMIT App-Specific Styles
   These styles complement the QLD Design System styles
   ============================================================= */

:root {
  --peachy-salmon: #ff9f80;
  --peachy-salmon-light: #ffb39d;
  --peachy-salmon-dark: #ff8a6b;
}

/* App-specific card enhancements - QLD card titles handled in qld-styles.css */

/* Enhanced spacing between form sections (app-specific) */
.card-body .mb-3,
.card-body .row.mb-3 {
  margin-bottom: 2rem !important;
}

/* Extra spacing for major form sections */
.card-body > .mb-3:last-of-type,
.card-body > .row.mb-3:last-of-type {
  margin-bottom: 1.5rem !important;
}

/* Form label icon color (app-specific) */
.form-label i {
  color: var(--qld-mid-gray);
}

/* Required Field Indicator */
.text-danger {
  font-weight: 600;
}

/* Emergency Priority Colors */
.priority-1 {
  color: #dc3545;
  font-weight: 700;
}

.priority-2 {
  color: #fd7e14;
  font-weight: 700;
}

.priority-3 {
  color: #0dcaf0;
  font-weight: 700;
}

.priority-4 {
  color: #6c757d;
  font-weight: 700;
}

/* Animation for form submission */
@keyframes submitPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.btn.submitting {
  animation: submitPulse 1s infinite;
}

/* Auto-filled field styling */
.form-control.auto-filled,
.form-select.auto-filled {
  background-color: #f8f9fe;
  border-color: #6f42c1;
  box-shadow: 0 0 0 0.1rem rgba(111, 66, 193, 0.15);
}

/* Auto-filled field focus styling - match normal Bootstrap focus */
.form-control.auto-filled:focus,
.form-select.auto-filled:focus {
  background-color: #f8f9fe;
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
  outline: 0;
}

/* Auto-fill animation */
@keyframes autoFillGlow {
  0% {
    box-shadow: 0 0 0 0.1rem rgba(111, 66, 193, 0.15);
  }
  50% {
    box-shadow: 0 0 0 0.3rem rgba(111, 66, 193, 0.3);
  }
  100% {
    box-shadow: 0 0 0 0.1rem rgba(111, 66, 193, 0.15);
  }
}

.auto-fill-animation {
  animation: autoFillGlow 1.5s ease-in-out;
}

/* Responsive adjustments (app-specific) */
@media (max-width: 768px) {
  .card-body {
    padding: 1.5rem;
  }
}

/* Enhanced Validation Styles */
.field-error {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: block;
  animation: slideInError 0.3s ease-out;
}

@keyframes slideInError {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-progress {
  border-left: 4px solid #6c757d;
  padding-left: 1rem;
  margin-bottom: 1.5rem;
  background: rgba(108, 117, 125, 0.05);
  border-radius: 0 8px 8px 0;
}

/* Alert icon size (app-specific enhancement) */
.alert i {
  font-size: 1.1rem;
}

/* Validation Summary Specific Styling */
#validationSummary {
  background: linear-gradient(135deg, #fff3cd, #ffecb3);
  border-left: 4px solid #fd7e14;
  color: #664d03;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  box-shadow: 0 2px 8px rgba(253, 126, 20, 0.15);
}

#validationSummary .bi-exclamation-triangle {
  color: #fd7e14;
  font-size: 1.1rem;
}

#validationList {
  list-style-type: none;
  padding-left: 0;
}

#validationList li {
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(253, 126, 20, 0.1);
}

#validationList li:last-child {
  border-bottom: none;
}

#validationList li:before {
  content: "•";
  color: #fd7e14;
  font-weight: bold;
  display: inline-block;
  width: 1em;
  margin-left: -1em;
  margin-right: 0.5em;
}

.required::after {
  content: " *";
  color: red;
  font-weight: bold;
}

/* Validation Summary Link Styles */
#validationList a {
  color: #856404;
}

#validationList a.validation-field-link {
  text-decoration: none;
}

#validationList a.validation-field-link:hover {
  text-decoration: underline !important;
  text-decoration-line: underline !important;
  text-decoration-thickness: 1px !important;
}

#validationList > div {
  list-style: none !important;
  list-style-type: none !important;
  padding-left: 0 !important;
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(253, 126, 20, 0.1);
}

#validationList > div:last-child {
  border-bottom: none;
}

#qas-logo-header {
  width: 70px;
  height: 60px;
}

.peachy-bg {
  background-color: var(--peachy-salmon) !important;
}

.peachy-dark-bg {
  background-color: var(--peachy-salmon-dark) !important;
}

.btn-peachy {
  background-color: var(--peachy-salmon);
  border-color: var(--peachy-salmon);
  color: white;
}

.btn-peachy:hover {
  background-color: var(--peachy-salmon-dark);
  border-color: var(--peachy-salmon-dark);
  color: white;
}

 Outline success button focus styling - match primary button focus */
.btn-outline-success:focus {
  box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
  outline: 0;
}

/* Danger button focus styling */
.btn-danger:focus {
  box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
  outline: 0;
}

/* Outline secondary button focus styling */
.btn-outline-secondary:focus {
  box-shadow: 0 0 0 0.25rem rgba(108, 117, 125, 0.25);
  outline: 0;
}

/* =============================================================
   Login Page Styles (App-specific)
   ============================================================= */
/* Style the login button */
#login-button {
  background-color: #0d6efd; /* Bootstrap primary color */
  color: white;
  border: none;
  border-radius: 5px;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

#login-button:hover {
  background-color: #0056b3; /* Darker shade of primary color */
  transform: scale(1.05);
}

#login-button:active {
  background-color: #004085; /* Even darker shade for active state */
  transform: scale(0.95);
}

/* Resize the QAS logo */
#qas-logo {
  width: 180px; /* Adjust width */
  height: 180px; /* Adjust height */
  object-fit: contain; /* Ensure the image scales properly */
}

/* =============================================================
   Job Queue Table Styling (App-specific parts)
   ============================================================= */
.filter-button {
  margin-bottom: 5px;
}

.filter-p {
  font-weight: 600;
  font-size: medium;
}

/* Table styling to match design */
#jobQueueTable {
  border-collapse: separate;
  border-spacing: 0;
}

/* Remove vertical borders, keep only horizontal */
#jobQueueTable.table-bordered th,
#jobQueueTable.table-bordered td {
  border-left: none;
  border-right: none;
}

#jobQueueTable.table-bordered {
  border-left: none;
  border-right: none;
}

/* Header styling */
#jobQueueTable thead {
  background-color: transparent !important;
}

/* First column left-aligned, others center-aligned */
#jobQueueTable thead th:first-child,
#jobQueueTable tbody td:first-child {
  text-align: left;
}

#jobQueueTable thead th:not(:first-child),
#jobQueueTable tbody td:not(:first-child) {
  text-align: center;
}

/* Buttons in table cells should keep their normal styling */
/* Ensure primary buttons in table maintain their white text */
#jobQueueTable tbody td .btn-primary {
  color: var(--qld-white) !important;
}

/* Remove default hover effect or keep subtle */
#jobQueueTable tbody tr:hover {
  background-color: inherit;
}

/* Readonly field styling - slightly grey background to indicate readonly state */
/* Applied globally across all forms */
input[readonly],
textarea[readonly],
select[readonly] {
  background-color: #f5f5f5 !important;
  cursor: not-allowed;
}

/* Also style disabled fields for consistency */
input[disabled],
textarea[disabled],
select[disabled] {
  background-color: #f5f5f5 !important;
  cursor: not-allowed;
}
