.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 1em;
}
.firearm-lookup-table {
    width: 100% !important;
    border-collapse: collapse;
}
.firearm-lookup-table th, .firearm-lookup-table td {
    padding: 0.75em 1em;
    border-bottom: 1px solid #ddd;
}
.status-allowed {
    color: green;
    font-weight: bold;
}
.status-banned {
    color: red;
    font-weight: bold;
}
.no-results {
    margin-top: 1em;
    font-size: 1rem;
}
.more-filters-toggle {
    display: inline-block;
    margin-top: 0.5em;
    cursor: pointer;
}
.more-filters-panel {
    padding: 1em;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
    margin-top: 0.5em;
}
.filter-group {
    margin-bottom: 0.75em;
}
.filter-group label {
    display: block;
    margin-bottom: 0.25em;
    font-weight: bold;
}

/* Boxed filter panel */
fieldset.more-filters-panel {
    max-width: 800px;
    margin: 0 auto;
    padding: 1em;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    background: #fff;
}

/* Horizontal layout on desktop */
@media (min-width: 768px) {
    .more-filters-panel {
        display: flex;
        flex-wrap: wrap;
        gap: 1em;
    }
    .more-filters-panel .filter-group {
        flex: 1 1 calc(33.333% - 1em);
        max-width: calc(33.333% - 1em);
    }
}
@media (max-width: 767px) {
    .more-filters-panel .filter-group {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* Boxed advanced filter panel */
#advanced-search fieldset {
    max-width: 800px;
    margin: 1em auto;
    padding: 1em;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    background: #fff;
}

/* Horizontal layout for filter groups on desktop */
@media (min-width: 768px) {
    #advanced-search fieldset {
        display: flex;
        flex-wrap: wrap;
        gap: 1em;
    }
    #advanced-search fieldset .filter-group {
        flex: 1 1 calc(33.333% - 1em);
        max-width: calc(33.333% - 1em);
    }
}

/* Boxed Basic Search Panel */

#primary-search input,
#primary-search select {
    flex: 1 1 200px;
}
#primary-search button {
    flex: 0 0 auto;
}

/* Boxed Basic Search Panel - more specific selectors with !important */
#firearm-lookup-wrapper > 
#firearm-lookup-wrapper > #primary-search input,
#firearm-lookup-wrapper > #primary-search select {
    flex: 1 1 200px !important;
}
#firearm-lookup-wrapper > #primary-search button {
    flex: 0 0 auto !important;
}

/* Boxed Basic Search Panel */

/* Boxed Search Results */
#firearm-lookup-results {
    max-width: 800px;
    margin: 1em auto;
    padding: 1em;
    background: #fff;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

/* Widened Basic & Advanced Search Panels and Results */
#primary-search,
#firearm-lookup-results,
#advanced-search fieldset {
    max-width: 90% !important;
    width: 90% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Container for entire lookup to center and set max width */
#firearm-lookup-wrapper {
    max-width: 1000px !important;
    margin: 1em auto !important;
    padding: 0 1em;
    box-sizing: border-box;
}

/* Ensure both forms and results use full width of container */
#primary-search,
#advanced-search,
#firearm-lookup-results {
    width: 100% !important;
    max-width: none !important;
}

/* Ensure the DataTable spans full width */
.firearm-lookup-table {
    width: 100% !important;
}

/* Hide results container until populated */
#firearm-lookup-results {
    display: none;
}

/* Hide results by default */
#firearm-lookup-results {
  display: none;
}
/* Boxed panels already applied... */
/* Clear button styling */
#primary-clear, #adv-clear {
  margin-left: 0.5em;
}

/* Set Basic Search, Advanced Search, and Results to 1390px */
#primary-search,
#advanced-search fieldset,
#firearm-lookup-results {
    max-width: 1390px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
}

/* Enforce 1390px max-width for lookup wrapper, forms, and results */
#firearm-lookup-wrapper {
    max-width: 1390px !important;
    width: 100% !important;
    margin: 1em auto !important;
}
#firearm-lookup-wrapper > form,
#firearm-lookup-results,
#firearm-lookup-results .table-responsive {
    max-width: 1390px !important;
    width: 100% !important;
    margin: 0 auto !important;
}

/* Ensure Basic Search form spans up to 1390px */


