body {
  font-family: 'Roboto', Arial, sans-serif;
  line-height: 1.8;
  color: #4a4a4a;
  background-color: #f7f7f7; /* Preserved the clean background color */
}

form {
  margin-bottom: 30px;
  padding: 25px;
  background-color: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12); /* Slightly stronger shadow for depth */
  border-radius: 15px; /* Maintained modern rounded corners */
}

table {
  width: 100%;
  border-collapse: collapse;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); /* Increased shadow for a floating effect */
}

th, td {
  border: 1px solid #e0e0e0; /* Softened border color for a lighter look */
  padding: 16px; /* Slightly more padding for roomier cells */
  text-align: left;
}

th {
  background-color: #f2f2f2; /* Lighter header background for a more modern feel */
  color: #333333;
  font-weight: 600;
}

tr:nth-child(even) {
  background-color: #fcfcfc; /* Even lighter row background for subtle zebra striping */
}

thead th {
  text-align: left !important;
}

ul {
  list-style-type: none;
}

/* Style for navigation tabs */
.nav-tabs {
  border-bottom: 2px solid #dee2e6; /* Clearer bottom border for the tab set */
  display: flex;
  justify-content: center; /* Centers tabs if there is room */
  padding-bottom: 1rem;
}

/* Styles for navigation tabs */
.nav-tabs {
  border-bottom: 2px solid #dee2e6; /* Clear bottom border for the tab set */
  display: flex;
  justify-content: center; /* Center tabs for a balanced look */
  padding-bottom: 1rem;
  overflow-x: auto; /* Allows scrolling on smaller screens */
}

/* Style for navigation tabs */
.nav-tabs {
  border-bottom: 2px solid #dee2e6; /* Clearer bottom border for the tab set */
  display: flex;
  justify-content: center; /* Centers tabs if there is room */
  padding-bottom: 1rem;
}

.nav-tabs .nav-link {
  color: #495057; /* Neutral color for non-active tabs */
  background-color: transparent; /* No background for a minimalistic look */
  border: none; /* Remove borders from individual tabs */
  margin-right: 1rem; /* Space between tabs */
  font-size: 1rem; /* Standard font size for tabs */
  transition: color 0.3s, background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
  margin-top: 5px;
  margin-bottom: -10px; /* Pulls the link down to cover the bottom border */
}

.nav-tabs .nav-link:hover {
  color: #1b6db8; /* Highlight color on hover */
  background-color: #e9ecef; /* Subtle background on hover */
  border-radius: 0.375rem; /* Rounded corners for a softer look */
  transform: scale(1.05); /* Slight increase in size on hover for emphasis */
}

.nav-tabs .nav-link.active {
  color: #fff; /* White text for active tab */
  font-weight: bold; /* Bold font for active tab */
  background-color: #007bff; /* Use a strong color for active tab */
  border-radius: 0.375rem; /* Consistent rounded corners for active tab */
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15); /* Shadow for elevation effect */
  transform: none; /* No transform on active tab */
}


.custom-tabs {
  border-bottom: 1px solid #dee2e6 !important;
}

.custom-tabs .nav-link.active {
  font-weight: normal;
  color: #1b6db8 !important;
  border-bottom: 2px solid #1b6db8 !important;
}

.accordion-toggle {
  cursor: pointer;
}

.expanded-table {
  margin: 0;
  font-size: 14px;
  width: 100%;
  border-collapse: collapse;
}

.expanded-table th,
.expanded-table td {
  padding: 16px; /* Consistent padding with other table elements */
  border: 1px solid #e0e0e0;
}

.help-icon {
  color: #007bff;
  margin-right: 5px;
  cursor: pointer;
}

.description {
  display: none;
  background-color: #007bff;
  color: white;
  padding: 5px;
  border-radius: 5px;
  position: absolute;
  z-index: 1;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3); /* Stronger shadow for better visibility */
  font-size: 12px;
}

.form-group:hover .description {
  display: block;
}





.input-form, .form-control {
  outline: 0;
  border-width: 0 0 3px;
  border-color: #ced4da;
  color: #495057;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  padding: 0.65rem 0.85rem; /* Minor increase in padding for a more spacious feel */
  border-radius: 8px;
}

