/* Updated custom.css with new color palette and styling */

/* Color Variables */
:root {
  --hunter-orange: #FF6600;
  --hunter-orange-hover: #E65C00;
  --dark-text: #4A4A4A;
  --medium-text: #6C757D;
  --light-grey: #E4E4E4;
  --sidebar-bg: #E8E8E8;
  --sidebar-hover: #D8D8D8;
  --white: #FFFFFF;
  --off-white: #F8F8F8;
  --card-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  --card-shadow-hover: 0 4px 8px rgba(0, 0, 0, 0.1);
  --input-focus-shadow: 0 0 0 0.2rem rgba(255, 102, 0, 0.25);
}

/* Global Typography */
body {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--dark-text);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--dark-text);
  font-weight: 600;
}

/* Links */
a {
  color: var(--dark-text);
  text-decoration: none;
}

a:hover {
  color: var(--hunter-orange);
}

/* Sidebar Styling */
.sidebar {
  background-color: var(--sidebar-bg);
  padding: 20px;
  height: 100vh;
  width: 210px;
  border-right: 1px solid var(--light-grey);
}

.sidebar .user-info {
  color: var(--dark-text);
  margin-bottom: 1.5rem;
}

.sidebar h5 {
  color: var(--dark-text);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.sidebar .nav-link {
  color: var(--dark-text);
  padding: 8px 12px;
  margin: 4px 0;
  border-radius: 4px;
  transition: all 0.2s;
  font-size: 0.875rem;
}

.sidebar .nav-link:hover, 
.sidebar .btn-pill:hover {
  background-color: var(--sidebar-hover);
  color: var(--hunter-orange);
}

.sidebar .nav-item .active,
.sidebar .nav-link.active {
  background-color: var(--hunter-orange);
  color: var(--white);
}

/* Button Styling */
.btn-pill {
  border-radius: 50px;
  margin: 5px 0;
  padding: 8px 16px;
  transition: all 0.2s;
}

.btn-hunter-orange {
  background-color: var(--hunter-orange) !important;
  border-color: var(--hunter-orange-hover) !important;
  color: var(--white) !important;
  border-radius: 50px;
}

.btn-hunter-orange:hover {
  background-color: var(--hunter-orange-hover) !important;
  border-color: var(--hunter-orange-hover) !important;
  transform: translateY(-1px);
}

/* Button Groups */
.btn-group .btn {
  border-radius: 0;
}

.btn-group .btn:first-child {
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}

.btn-group .btn:last-child {
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

/* Card Styling */
.card {
  border: 1px solid var(--light-grey);
  border-radius: 8px;
  transition: all 0.2s ease;
  box-shadow: var(--card-shadow);
  margin-bottom: 20px;
}

.card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-color: var(--hunter-orange);
}

.card-header {
  background-color: var(--white);
  border-bottom: 1px solid var(--light-grey);
  padding: 12px 16px;
  font-weight: 500;
}

.card-body {
  padding: 16px;
}

/* Form Controls */
.form-control {
  border-radius: 4px;
  border: 1px solid var(--light-grey);
  padding: 8px 12px;
  font-size: 0.875rem;
}

.form-control:focus {
  border-color: var(--hunter-orange);
  box-shadow: var(--input-focus-shadow);
}

.form-select {
  border-radius: 4px;
  border: 1px solid var(--light-grey);
  padding: 8px 12px;
  font-size: 0.875rem;
}

.form-select:focus {
  border-color: var(--hunter-orange);
  box-shadow: var(--input-focus-shadow);
}

/* Fix for select dropdown arrow overlap */
.form-select {
  padding-right: 2.5rem !important; /* Increase right padding to make room for the arrow */
  background-position: right 0.75rem center !important; /* Ensure arrow positioning is correct */
}

/* Fix for aligning heights of filters and communication buttons card */
.form-select, 
.card .btn-group,
.btn-group .btn-sm {
  height: 38px !important; /* Set consistent height */
  line-height: 24px !important; /* Maintain text alignment */
}

/* Remove extra padding from the card containing the buttons to match filter height */
.col-auto .card {
  padding: 0 !important;
  margin: 0 !important;
  border: 1px solid var(--light-grey) !important;
  height: 38px !important;
  display: flex !important;
  align-items: center !important;
}

/* Ensure the buttons inside the card maintain the card height */
.col-auto .card .btn-group {
  height: 100% !important;
}

.col-auto .card .btn-group .btn {
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}

/* Match mini card border color with filters */
.col-auto .card {
  border-color: var(--light-grey) !important;
  background-color: var(--white) !important;
}


/* Toggle Switch Styling */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--hunter-orange);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* Dashboard Specific Styling */
.module-card {
  border: 1px solid var(--light-grey);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: var(--card-shadow);
}