/* Force 1390px width and horizontal centering regardless of parent container */
#firearm-lookup-wrapper {
    width: 1390px !important;
    max-width: none !important;
    position: relative !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin: 1em auto !important;
    box-sizing: border-box !important;
}
#firearm-lookup-wrapper > form,
#firearm-lookup-results {
    width: 100% !important;
    max-width: none !important;
}

/* Override wrapper centering and remove break-out hack */
#firearm-lookup-wrapper {
  max-width: 1390px !important;
  margin: 1em auto !important;
  position: static !important;
  left: auto !important;
  transform: none !important;
}

/* Ensure forms and results use full container width */
#primary-search,
#advanced-search fieldset,
#firearm-lookup-results {
  width: 100% !important;
  max-width: none !important;
}

/* Button and field spacing in basic search */
#primary-search input,
#primary-search select,
#primary-search button {
  margin-right: 0.5em !important;
}
#primary-search button:last-child {
  margin-right: 0 !important;
}

/* Flex layout for Basic Search */
#firearm-lookup-wrapper {
    max-width: 1390px;
    margin: 1em auto;
    padding: 1em;
    box-sizing: border-box;
}
#primary-search {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 0.5em !important;
    width: 100% !important;
}
#primary-search input[type="text"],
#primary-search select {
    flex: 1 1 auto !important;
    min-width: 200px !important;
    box-sizing: border-box;
}
#primary-search button {
    flex: 0 0 auto !important;
    margin: 0 !important;
}

/* Flex layout for Basic Search */
#firearm-lookup-wrapper {
    max-width: 1390px;
    margin: 1em auto;
    padding: 1em;
    box-sizing: border-box;
}
#primary-search {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 0.5em !important;
    width: 100% !important;
}
#primary-search input[type="text"],
#primary-search select {
    flex: 1 1 auto !important;
    min-width: 200px !important;
    box-sizing: border-box;
}
#primary-search button {
    flex: 0 0 auto !important;
    margin: 0 !important;
}

/* Uniform height & vertical centering for basic search fields/buttons */
#primary-search {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 0.5em !important;
}
#primary-search input[type="text"],
#primary-search select,
#primary-search button {
  height: 48px !important;
  padding: 0 12px !important;
  line-height: 48px !important;
  box-sizing: border-box !important;
}

/* Vault UI Enhancements */
.firearm-lookup-vault-form { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.firearm-lookup-vault-form select,
.firearm-lookup-vault-form input[type="text"] { padding: 8px; border: 1px solid #ccd0d4; border-radius: 4px; }
.firearm-lookup-vault-form button { padding: 8px 16px; background: #0073aa; color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.firearm-lookup-vault-form button:hover { background: #005177; }
.firearm-lookup-vault { width: 100%; border-collapse: collapse; margin-top: 10px; }
.firearm-lookup-vault th,
.firearm-lookup-vault td { padding: 12px; border: 1px solid #e3e4e5; }
.firearm-lookup-vault tr:nth-child(even) { background: #f9f9f9; }

/* Header Layout */
.firearm-lookup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Enhanced Header Layout */
.firearm-lookup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9f9f9;
    padding: 15px;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}
.firearm-lookup-header h2 {
    margin: 0;
    font-size: 28px;
    color: #222;
}
.firearm-lookup-vault-form {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}
.firearm-lookup-vault-form input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    width: 200px;
}
.firearm-lookup-vault-form button {
    padding: 8px 16px;
    border: none;
    background-color: #0073aa;
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}
.firearm-lookup-vault-form button:hover {
    background-color: #005177;
}


/* Centered, linked login-prompt on vault page */
.firearm-lookup-login-error a {
  display: inline-block;
  padding: 0.75em 1.5em;
  background: #0073aa;
  color: #fff !important;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
}
.firearm-lookup-login-error a:hover {
  background: #005177;
}


/* Layout for My Firearms header: search + state side-by-side */
.firearm-lookup-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1em;
  flex-wrap: wrap;
  margin-bottom: 1em;
}


/* Centered login prompt “card” */
.firearm-lookup-login-error {
  max-width: 400px;
  margin: 3em auto;
  padding: 2em;
  background: #f9f9f9;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.firearm-lookup-login-text {
  font-size: 1.2em;
  margin-bottom: 1.5em;
  color: #333;
}
.firearm-lookup-login-button {
  display: inline-block;
  padding: 0.75em 1.5em;
  background: #0073aa;
  color: #fff !important;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
}
.firearm-lookup-login-button:hover {
  background: #005177;
}
/* Ensure plugin buttons match the "Select Your Home State" dropdown styling */

/* Apply to all buttons and links within plugin wrappers */
.firearm-lookup-header .button,
.firearm-lookup-vault-form .button,
.firearm-lookup-search-form .button,
.primary-search-btn,
.clear-search-btn,
.more-filters-btn {
  /* Match select background */
  background: #ffffff;
  /* Match select border */
  border: 1px solid #cccccc;
  /* Same text color */
  color: #333333;
  /* Similar padding */
  padding: .5em 1em;
  /* Match select’s font size */
  font-size: 1em;
  /* Border radius to match */
  border-radius: 3px;
  /* Ensure block-level consistency */
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
}

/* Hover state to match select’s hover */
.firearm-lookup-header .button:hover,
.firearm-lookup-vault-form .button:hover,
.firearm-lookup-search-form .button:hover,
.primary-search-btn:hover,
.clear-search-btn:hover,
.more-filters-btn:hover {
  background: #f0f0f0;
  border-color: #bbbbbb;
}

/* REPORT FEATURE: inline wrapper for action buttons */
.firearm-lookup-table .action-buttons {
  display: inline-flex;      /* keep buttons on one line */
  gap: 0.5rem;               /* space between them */
  white-space: nowrap;       /* prevent wrapping inside the wrapper */
}
/* Professional Report Modal Styles */
#firearm-report-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  transition: opacity 0.2s ease-in-out;
}
#firearm-report-modal.show {
  display: block;
  opacity: 1;
}

