/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
 body {
    font-family: sans-serif; /* Basic font for readability */
    padding: 20px; /* Add some padding around the whole page */
    background-color: #f8f9fa; /* A very light gray background */
  }
  
  main {
    background-color: #ffffff; /* White background for main content area */
    padding: 20px;
    border-radius: 5px; /* Slightly rounded corners */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Subtle shadow effect */
  }
  
  .app-logo {
    display: block; /* Make the image a block element */
    max-width: 400px; /* Limit logo width (adjust as needed) */
    height: auto;    /* Maintain aspect ratio */
    margin-bottom: 25px; /* Space below the logo */
    /* Uncomment below to center the logo */
    /* margin-left: auto; */
    /* margin-right: auto; */
  }
  
  h1 {
    margin-top: 0; /* Remove default top margin often present on h1 */
    border-bottom: 1px solid #eee; /* Separator line below main heading */
    padding-bottom: 10px;
    margin-bottom: 20px;
  }
  
  /* Basic Form Styling */
  .form-group {
    margin-bottom: 15px;
  }
  
  .form-group {
    display: flex;         /* Enable Flexbox */
    align-items: center;   /* Vertically center items in the row */
    margin-bottom: 12px;   /* Adjust spacing between rows */
  }
  
  .form-group label {
    flex: 0 0 145px;      /* Fixed width for labels: don't grow, don't shrink, basis of 180px */
                             /* Adjust 180px as needed for your longest label */
    margin-bottom: 0;      /* Remove bottom margin from block display */
    margin-right: 10px;    /* Add spacing between label and input */
    font-weight: bold;
    text-align: right;     /* Optional: Right-align label text */
  }
  
  .form-group .form-control { /* Target inputs/textarea via shared class */
    flex: 1 1 auto;        /* Allow input to grow and shrink, take available space */
    width: auto;           /* Let flexbox determine width (overrides previous width: 100%) */
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
  }
  
  /* Ensure textarea behaves like other form controls within flex */
  .form-group textarea.form-control {
      /* Most styles inherited from .form-group .form-control */
      /* Add specific textarea adjustments if needed, e.g., min-height */
      min-height: calc(1.5em + 16px + 2px); /* Approx height of a single-line input */
      /* We set rows=3 in HTML, so it can grow taller */
      vertical-align: top; /* Align text to top if textarea becomes tall */
  }
      
  .actions input[type="submit"] {
    padding: 10px 15px;
    background-color: #007bff; /* Blue background */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
  }
  
  .actions input[type="submit"]:hover {
    background-color: #0056b3; /* Darker blue on hover */
  }
  
  /* Basic Table Styling */
  table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
  }
  
  th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
  }
  
  th {
    background-color: #f2f2f2; /* Light gray header */
    font-weight: bold;
  }
  
  tr:nth-child(even) {
    background-color: #f9f9f9; /* Zebra striping for rows */
  }
  
  hr {
      border: 0;
      height: 1px;
      background-color: #eee;
      margin-top: 20px;
      margin-bottom: 20px;
  }
  
  #search-spinner {
      margin-left: 10px;
      color: #555;
  }

  .flash-alert {
    padding: 10px 15px;
    margin-bottom: 15px;
    border: 1px solid transparent;
    border-radius: 4px;
    color: #856404; /* Dark yellow/brown text */
    background-color: #fff3cd; /* Light yellow background */
    border-color: #ffeeba; /* Yellow border */
  }

  /* app/assets/stylesheets/application.css */

/* ... other styles ... */

/* Modal Styling */
#modal-container {
  /* Initially empty, nothing specific needed */
}

/* --- FINAL Modal Styles (No Transition) --- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black background */
  display: flex; /* Use flexbox for centering content */
  justify-content: center; /* Center horizontally */
  align-items: center; /* Center vertically */
  z-index: 1050; /* Make sure it's on top */
  /* No opacity, visibility or transition needed - appears instantly */
}

/* The .htmx-added class is no longer needed for transitions */
/* .modal-backdrop.htmx-added { ... } */

.modal-content {
  background-color: #fff;
  padding: 20px 30px;
  border-radius: 5px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative; /* For positioning the close button */
  color: #333;
}

/* Uncomment the rest of the modal styles */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.modal-title {
  margin: 0;
  font-size: 1.25rem;
}

.modal-close-button {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 5px;
  color: #6c757d;
}
.modal-close-button:hover {
   color: #000;
}

.modal-body {
    list-style: none;
    padding: 0;
}

.modal-body li {
    margin-bottom: 8px;
}

 .modal-body button.option-button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 5px;
    font-size: 1em;
 }

 .modal-body button.option-button:hover {
     background-color: #dee2e6;
 }

/* Navigation Links Area */
.nav-links {
  /* text-align: right; margin-top: 10px; defined inline, okay for now */
}

/* Individual Navigation Links/Spans */
.nav-links .nav-link {
  margin-left: 15px; /* Space between nav links */
  text-decoration: none;
  padding: 6px 0;
  color: #0d6efd; /* Link blue */
  display: inline-block; /* Ensure spans and links align okay */
}

/* Hover effect for actual links */
.nav-links a.nav-link:hover {
  text-decoration: underline;
}

/* Style for the active/current page link/span */
.nav-links .nav-link.active {
  color: #495057; /* Grey text */
  font-weight: bold;
  cursor: default; /* Show default cursor, not pointer */
  text-decoration: none; /* No underline */
}

/* Adjust button styling if needed */
.nav-links .btn {
   /* Add margin if needed to align with nav-links */
   margin-left: 15px;
   vertical-align: baseline; /* Align button with text links */
}

  .search-form-container {
    max-width: 500px; /* Adjust this value as needed */
    /* Uncomment the next line to center the form container */
    /* margin: 0 auto; */
  }
  

  /* Align labels to the top for form groups containing textareas */
  .form-group-textarea {
    display: flex;         /* Enable flexbox for alignment */
    align-items: flex-start; /* Align items to the top */
    gap: 10px;             /* Optional: add a gap between label and textarea */
  }

  /* You might need to adjust the label width if it wasn't already set */
  /* This rule might already exist from our previous form styling */
  .form-group label {
    flex-basis: 180px; /* Or whatever width you used before */
    flex-shrink: 0;
    text-align: right;
    padding-top: 8px; /* Add a little padding to align with the text inside the textarea */
  }

  /* We can also ensure the textarea takes up the remaining space */
  .form-group-textarea textarea {
    flex-grow: 1;
  }


  /* Update input style - remove width: 100% if you want it based solely on container */
  /* Or keep it if you want inputs to fill the *new* narrower container */