.module-card-header {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--dark-text);
}

.module-description {
  font-size: 0.875rem;
  color: var(--medium-text);
  margin-bottom: 15px;
}

/* Standardize form field widths */
.form-xs {
  max-width: 60px !important;
  width: auto !important;
}

.form-sm {
  max-width: 120px !important;
  width: auto !important;
}

.form-md {
  max-width: 240px !important;
  width: auto !important;
}

.form-lg {
  max-width: 400px !important;
  width: auto !important;
}

/* Alert Messages */
.alert-success {
  background-color: #d4edda;
  color: #155724;
  border-color: #c3e6cb;
}



/* Login Card */
/* Login page styling */
.login-container {
  min-height: 100vh;
  padding-right: 150px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.login-card {
  width: 350px;
  background: rgba(255, 255, 255, 0.9);
  padding: 2rem;
  border-radius: 8px;
}

.login-card .btn-primary {
  background-color: var(--hunter-orange);
  border-color: var(--hunter-orange);
}

.login-card .btn-primary:hover {
  background-color: var(--hunter-orange-hover);
  border-color: var(--hunter-orange-hover);
}

/* Mobile responsive login */
@media (max-width: 576px) {
  .login-container {
    padding-right: 0;
    justify-content: center !important;
  }
  
  .login-card {
    width: 90% !important;
    margin: 0 auto;
  }
}



/* Registration Form */
.registration-card {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--card-shadow-hover);
}

.registration-card .card-header {
  background-color: var(--dark-text);
  color: var(--white);
  padding: 16px;
}

.registration-card .btn-register {
  background-color: var(--hunter-orange);
  color: var(--white);
  border-radius: 50px;
  padding: 10px 20px;
  font-weight: 500;
}

.registration-card .btn-register:hover {
  background-color: var(--hunter-orange-hover);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
  
  .sidebar .nav-link {
    text-align: center;
  }
  
  .card {
    margin-bottom: 15px;
  }
}



/* Top navbar styling */
.top-navbar {
  background-color: #000000;
  color: #FFFFFF;
  padding: 10px 20px;
  width: 100%;
}

.top-navbar .navbar-brand {
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.5px;
}

/* Strong overrides for dashboard and sidebar */
body .sidebar {
  background-color: #E8E8E8 !important;
  min-height: 100vh !important;
  padding: 15px !important;
}

body .sidebar .nav-link.btn.btn-pill.text-white,
body .sidebar .nav-link.btn.btn-pill,
body .sidebar .btn-pill {
  background-color: transparent !important;
  color: #4A4A4A !important;
  border-radius: 4px !important;
}

body .sidebar .nav-link.btn.btn-pill.text-white:hover,
body .sidebar .nav-link.btn.btn-pill:hover,
body .sidebar .btn-pill:hover {
  background-color: #D8D8D8 !important;
  color: #FF6600 !important;
}

body .sidebar h5.text-white {
  color: #4A4A4A !important;
}

/* Button overrides */
.btn-hunter-orange {
  background-color: #FF6600 !important;
  border-color: #E65C00 !important;
  color: #fff !important;
  border-radius: 50px !important;
}

.btn-hunter-orange:hover {
  background-color: #E65C00 !important;
  border-color: #CC5200 !important;
}


/* Target both the card container and the button group inside it */
.row.g-2.align-items-center .col-auto .card,
.row.g-2.align-items-center .col-auto .card:hover {
  border: 1px solid var(--light-grey) !important;
  background-color: var(--white) !important;
}

/* Match mini card border color with filters */
.col-auto .card {
  border-color: var(--light-grey) !important;
  background-color: var(--white) !important;
}