.firearm-report-modal .firearm-report-content {
  background: #ffffff;
  max-width: 480px;
  margin: 5% auto;
  padding: 1.5rem;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  position: relative;
  font-family: Arial, sans-serif;
}

.firearm-report-modal .firearm-report-content h2 {
  margin-top: 0;
  font-size: 1.4rem;
  border-bottom: 1px solid #e2e2e2;
  padding-bottom: 0.5rem;
}

.firearm-report-modal textarea {
  width: 100%;
  height: 120px;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
  font-size: 1rem;
}

.firearm-report-modal .buttons {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}

.firearm-report-modal .buttons button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  font-size: 0.95rem;
  cursor: pointer;
}

.firearm-report-modal .buttons .submit {
  background-color: #0073aa;
  color: #fff;
}

.firearm-report-modal .buttons .cancel {
  background-color: #f7f7f7;
  color: #555;
}

.firearm-report-modal .close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 1.2rem;
  color: #aaa;
  cursor: pointer;
}
.firearm-report-modal .close:hover {
  color: #333;
}

.action-buttons .travel-planner {
  margin-left: 4px;
}
/* Restore controlled button spacing */
.firearm-lookup-search-form,
.firearm-lookup-vault-form {
  display: inline-flex;
  align-items: center;
  gap: 0;
  /* ensure no inline gap remains */
}

.firearm-lookup-search-form .button,
.firearm-lookup-vault-form .button {
  margin-left: 0.3rem;
}

.firearm-lookup-search-form .button:first-child,
.firearm-lookup-vault-form .button:first-child {
  margin-left: 0;
}

/* Then, if you want just a tiny gutter, add margin on the buttons themselves: */
.firearm-lookup-search-form .button,
.firearm-lookup-vault-form .button {
    margin-left: 0.25rem !important;
}
/* Prevent line‑wrap in the “Reason” column */
.firearm-lookup-table th:nth-child(7),
.firearm-lookup-table td:nth-child(7) {
  white-space: nowrap;
}
/* Make the “Reason” column bold */
.firearm-lookup-table th:nth-child(7),
.firearm-lookup-table td:nth-child(7) {
  font-weight: bold;
}

.firearm-lookup-header {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

@media (max-width: 600px) {
    .firearm-lookup-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .firearm-lookup-vault-form {
        width: 100%;
    }
}
.firearm-lookup-vault-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
@media (max-width: 600px) {
    .firearm-lookup-vault-form input,
    .firearm-lookup-vault-form select,
    .firearm-lookup-vault-form button {
        width: 100%;
    }
}
@media (max-width: 600px) {
  /* Darken Remove button text on small screens */
  .firearm-lookup-vault .remove-firearm-btn {
    color: #000 !important;
  }
}