.input-form:focus, .form-control:focus {
  border-color: #42a5f5; /* Brighter and more noticeable focus color */
  box-shadow: 0 0 12px rgba(66, 175, 255, 0.6); /* Enhanced focus glow for better visual feedback */
}


.email-error,
.password-error {
  outline: 0;
  border-width: 0 0 2px;
  border-color: red;
}

.email-error:focus,
.password-error:focus {
  outline: 0;
  border-width: 0 0 2px;
  border-color: red;
}

.highlight {
  background-color: #e1f5fe; /* Lighter highlight for a more subtle effect */
}




.form-control {
  display: block;
  width: 100%;
  height: calc(1.5em + 0.75rem + 2px);
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#parametersForm td {
  vertical-align: middle !important;
  padding: 0.3rem !important;
}

#parametersForm th {
  text-align: center !important;
  padding: 0.65rem 0.35rem !important;
}

#parametersForm .form-control {
  padding: 0.375rem 0 0.375rem 0.25rem !important;
}

.cursor-pointer {
  cursor: pointer;
}

#dep_var li {
  padding: 5px 10px;
  border-radius: 5px;
  margin-bottom: 2px;
  text-transform: capitalize;
}

#dep_var .selected,
#link_cost_factors .selected,
#link_media_factors .selected {
  background-color: #d7d7db; /* Adjusted selected color for better visibility */
}



/* fix scrollbar  jumping */
@media screen and (min-width: 960px) {
  html {
    margin-left: calc(100vw - 100%);
    margin-right: 0;
  }
}

td[data-title]:hover::before {
  content: attr(data-title);
  background-color: #ff5252; /* More striking color for hover tooltips */
  color: #fff;
  padding: 13px; /* More padding for larger, clearer tooltips */
  box-shadow: 0 5px 12px rgba(0,0,0,0.35); /* Deeper shadow for emphasis */
  position: absolute;
  z-index: 1;
  border-radius: 5px;
}

/* Keyframes for spinning animation with dynamic scaling */
@keyframes spinAndScale {
  0% { transform: translate(-50%, -50%) scale(0.75) rotate(0deg); }
  50% { transform: translate(-50%, -50%) scale(1) rotate(180deg); }
  100% { transform: translate(-50%, -50%) scale(0.75) rotate(360deg); }
}

/* Keyframes for color transition */
@keyframes colorShift {
  0%, 100% { border-color: #42a5f5 transparent #42a5f5 transparent; }
  25% { border-color: #3ae374 transparent #3ae374 transparent; }
  50% { border-color: #f67383 transparent #f67383 transparent; }
  75% { border-color: #fdb147 transparent #fdb147 transparent; }
}

/* Keyframes for pulsating glow */
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 20px 0px rgba(66, 165, 245, 0.5); }
  50% { box-shadow: 0 0 30px 15px rgba(66, 165, 245, 0.7); }
}

/* Keyframes for light trail effect */
@keyframes lightTrail {
  0%, 100% { box-shadow: 0 0 15px 2px #42a5f5; }
  25% { box-shadow: 0 0 15px 2px #3ae374; }
  50% { box-shadow: 0 0 15px 2px #f67383; }
  75% { box-shadow: 0 0 15px 2px #fdb147; }
}

/* Loader styles */
.loader {
  display: block; /* Set to block to make the loader visible */
  position: fixed; /* Fixed position to stay in the center */
  top: calc(50% + 50px); /* Lowered by 50 pixels */
  left: 50%;
  transform: translate(-50%, -50%);
  width: 75px;
  height: 75px;
  border: 11px solid transparent; /* Initially transparent borders */
  border-radius: 50%;
  border-top-color: #42a5f5; /* Initial color for the top border */
  animation: 
    spinAndScale 2s linear infinite, /* Spinning and scaling animation */
    colorShift 6s ease-in-out infinite, /* Color transition animation */
    pulse 2s infinite ease-in-out; /* Pulsating glow animation */
    lightTrail;
  z-index: 9999; /* Ensures that the loader is above other elements */
}

/* Optional: Overlay styles for a slightly darker background */
.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(50, 50, 50, 0.5); /* Dark overlay background */
  z-index: 9998; /* Just below the loader to cover the content */
  display: flex; /* Ensures that the loader is centered */
  align-items: center;
  justify-content: center;
}

/* Make the overlay visible */
.loader-overlay-active {
  display: flex;
}

/* Hide the overlay */
.loader-overlay-hidden {
  display: none;
}

/* Centering the Optimizing text within its container */
#optimizingText {
  position: absolute; /* Absolute position for precise control */
  top: 35%; /* Position above the loader */
  left: 50%; /* Center horizontally in the container */
  transform: translate(-50%, -50%); /* Center the element */
  display: block; /* Ensure it's visible */
  font-size: 2rem; /* Font size */
  font-weight: bold; /* Bold text */
  white-space: nowrap; /* Keep text in a single line */
  padding: 4rem; /* Add padding to ensure space around the text */
  background: rgba(255, 255, 255, 0.8); /* Optional: add a background to make it stand out */
  border-radius: 10px; /* Optional: rounded corners for the background */
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1); /* Optional: slight shadow for depth */
}

/* Animation for the dots */
#optimizingText::after {
  content: ''; /* Start with no content */
  display: inline-block;
  width: 1ch;
  animation: dots 1.5s steps(4, end) infinite; /* Animation for the ellipsis effect */
  overflow: visible;
}

@keyframes dots {
  0%, 20% { content: '.'; }
  40%, 60% { content: '..'; }
  80%, 100% { content: '...'; }
}

#optimizingText, #optimizationResultsText, #loader {
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.hidden {
  opacity: 0;
  visibility: hidden;
}

.visible {
  opacity: 1;
  visibility: visible;
}



#diminishing-return {
  direction: rtl;
}

#advanced-options-toggle {
  display: inline-block;
  margin: 28px 0 18px; /* Increased margin for more distinct separation */
  cursor: pointer;
  color: #1976d2; /* Consistent color with other interactive elements */
  transition: color 0.3s, transform 0.3s;
}