/* Remove hover effects from this specific card */
.row.g-2.align-items-center .col-auto .card:hover {
  box-shadow: none !important;
  transform: none !important;
  border-color: var(--light-grey) !important;
}

/* Make sure the button group doesn't have a border that's affecting the appearance */
#txtMessageTypeGroup {
  border: none !important;
}

/* Ensure buttons in the group don't have borders that affect the card appearance */
#txtMessageTypeGroup .btn {
  border-color: var(--light-grey) !important;
}

/* User Profile Dropdown Styles */
.dropdown-menu {
  min-width: 200px;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  border: none;
  border-radius: 0.5rem;
}

#profileDropdown {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  position: relative;
}

#profileDropdown .bi-person {
  font-size: 1rem;
}

#profileDropdown .bi-caret-down-fill {
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-size: 0.5rem;
}

.dropdown-menu .fw-bold {
  color: #333;
}

#profileDropdown .caret-container {
  position: absolute;
  bottom: 0;
  right: 0;
  background-color: #343a40;
  border-radius: 50%;
  width: 12px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#profileDropdown .caret-container .bi-caret-down-fill {
  position: static;
  color: white;
  font-size: 8px;
}

/* Add these styles to your custom.css file to ensure your hunter-orange color is used consistently */

/* Override Bootstrap badge colors with hunter-orange */
.badge:not(.bg-secondary):not(.bg-success):not(.bg-danger):not(.bg-info):not(.bg-warning):not(.bg-light):not(.bg-dark) {
  background-color: var(--hunter-orange) !important;
  color: white !important;
}

/* Ensure all .bg-primary, .bg-success, etc. elements use hunter-orange */
.bg-primary, .bg-success, .bg-info {
  background-color: var(--hunter-orange) !important;
}

/* Fix alert colors to match your theme */
.alert-info {
  background-color: #F8F8F8 !important;
  border-color: var(--light-grey) !important;
  color: var(--dark-text) !important;
}

/* Override Bootstrap's built-in colors for buttons */
.btn-primary, .btn-success, .btn-info {
  background-color: var(--hunter-orange) !important;
  border-color: var(--hunter-orange-hover) !important;
  color: white !important;
}

.btn-primary:hover, .btn-success:hover, .btn-info:hover {
  background-color: var(--hunter-orange-hover) !important;
  border-color: var(--hunter-orange-hover) !important;
}

/* Add more specificity to our hunter-orange button to ensure it takes precedence */
.btn.btn-hunter-orange {
  background-color: var(--hunter-orange) !important;
  border-color: var(--hunter-orange-hover) !important;
  color: white !important;
}

.btn.btn-hunter-orange:hover {
  background-color: var(--hunter-orange-hover) !important;
  border-color: var(--hunter-orange-hover) !important;
}

/* Make form controls more consistent with your theme */
.form-control:focus, .form-select:focus {
  border-color: var(--hunter-orange) !important;
  box-shadow: var(--input-focus-shadow) !important;
}

/* Make sure secondary buttons follow your design */
.btn-secondary {
  background-color: var(--medium-text) !important;
  border-color: var(--medium-text) !important;
}

.btn-secondary:hover {
  background-color: var(--dark-text) !important;
  border-color: var(--dark-text) !important;
}

/* Override table styles for consistency */
.table-hover tbody tr:hover {
  background-color: rgba(255, 102, 0, 0.05) !important;
}

/* Add background color override to ensure theme consistency */
body {
  background-color: var(--off-white);
}

.notes-audit-icon {
  cursor: pointer;
  display: inline-block;
  margin-left: 5px;
  color: #6c757d;
}

.notes-audit-icon:hover {
  color: #FF6600; /* Match your hunter-orange color */
}

/* Make sure the tooltip is visible and properly styled */
.tooltip {
  opacity: 1 !important;
  z-index: 1070;
}

.tooltip-inner {
  max-width: 300px;
  padding: 0.5rem;
  background-color: #fff;
  color: #333;
  border: 1px solid #ddd;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  text-align: left;
}

.tooltip.bs-tooltip-auto[x-placement^=top] .arrow::before, 
.tooltip.bs-tooltip-top .arrow::before {
  border-top-color: #ddd;
}

