/* App-specific overrides - minimal, focused adjustments */
/* Works alongside theme.css for Bootstrap 4 compatibility */

/* Base font size consistency */
body {
  font-size: 14px;
}

/* Table header padding */
.table thead tr th {
  padding: 8px 5px;
}

/* Modal body compact padding */
.modal-body {
  padding: 0.2rem 1rem 1rem 1rem;
}

/* Nav link vertical spacing */
.nav-link {
  padding-top: 0.3rem !important;
  padding-bottom: 0.3rem !important;
}

/* Form group labels */
.form-group label {
  font-size: 12px !important;
  margin: 0px;
}

/* Active nav item styling */
.nav-item.active {
  background-color: #f8fafc;
}

.nav-item.active .nav-link,
.nav-item.active .nav-link i {
  color: var(--main, #ff6b35) !important;
}

/* Form group spacing */
.form-group {
  margin-bottom: 0rem;
}

/* Disabled form controls */
.form-control:disabled,
.form-control[readonly] {
  background-color: var(--light, #f8fafc) !important;
}

/* UX Dialog overlay */
ux-dialog-overlay.active {
  background-color: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
}

/* Validation states */
.has-danger label {
  color: var(--danger, #ef4444);
}

.has-danger .form-control-feedback {
  color: var(--danger, #ef4444);
}

.has-danger input {
  border-color: var(--danger, #ef4444);
  padding-right: calc(1.5em + 0.75rem) !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23ef4444' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23ef4444' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* NProgress bar */
#nprogress .bar {
  background: linear-gradient(90deg, var(--main, #ff6b35) 0%, var(--main-light, #ff8c5a) 100%) !important;
  height: 3px;
}

#nprogress .peg {
  display: none;
}

#nprogress .spinner-icon {
  position: fixed;
  left: 195px;
  top: 18px;
  border-top-color: #fff;
  border-left-color: #fff;
}

/* Sidebar active state */
#wrapper .nav-item.active {
  border-left: 3px solid var(--main, #ff6b35);
  border-radius: 0 0.5rem 0.5rem 0;
  background: linear-gradient(90deg, rgba(255, 107, 53, 0.08) 0%, transparent 100%);
}

#wrapper .nav-item.active a {
  padding-left: 10px;
}

/* Servpro brand background */
.bg-servpro {
  background: var(--dark, #1e293b) !important;
}

/* Sticky table cells */
.fixed-td {
  position: sticky;
  width: 100px;
  z-index: 2;
  left: 0;
  background-color: #fff;
}

.fixed-hd {
  position: sticky;
  top: 0;
  z-index: 1;
}

.left-top-td {
  z-index: 3;
}

.scrollable-td {
  width: 200px;
}

/* Kanban board */
.kanban-board {
  display: flex;
  overflow-x: auto;
  align-items: stretch;
  padding-bottom: 1rem;
}

.kanban-board .projects-list {
  min-width: 300px;
  margin-left: 24px;
}

.kanban-board .projects-list:first-child {
  margin-left: 0;
}

.kanban-board::-webkit-scrollbar {
  -webkit-appearance: none;
  height: 8px;
}

.kanban-board::-webkit-scrollbar:vertical {
  width: 10px;
}

.kanban-board::-webkit-scrollbar:horizontal {
  height: 8px;
}

.kanban-board::-webkit-scrollbar-thumb {
  background-color: var(--border, #e2e8f0);
  border-radius: 10rem;
}

.kanban-board::-webkit-scrollbar-track {
  background: var(--light, #f8fafc);
  border-radius: 10rem;
}

.kanban-item:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
}

.kanban-item.reorderable-repeat-dragging-me {
  visibility: visible;
  color: transparent !important;
  background-color: var(--light, #f8fafc) !important;
  border: 2px dashed var(--border, #e2e8f0);
}

.kanban-item.reorderable-repeat-dragging-me * {
  visibility: hidden;
}

/* Date container delete button */
.date-container:hover .btn-delete {
  display: block !important;
}

/* Strike-through for cancelled items */
.dashed, .dashed td {
  text-decoration: line-through;
  opacity: 0.6;
}

/* Select2 refinements */
.select2-search__field {
  height: calc(1.5em + .5rem + 2px);
  padding: .25rem .5rem;
  font-size: .875rem;
  line-height: 1.5;
  border-radius: .375rem;
  border: 1px solid var(--border, #e2e8f0) !important;
}

.select2-selection {
  height: 31px !important;
  border: 1px solid var(--border, #e2e8f0) !important;
  border-radius: .375rem !important;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.select2-selection:hover {
  border-color: #cbd5e1 !important;
}

.select2-container--focus .select2-selection {
  border-color: var(--main, #ff6b35) !important;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.select2-selection__arrow {
  margin-top: 2px !important;
}

.select2-dropdown {
  border: 1px solid var(--border, #e2e8f0) !important;
  border-top: 0px !important;
  border-radius: 0 0 .375rem .375rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

.select2-container--open .select2-selection {
  border-bottom-left-radius: 0px !important;
  border-bottom-right-radius: 0px !important;
  border-bottom: 0px !important;
}

.select2-selection__rendered {
  font-size: .875rem !important;
  color: var(--text, #1e293b) !important;
}

.select2-selection__clear {
  padding-top: 4px;
}

.select2-results__option--highlighted {
  background: rgba(255, 107, 53, 0.1) !important;
  color: var(--main, #ff6b35) !important;
}
