:root {
  --blue: #007bff;
}

/* List table with filters and sorting
   ------------------------------------------------------------------------- */
.list-container .table thead tr:first-child th {
  position: relative;
  vertical-align: middle;
}
.list-container .table thead tr:first-child th .sort-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.2rem 0.4rem;
  background: transparent;
  border: none;
  color: #6c757d;
}
.list-container .table thead tr:first-child th .sort-btn:hover {
  color: var(--blue);
}
.list-container .table thead tr:first-child th .sort-btn i {
  font-size: 0.9rem;
}
.list-container .table thead .filters-row th {
  padding: 0.5rem;
}
.list-container .table thead .filters-row th .filter-input {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  height: calc(1.5em + 0.5rem + 2px);
}
.list-container .table thead .filters-row th .clear-filters-btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  margin-top: 0.1rem;
}

.card-body:not(:has(*)) {
  padding: 0;
}

/* Page: 'Backend post index'
   ------------------------------------------------------------------------- */
body#admin_post_index .item-actions {
  white-space: nowrap;
}

body#admin_post_index .item-actions a.btn + a.btn {
  margin-left: 4px;
}

/* Page: 'Backend post show'
   ------------------------------------------------------------------------- */
body#admin_post_show .post-tags .label-default {
  background-color: #e9ecec;
  color: #6D8283;
  font-size: 16px;
  margin-right: 10px;
  padding: 0.4em 1em 0.5em;
}

body#admin_post_show .post-tags .label-default i {
  color: #95A6A7;
}

.form-control:focus {
  color: var(--blue);
  box-shadow: none;
}

/* Page: 'Backend show pages'
   ------------------------------------------------------------------------- */
/* Target all admin show pages */
body[id^=admin_][id$=_show] {
  /* Add a subtle background to the entire page for better visual separation */
  background-color: #f9f9f9;
  /* Style the container for better visual appearance */
  /* Mobile-first styles */
  /* Desktop optimizations */
}
body[id^=admin_][id$=_show] .body-container {
  background-color: #fff;
  border-radius: 0.25rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  margin-top: 1rem;
  margin-bottom: 1rem;
}
body[id^=admin_][id$=_show] #main {
  /* Add some breathing room on mobile */
  padding-bottom: 2rem;
  /* Common styles for all lists in show pages */
  /* Style for annex lines */
  /* Back to list button styling */
}
body[id^=admin_][id$=_show] #main h1 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  word-break: break-word; /* Prevent overflow on small screens */
}
body[id^=admin_][id$=_show] #main p {
  margin-bottom: 0.5rem;
  line-height: 1.4;
  /* Make labels stand out */
}
body[id^=admin_][id$=_show] #main p strong, body[id^=admin_][id$=_show] #main p b, body[id^=admin_][id$=_show] #main p:first-of-type::before {
  font-weight: 600;
  color: #495057;
}
body[id^=admin_][id$=_show] #main ul {
  list-style: none;
  padding-left: 0;
  margin: 1.5rem 0;
  /* General styling for any list in show pages */
}
body[id^=admin_][id$=_show] #main ul:not(.annex-lines):not(.annex-line-prices) {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
body[id^=admin_][id$=_show] #main ul:not(.annex-lines):not(.annex-line-prices) li {
  background-color: #f8f9fa;
  border-radius: 0.25rem;
  padding: 0.75rem;
  /* For desktop, make general lists display in a grid if they have many items */
}
@media (min-width: 768px) {
  body[id^=admin_][id$=_show] #main ul:not(.annex-lines):not(.annex-line-prices) li:not(:only-child) {
    display: inline-block;
    margin-right: 0.75rem;
    margin-bottom: 0.75rem;
  }
}
body[id^=admin_][id$=_show] #main .annex-lines {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
body[id^=admin_][id$=_show] #main .annex-lines .annex-line {
  background-color: #f8f9fa;
  border-radius: 0.25rem;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  /* Nested lists */
}
body[id^=admin_][id$=_show] #main .annex-lines .annex-line h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  color: #495057;
}
body[id^=admin_][id$=_show] #main .annex-lines .annex-line .annex-line-prices {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-left: 1rem;
  border-left: 3px solid #e9ecef;
}
body[id^=admin_][id$=_show] #main .annex-lines .annex-line .annex-line-prices .annex-line-price {
  background-color: #fff;
  padding: 0.75rem;
  border-radius: 0.25rem;
}
body[id^=admin_][id$=_show] #main .annex-lines .annex-line .annex-line-prices .annex-line-price h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: #495057;
}
body[id^=admin_][id$=_show] #main .btn-link {
  margin-top: 1.5rem;
  display: inline-block;
}
@media (min-width: 768px) {
  body[id^=admin_][id$=_show] #main {
    /* Better spacing on desktop */
    padding-bottom: 3rem;
    /* Create a grid layout for basic info on desktop */
    /* Improved annex lines layout on desktop */
  }
  body[id^=admin_][id$=_show] #main h1 {
    font-size: 2rem;
  }
  body[id^=admin_][id$=_show] #main > p {
    display: inline-block;
    margin-right: 2rem;
    margin-bottom: 0.75rem;
    min-width: 200px;
  }
  body[id^=admin_][id$=_show] #main .annex-lines .annex-line {
    padding: 1.5rem;
    /* Create a grid layout for basic info within annex lines */
  }
  body[id^=admin_][id$=_show] #main .annex-lines .annex-line > p {
    display: inline-block;
    margin-right: 1.5rem;
    margin-bottom: 0.75rem;
    min-width: 180px;
  }
  body[id^=admin_][id$=_show] #main .annex-lines .annex-line .annex-line-prices {
    flex-direction: row;
    flex-wrap: wrap;
  }
  body[id^=admin_][id$=_show] #main .annex-lines .annex-line .annex-line-prices .annex-line-price {
    flex: 1 1 calc(50% - 1rem);
    min-width: 200px;
  }
}