.badge-soft-red {
  background-color: #f8d7da !important;  /* soft red background */
  color: #721c24 !important;            /* contrasting text color */
  border: 1px solid #f5c6cb;             /* optional: subtle border */
}


.staff-list {
  list-style-type: none;
  padding-left: 0;
  margin-bottom: 0;
}

.staff-list li {
  margin-bottom: 4px;
}

.staff-list li:last-child {
  margin-bottom: 0;
}

/* Invoice-specific CSS */
:root {
  --hunter-orange: #FF6600;
  --hunter-orange-hover: #E65C00;
  --dark-text: #4A4A4A;
  --medium-text: #6C757D;
  --light-grey: #E4E4E4;
}

/* Text color classes */
.text-hunter-orange {
  color: var(--hunter-orange) !important;
}

/* Print styles for invoice */
@media print {
  body {
    background-color: white !important;
    font-size: 12pt;
  }
  
  .container-fluid {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  /* Hide elements not needed for printing */
  .d-print-none,
  .navbar,
  .sidebar,
  .btn,
  footer {
    display: none !important;
  }
  
  /* Format the invoice for a nice print layout */
  #invoiceCard {
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    width: 100% !important;
  }
  
  .card-body {
    padding: 0 !important;
  }
  
  /* Ensure tables print well */
  .table {
    width: 100% !important;
    border-collapse: collapse !important;
  }
  
  .table td,
  .table th {
    background-color: white !important;
    border-color: #dee2e6 !important;
  }
  
  /* Adjust page breaks */
  table {
    page-break-inside: avoid;
  }
  
  tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }
  
  /* Ensure background colors print */
  .bg-light {
    background-color: #f8f9fa !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  
  /* Force show backgrounds for Safari */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

/* Invoice-specific element styling */
#invoiceCard {
  border: 1px solid var(--light-grey);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

#invoiceCard .table-striped > tbody > tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.02);
}

#invoiceCard .table th {
  font-weight: 600;
}

#invoiceCard .bg-light {
  background-color: #f8f9fa !important;
}

/* Ensure adequate spacing for details */
#invoiceCard .p-3,
#invoiceCard .p-4 {
  padding: 1rem !important;
}

/* Make sure borders print correctly */
#invoiceCard .border-top,
#invoiceCard .border-dark {
  border-color: #343a40 !important;
}

/* Clean table styles */
#invoiceCard .table-borderless td {
  padding: 0.4rem 0;
}

/* Notes and Payment Instructions */
#invoiceNotes,
#invoiceNotesEdit {
  min-height: 5rem;
}

/* This ensures proper spacing in the PDF output */
@page {
  margin: 0.5cm;
}

/* Additional CSS for optimized Land Use section */

/* More compact form size for numeric inputs */
.form-xs {
  max-width: 50px !important;
  width: 50px !important;
  padding: 0.25rem 0.4rem !important;
}

/* Ensure all buttons have consistent sizing */
.btn-pill {
  padding: 0.25rem 0.75rem !important;
  font-size: 0.875rem !important;
}

/* Make sure card list items have proper padding */
.list-group-item {
  padding: 1rem !important;
}

/* Make form-check more compact */
.form-check-inline {
  margin-right: 0.375rem !important;
}

/* Make labels more compact */
.form-check-label.small {
  font-size: 0.75rem !important;
  margin-bottom: 0 !important;
}

/* Ensure buttons in the same container have consistent heights */
.d-flex.justify-content-end .btn {
  height: 31px !important;
}

/* Reduce spacing between checkbox and label */
.form-check-input {
  margin-right: 0.2rem !important;
}

/* Pill button that matches a small select's height */
.btn-guide-brief {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;          /* keep text on one line */
  border-radius: 9999px;        /* pill shape */
  padding: 0 .875rem;           /* horizontal length/“elongation” */
  height: calc(1.5em + .5rem + 2px);   /* = form-select-sm height */
  width: auto !important;       /* neutralize any old circle width */
}

/* Tel links: orange by default, underline on hover */
.guide-brief a.tel-link,
.guide-brief a.tel-link:visited {
  color: var(--hunter-orange, #ff7a00);
  text-decoration: none;
}
.guide-brief a.tel-link:hover,
.guide-brief a.tel-link:focus {
  color: var(--hunter-orange, #ff7a00);
  text-decoration: underline;
}