#advanced-options-toggle:hover {
  text-decoration: underline;
  color: #0d47a1; /* Darker hover color for better contrast */
  transform: translateY(-2px); /* Enhanced movement on hover for a more dynamic interaction */
}

.advanced-section {
  height: 0;
  overflow: hidden;
  -webkit-transition: height 500ms;
  transition: height 500ms;
  margin-bottom: 28px;
}
.advanced-section.expanded {
  height: auto;
}


/* Responsive Design for Smaller Screens */
@media screen and (max-width: 768px) {
  body {
    margin: 20px; /* Reduced margin on smaller screens for space efficiency */
  }

  .nav-tabs .nav-link {
    margin-bottom: 6px; /* Adjusted margin for better layout on mobile devices */
  }

  .form-control, .input-form {
    width: 100%; /* Full width inputs for easier interaction on smaller screens */
  }
}

.help-link {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    overflow: hidden;
    padding: 2px 0; /* Adjust padding as needed */
}

.help-link:hover {
    color: #007bff;
}

.help-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px; /* Height of the underline */
    background-color: #007bff; /* Color of the underline */
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.help-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.excel-upload-button {
    background-image: linear-gradient(to right, #0D8549, #1EAC47, #20B14C); /* Excel gradient */
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    font-size: 16px;
}

.excel-upload-button i {
    margin-right: 10px; /* Space between icon and text */
}

.excel-upload-button, #submit-button {
    width: 100%; /* Make the buttons take the full width of their parent */
}

.excel-upload-button:hover {
    background-image: linear-gradient(to right, #0C6B3A, #14943B, #17A945); /* Darker gradient on hover */
}

.excel-upload-button:active {
    transform: scale(0.98); /* Slight push effect on click */
}

.date-format-list li {
    font-size: 0.85em; /* Smaller font size */
    white-space: nowrap; /* Prevents text from wrapping */
}




/* General slider styles */
input[type=range].form-control-range {
  -webkit-appearance: none; /* Removes default webkit styles */
  appearance: none;
  width: 100%; /* Full width */
  height: 15px; /* Specified height of slider */
  border-radius: 10px; /* Rounded corners */
  background: linear-gradient(
    to right,
    rgba(255, 0, 0, 0.5) 0%, /* Start with semi-transparent red */
    rgba(255, 69, 0, 0.5) 15%, /* Blend into semi-transparent orange-red */
    rgba(255, 140, 0, 0.5) 30%, /* Blend into semi-transparent dark orange */
    rgba(255, 255, 0, 0.5) 50%, /* Center semi-transparent yellow at 50% */
    rgba(154, 205, 50, 0.5) 70%, /* Blend into semi-transparent yellow-green */
    rgba(0, 128, 0, 0.5) 100% /* End with semi-transparent green */
  ); /* Highly smooth blended color gradient with transparency */
  outline: none; /* Removes the outline */
  transition: background 0.3s ease-in-out; /* Smooth transition for hover effects */
}

/* Thumb styles for Chrome, Edge, and Safari */
input[type=range].form-control-range::-webkit-slider-thumb {
  -webkit-appearance: none; /* Removes default webkit styles */
  appearance: none;
  width: 20px; /* Width of thumb */
  height: 20px; /* Height of thumb */
  border-radius: 50%; /* Makes it circular */
  background: #fff; /* Thumb color */
  cursor: pointer; /* Cursor on hover */
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); /* Shadow for depth */
  border: 3px solid #ddd; /* Adds a border */
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out; /* Animation transitions */
}

/* Thumb styles for Firefox */
input[type=range].form-control-range::-moz-range-thumb {
  width: 20px; /* Width of thumb */
  height: 20px; /* Height of thumb */
  border-radius: 50%; /* Makes it circular */
  background: #fff; /* Thumb color */
  cursor: pointer; /* Cursor on hover */
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); /* Shadow for depth */
  border: 3px solid #ddd; /* Adds a border */
}

/* Styles for IE */
input[type=range].form-control-range::-ms-thumb {
  width: 20px; /* Width of thumb */
  height: 20px; /* Height of thumb */
  border-radius: 50%; /* Makes it circular */
  background: #fff; /* Thumb color */
  cursor: pointer; /* Cursor on hover */
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); /* Shadow for depth */
  border: 3px solid #ddd; /* Adds a border */
}

/* Additional interactive styles for the thumb */
input[type=range].form-control-range:hover::-webkit-slider-thumb,
input[type=range].form-control-range:focus::-webkit-slider-thumb {
  transform: scale(1.1); /* Slightly larger thumb on hover/focus for better UX */
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.4); /* Larger shadow for depth */
}

input[type=range].form-control-range:hover::-moz-range-thumb,
input[type=range].form-control-range:focus::-moz-range-thumb {
  transform: scale(1.1); /* Slightly larger thumb on hover/focus for better UX */
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.4); /* Larger shadow for depth */
}

input[type=range].form-control-range:hover::-ms-thumb,
input[type=range].form-control-range:focus::-ms-thumb {
  transform: scale(1.1); /* Slightly larger thumb on hover/focus for better UX */
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.4); /* Larger shadow for depth */
}

/* Base styling for the special events container */
#specialEventsContainer {
  margin-top: 20px;
  margin-bottom: 1rem;
  background-color: #ffffff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Style for the input group with copy and paste buttons */
.input-group {
  margin-bottom: 15px;
}

.input-group .btn {
  color: #495057;
  background-color: #e9ecef;
  border-color: #ced4da;
  transition: all 0.3s ease;
}

.input-group .btn:hover {
  background-color: #adb5bd;
  border-color: #6c757d;
}

/* Style for the selected dates list */
#selectedDateList {
  max-height: 150px;
  overflow-y: auto;
  background-color: #f7f7f7;
  border-radius: 4px;
  list-style-type: none;
  padding: 0;
  margin-top: 10px;
}

#selectedDateList li {
  background-color: #fff;
  padding: 10px 15px;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s;
}

#selectedDateList li:last-child {
  border-bottom: none;
}

#selectedDateList li:hover {
  background-color: #e9ecef;
}

/* Style for the remove button in each list item */
#selectedDateList li button {
  color: #dc3545;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  transition: color 0.2s ease;
}

#selectedDateList li button:hover {
  color: #bd2130;
}

/* Style for the input field when it's full */
#dummyDates.full {
  color: #aaa;
}


.remove-date-button {
  border: none;
  background: transparent;
  cursor: pointer;
  color: #dc3545; /* Red color for the remove icon */
  font-size: 1rem;
  padding: 0;
}

.remove-date-button:hover {
  color: #bd2130; /* Darker shade on hover */
}

#tvp_checkbox_container {
  margin-left: 35px; /* Indent the sub-checkbox to the right */
  display: none; /* Keep it hidden initially */
}

.form-check-input.sub-option {
  margin-top: 0.3rem; /* Optional: Adjusts vertical alignment if needed */
}
