/* ================================================================
   IMPS STYLESHEET
   ================================================================
   Rule order matters in the FORMS / INPUTS section -- see the note
   there.
   ================================================================ */


/* ================================================================
   1. BASE / LAYOUT / TYPOGRAPHY
   ================================================================ */

/* standard styles */
body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
}

a {
  color: #000000;
  font-weight: bold;
  text-decoration: none;
}

a:hover {
  color: #a40000;
}

a.no-hover:hover {
  color: initial; /* Or the desired default color */
}

ul {
  margin-left: 15px;
}

.page_title {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 26px;
  font-weight: bold;
  margin: 0px;
  margin-bottom: 12px;
}

.inline_div {
  display: inline-block;
}

.paginated_title {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 26px;
  /* python pagination library stylesheet */
  font-weight: bold;
  line-height: 1;
  margin: 0px;
}

.page_subtitle {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: bold;
  padding-top: 5px;
}

.header_sub {
  font-size: 22px;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
}

/* none.jpg has "No"/"Image" baked in near the top/bottom thirds, with
   a blank gap between them -- centers the item name in that gap. */
.no_item_photo {
  background-image: url("images/items/none.jpg");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Backstop -- truncate(12)'s leeway lets some names through
   untouched, which can overflow onto the border without this. */
.no_item_photo_txt {
  display: block;
  max-width: 130px;
  font-size: 24px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ******************************************** */
/* Responsive header sizing, as flat, top-level  */
/* media queries.                                */
/* ******************************************** */

@media (max-width: 800px) {
  .header_sub {
    font-size: 18px;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
  }
}

@media (max-width: 480px) {
  .header_sub {
    font-size: 12px;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
  }
}

h1 {
  margin: 0px;
  padding: 0px;
  -webkit-text-stroke: 1px #a40000;
}

p.note {
  background-image: url('images/note.png');
  background-size: 20px 20px;
  background-repeat: no-repeat;
  padding-left: 30px;
  display: block;
}

/* ******************************************** */
/* JAVASCRIPT INPUT CHECKING WARNING             */
/* ******************************************** */

.warning {
  background-image: url("images/icons/warning_icon.png");
  border: 0px;
  padding: 8px 8px 8px 30px;
  border-radius: 7px;
  width: 40px;
  height: 40px;
  line-height: 0px;
  background-size: 34px 34px;
  background-repeat: no-repeat;
  margin: 5px;
  vertical-align: middle;
}

/* input-invalid state lives in the FORMS / INPUTS section below
   (input.input-invalid), next to the rule it needs to override,
   rather than an ID-scoped selector here. */

/* ******************************************** */
/* other tables */
/* ******************************************** */

.inv_td {
  width: 100px;
  text-align: center;
}

.divider {
  height: 1px;
  border-top: 2px solid gray;
}

/* page content */
.page_content {
  padding-top: 5px;
}

/* ******************************************** */
/* Index page styles */
/* ******************************************** */

/* index page div layouts */
.grid {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  width: fit-content;
}

/* index page link style */
.main_page_link_text {
  font-size: 14px;
  font-family: sans-serif;
}

.main_page_link_text:hover {
  color: black;
}

/* imps img */
.imps_img {
  display: block;
}

/* ******************************************** */
/* item detail page */
/* ******************************************** */

.item_img {
  display: block;
  margin: 10px;
}

.item_in_title {
  color: #777777;
}

.item_desc {
  width: 100px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: inline-block;
  font-size: 12px;
  background-color: #dddddd;
}

/* ***************************************** */
/* footer styles */
/* ***************************************** */

.div-left {
  float: left;
  padding-left: 10px;
}

.div-right {
  float: right;
  padding-right: 10px;
}

.footer-container {
  height: 40px;
  max-width: 980px;
  padding-top: 25px;
}

.footer {
  width: 100%;
  border-top: 2px solid gray;
}

.credit_td {
  padding-top: 8px;
}

/* image hover */

.thumbnail {
  /* No position/z-index set here -- table layout traps a positioned
   child inside its own row's paint layer, blocking cross-row cover.
   transform alone creates a stacking context on hover without it. */
  top: 0;
  left: 0;
  width: 50px;
  display: block;
  cursor: pointer;
  -webkit-transition-property: all;
  -webkit-transition-duration: 0.3s;
  -webkit-transition-timing-function: ease;
}

/* change the number below to scale to the appropriate size */
/* hover:hover excludes touch, which only simulates a sticky hover.
   Touch gets .zoomed below instead (static/thumbnail_zoom.js). */
@media (hover: hover) {
  .thumbnail:hover {
    transform: scale(5);
    position: relative;
    z-index: 999;
  }
}

/* Mirrors .thumbnail:hover for touch/click, via a toggled class
   instead of :hover. See static/thumbnail_zoom.js. */
.thumbnail.zoomed {
  transform: scale(5);
  position: relative;
  z-index: 999;
}

/* Unlinked Photo Cleanup: checkbox sits left of the thumbnail.
   transform-origin: left keeps zoom growth off the checkbox. Covers
   both hover and .zoomed. */
.thumbnail.cp-orphan-thumbnail:hover,
.thumbnail.cp-orphan-thumbnail.zoomed {
  transform-origin: left center;
}

/* Read-only gallery -- zoom is safe here (no delete icon to cover).
   Smaller scale than .thumbnail's default 5x -- these start bigger. */
.item-detail-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 16px;
}
.item-detail-photos .thumbnail {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border: 2px solid #ccc;
  border-radius: 4px;
}
@media (hover: hover) {
  .item-detail-photos .thumbnail:hover {
    transform: scale(2);
  }
  /* Leftmost photo has no room to its left -- anchor its zoom so it
     only grows rightward. Others zoom from center (the app default). */
  .item-detail-photos .thumbnail:first-child:hover {
    transform-origin: left center;
  }
}
.item-detail-photos .thumbnail.zoomed {
  transform: scale(2);
}
.item-detail-photos .thumbnail:first-child.zoomed {
  transform-origin: left center;
}

/* Fixed 2x3 grid, max 6 photos (MAX_ITEM_PHOTOS in extensions.py).
   Filled cells show a thumbnail + delete icon; open cells show an
   Add photo tile. Position 1 is always the cover. No hover-zoom here
   (unlike .thumbnail elsewhere) -- it covered the delete icon, making
   it nearly unclickable. */
.item-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 140px);
  gap: 14px;
  margin: 8px 0 20px;
}
.item-photo-cell {
  position: relative;
  width: 140px;
  height: 140px;
}
.item-photo-thumb {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border: 2px solid #ccc;
  border-radius: 4px;
  display: block;
}
.item-photo-cover-tag {
  position: absolute;
  bottom: -20px;
  left: 0;
  right: 0;
  font-size: 12px;
  font-weight: bold;
  color: #444;
  text-align: center;
}
.item-photo-del-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background-color: #a40000;
  background-image: url("images/icons/trash_icon.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.item-photo-add-form {
  width: 140px;
  height: 140px;
}
.item-photo-add-card {
  width: 100%;
  height: 100%;
  border: 2px dashed #ccc;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #444;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
}
.item-photo-add-card .plus {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: #a40000;
  background-image: url("images/icons/add_icon.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
}

/* ******************************************** */
/* Styles to sort tables by */
/* ******************************************** */

.item_display_table {
  display: table;
  border: 1px solid #ccc;
  font-family: arial, helvetica, sans-serif;
  border-collapse: collapse;
}

.table_head {
  display: table-header-group;
  background-color: #ddd;
}

.table_label {
  display: table-cell;
  font-weight: bold;
  border-bottom: 2px solid #ccc;
  padding: 3px;
}

.table_body {
  display: table-row-group;
  background-color: #fff;
}

.table_row {
  display: table-row;
  line-height: 20px;
  /* border-bottom: 3px solid black; */
}

.table_cell {
  display: table-cell;
  padding: 6px;
  border-bottom: 1px solid black;
  vertical-align: middle;
  text-align: left;
}

/* item_display_table has no fixed column widths, so width
   recalculates per page from that page's rendered rows. :first-child
   targets Item (always first) across every use of this table. Width
   fits the 25-char truncation cap.

   boxlist.html reuses these classes but its first column is Box #,
   excluded via :not(). */
.table_label:first-child:not(.table_label-boxnum),
.table_cell:first-child:not(.table_cell-boxnum) {
  width: 220px;
}

/* Box list's Box # column -- narrow, fits a 4-digit number with
   padding. Name gets the width freed up from Box #, sized to
   comfortably fit its 20-char truncation cap (see boxlist.html). */
.table_label-boxnum,
.table_cell-boxnum {
  width: 50px;
}
.table_label-boxname,
.table_cell-boxname {
  width: 190px;
}

/* Category isn't truncated (varchar(64), no truncate filter or
   maxlength) and isn't always in the same column position, so
   :nth-child can't target it. table_label-cat/table_cell-cat in
   includeitemlist.html target it explicitly. Width fits the 20-char
   truncation cap. */
.table_label-cat,
.table_cell-cat {
  width: 140px;
}

.table_cell-cat {
  background-color: #eee;
}

/* Backups tab's Download/Restore columns -- icon-only buttons, no
   need for the wide first-child default width. */
.table_label-actions,
.table_cell-actions {
  width: 62px;
  white-space: nowrap;
  text-align: center;
}

/* Only truncated category cells get wrapped in .tooltip (see
   includeitemlist.html); this gives that case a pointer cursor. */
.table_cell-cat .tooltip {
  cursor: pointer;
}

.table_cellblock {
  padding: 2px 3px;
}

/* ******************************************** */
/* Pagination display */
/* ******************************************** */

.paginate {
  display: inline-grid;
  align-items: start;
  margin-bottom: 12px;
  margin-top: 4px;
}

.paginate-item {
  background-color: #fff;
  text-align: center;
  align-self: start;
}

/* .imps sets only a min-width floor. Previous/Next size to their own
   content (8 vs 4 characters) rather than a shared fixed width. */

/* ******************************************** */
/* Grid stuff */
/* ******************************************** */

.grid-cat-container {
  display: inline-grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: start;
}

.grid-index-container {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  align-items: start;
  width: 100%;
}

.grid-page-container {
  padding-top: 10px;
  padding-bottom: 10px;
  max-height: 20px;
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: start;
}

.grid-item {
  background-color: #fff;
  text-align: center;
  align-self: center;
  padding: 2px;
}

.grid-item-center {
  background-color: #fff;
  padding: 2px;
}

.grid-item-left {
  background-color: #fff;
  justify-self: start;
  align-self: center;
  padding: 2px;
}

.grid-page-item {
  background-color: #fff;
  justify-self: start;
  align-self: center;
  padding: 0px;
}

#flex-container {
  display: flex;
  flex-direction: row;
  border-bottom: 2px black solid;
  margin: 0 auto;
}

@media (max-width: 480px) {
  textarea {
    width: 90%;
  }

  .form-control {
    width: 50%;
  }
}


/* ================================================================
   2. MODAL / WARNING DIALOG
   ================================================================ */

/* ******************************************** */
/* modal dialog box styles */
/* ******************************************** */

/* The Modal (background) */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  padding-top: 100px; /* Location of the box */
  padding-left: 50px;
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}  

/* Modal Content */
.modal-content {
  background-color: #fefefe;
  margin: auto;
  border: 1px solid #888;
  padding-right: 20px;
  width: auto;
  height: auto;
  display: inline-block;

}
 
/* The Close Button */
.close {
  color: #aaaaaa;
  float: right;
  font-size: 32px;
  font-weight: bold;
}
 
.close:hover,
.close:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

.warn_cont {
      display: flex;
      /* Optional: Add space between left and right panels */
      gap: 5px;
    }

    .warn_left {
      width: 30px;
      /* flex: 1; /* Allows the left panel to take up available space */
      /* Add other styling like background-color, padding, etc. */
    }

    .warn_right {
      display: flex;
      flex-direction: column; /* Stacks the right panels vertically */
      flex: 1; /* Allows the right panels container to take up available space */
      /* Optional: Add space between the two right panels */
      gap: 5px;
      padding-left: 30px;
    }

/* "Working" modal (see includes/working_modal.html) -- shown while a
   slow action (backup, restore) is in flight. No close button; it
   disappears on its own once the page navigates away. */
.working-cont {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px;
}

.spinner {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 5px solid #eee;
  border-top-color: #a40000;
  border-radius: 50%;
  animation: imps-spin 0.8s linear infinite;
}

@keyframes imps-spin {
  to { transform: rotate(360deg); }
}


/* ================================================================
   3. BUTTONS / ICONS
   ================================================================ */

.add {
	background-image: url("images/icons/add_icon.png");
}

.back {
	background-image: url("images/icons/back_icon.png");
}

/* Distinct mirrored asset instead of a CSS-flipped back_icon.png, so
   .icon-right's anchoring applies unmodified. */
.forward {
	background-image: url("images/icons/forward_icon.png");
}

.backup {
	background-image: url("images/icons/backup_icon.png");
}

.restore {
	background-image: url("images/icons/restore_icon.png");
}

.upload {
	background-image: url("images/icons/upload_icon.png");
}

.bar {
	background-image: url("images/icons/bar_icon.png");
}

.box {
	background-image: url("images/icons/box_icon.png");
}

.box_closed {
	background-image: url("images/icons/box_closed_icon.png");
}

.box_closed_dis {
        background-image: url("images/icons/box_closed_icon.png");
        opacity: 0.3;
}

.box_full {
	background-image: url("images/icons/box_full_icon.png");
	width: 90px;
}

/* Two buttons side by side, each sized to its own content (e.g.
   Yes/Cancel, Back/Next). Wrap the pair in a container with this
   class. */
.btn-pair {
	display: flex;
	gap: 10px;
	width: fit-content;
}
.btn-pair > * {
	flex: 0 0 auto;
}
.cancel {
        background-image: url("images/icons/cancel.png");
}

.columns {
        background-image: url("images/icons/columns_icon.png");
}



.list {
        background-image: url("images/icons/list_icon.png");
}

.merge {
        background-image: url("images/icons/merge_icon.png");
}

.orphans {
	background-image: url("images/icons/orphans_icon.png");
}

.download {
	background-image: url("images/icons/download_icon.png");
}

.edit {
	background-image: url("images/icons/edit_icon.png");
}

.home {
	background-image: url("images/icons/home_icon.png");
}


.loc {
	background-image: url("images/icons/loc_icon.png");
}

.login {
        background-image: url("images/icons/login_icon.png");
}


.print {
        background-image: url("images/icons/print_icon.png");
}
 
.qr {
	background-image: url("images/icons/qr_icon.png");
}

.show_hide {
	background-image: url("images/icons/show_hide_icon.png");
}

/* Base class for every rectangular action button: icon+text,
   icon-only, and plain text. No modifier means plain text, no icon
   padding. */
.imps {
	background-color: #a40000;
	background-position: 8px center;
	background-repeat: no-repeat;
	background-size: 40px 40px;
	border-radius: 7px;
	border: 0px;
	color: white;
	cursor: pointer;
	display: inline-block;
	font-size: 14px;
	font-weight: bold;
	height: 46px;
	line-height: 0px;
	margin-bottom: 5px;
	margin-top: 5px;
	min-width: 90px;
	padding: 8px 8px;
	text-align: center;
	text-decoration: none;
	vertical-align: middle;
}

.imps:disabled {
	opacity: 0.3;
}

/* Icon+text buttons -- reserves room on the left for the icon image
   (set via one of the .search/.cancel/.edit/etc classes below) and
   right-aligns the text next to it. */
.imps.icon-left {
	padding-left: 56px;
	text-align: right;
}

/* Mirror of .icon-left: reserves room on the right for the icon and
   anchors it there instead of the left. */
.imps.icon-right {
	padding-right: 56px;
	background-position: right 8px center;
	text-align: left;
}

/* Icon-only buttons -- fixed square, centered icon, no reserved text
   space. Deliberately does NOT redeclare border-radius or height --
   inherits the same 7px radius and 46px height every other button
   uses. */
.imps.icon-only {
	background-position: center;
	width: 46px;
	min-width: 0;
	padding: 8px;
}

/* Settings tab button layout. 160px fits the longest label
   ("Categories"). auto-fit collapses empty tracks. */
.cp-nav-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, 160px);
	gap: 10px;
	margin-top: 12px;
}
.cp-nav-grid a {
	text-decoration: none;
}
.cp-nav-grid .imps {
	width: 100%;
	box-sizing: border-box;
}

.imps_tab_off {
	background-color: #444;
	border-radius: 7px 7px 0px 0px;
	border: 0px;
	color: white;
	font-size: 14px;
	font-weight: bold;
	height: 42px;
	margin-bottom: 0px;
	margin-left: 0px;
	margin-top: 5px;
	padding: 8px 8px 8px 8px;
	text-align: left;
	vertical-align: bottom;
}

.imps_tab_on {
	background-color: #a40000;
	border-radius: 7px 7px 0px 0px;
	border: 0px;
	color: white;
	font-size: 14px;
	font-weight: bold;
	height: 42px;
	margin-bottom: 0px;
	margin-left: 0px;
	margin-top: 25px;
	padding: 8px 8px 8px 8px;
	text-align: left;
	vertical-align: bottom;
}


.photo {
	background-image: url("images/icons/photo_icon.png");
}

.save {
	background-image: url("images/icons/save_icon.png");
}

.search {
	background-image: url("images/icons/search_icon.png");
}

.trash {
	background-image: url("images/icons/trash_icon.png");
}

.update {
	background-image: url("images/icons/update_icon.png");
}

.warn_text{
        color: #a40000;
        font-size: 18px;
        font-weight: bold;

}


/* ================================================================
   4. TOOLTIPS
   ================================================================ */

.tooltip {
  position: relative;
  display: inline-block;
  /* Low and explicit so the info icon stacks below the zoomed
     thumbnail's z-index:999 (see .thumbnail above). */
  z-index: 1;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 240px;
  background-color: #555;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -50px;
  opacity: 0;
}
.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #555;
}
 
.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}


/* ================================================================
   5. MOBILE/DESKTOP VIEW SWITCH
   ================================================================ */

/* ********************************************
/* VIEW SWITCH 
/* *********************************************/

/* LOCATION OF VIEW SWITCH IN HEADER */
.switch{
  position:absolute; 
  top:20px; 
  /* Anchored from the same edge as .help-button (right: 12px) so the
     two never overlap, at any width. */
  right:56px; 
  z-index:1; 
  width: 150px; 
}

/* Below 480px, .switch drops into normal document flow above the
   content instead of floating in the top-right corner. */
@media (max-width: 480px) {
  .switch {
    position: static;
    width: auto;
    margin: 8px 0 12px;
    text-align: center;
  }
}

/* VIEW SWITCH BUTTON CONTAINER */
.view_switch{
    padding: 5px;
    border-radius: 25px; 
    background-color: #ddd;
    height: 42px;
    width: 90px;
}
 
/* COMMON VIEW SWITCH BUTTON PROPERTIES */
button.view{
    height: 42px;
    width: 42px;
    border-radius: 21px;
    background-size: 38px 38px;
    background-repeat: no-repeat;
    border: none;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}

button.view:focus{
    outline: none;
}


/* MOBILE VIEW ACTIVE BUTTON */
button.mobile{
    background-image: url("images/icons/mobile_icon.png");
}

/* MOBILE VIEW INACTIVE BUTTON */
button.mobile_set_view{
    background-image: url("images/icons/mobile_set_icon.png");
}

/* DESKTOP VIEW ACTIVE BUTTON */
button.desktop{
    background-image: url("images/icons/desktop_icon.png");
}

/* DESKTOP VIEW INACTIVE BUTTON */
button.desktop_set_view{
    background-image: url("images/icons/desktop_set_icon.png");
}


/* ================================================================
   6. FORMS / INPUTS

   input.input-invalid must stay after input[type="text"] in this
   file -- both have specificity (0,1,1), so source order decides
   which wins.
   ================================================================ */

/* ******************************************** */
/* Input styles                                  */
/* ******************************************** */

button:focus, input:focus, textarea:focus, input[type="date"]:focus {
  outline: 1px solid black;
}

input {
  font-size:18px;
  border:2px solid #000;
  background-color : #eee; 
}

datalist{
  font-size: 18px;
  border:2px solid #000;
  background-color : #eee; 
  margin-bottom: 10px;
  font-family:Arial, Helvetica, sans-serif;
}

input[type="text"], input[type="password"], textarea {
  font-size:18px;
  border:2px solid #000;
  background-color : #eee; 
  font-family:Arial, Helvetica, sans-serif;
  margin-bottom: 10px;
}

/* Fixed width: type="password"/type="text" render size="N" at
   different widths (bullets vs glyphs), which resizes the field on
   toggle (see cp_password.html). */
/* Fixed width: "Show"/"Hide" have different natural glyph widths,
   which resizes the button on toggle. */
#toggle_password {
  width: 110px;
}

/* Red border, toggled via JS on any text input. Must stay after
   input[type="text"] -- see the FORMS/INPUTS note above. */
input.input-invalid {
  border: 2px solid #a40000;
}

input[type="date"] {
  font-family:Arial, Helvetica, sans-serif;
  font-size:18px;
  border:2px solid #000;
  background-color : #eee; 
}

input[role="textbox"] {
  font-size:18px;
  border:2px solid #000;
  background-color: #eee;
  margin-bottom: 5px;
}
select {
  font-size:18px;
  margin-bottom: 10px;
  border:2px solid #000;
  background-color : #eee; 
}
input[type="radio"] {
  border:2px solid black;
  background-color : #ddd;
  accent-color: #a40000; 
  margin-top: 5px;
  margin-left: 10px;
}

input[name="item_cat"] {
  font-family:Arial, Helvetica, sans-serif;
  font-size: 18px;
  margin-bottom: 10px;
  border:2px solid #000;
  background-color : #eee; 
}
input[name="file"] {
  font-size: 18px;
  border:2px solid #000;
  background-color : #eee; 
  width: 280px;
}

.input_div{
  padding-left:8px;
}

/* Backups tab: each list has at most 4 entries, a clean 2x2 grid.
   Single column under 480px. */
.backup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
}

@media (max-width: 480px) {
  .backup-grid {
    grid-template-columns: 1fr;
  }
}

.form-control{
   margin-top: 10px;
}

/* ================================================================
   7. BATCH ACTIONS (MULTI-SELECT)
   ================================================================
   Ctrl/Cmd-click a row's trash icon, box-num cell, or category cell
   (includes/includeitemlist.html, see static/multiselect_batch.js)
   to mark it for a batch delete/move/recategorize instead of the
   normal single-item action. Ring color matches the button's own red
   rather than a new accent -- same reasoning applies to the row
   highlight reusing .table_label's existing border-bottom gray
   instead of a new color.
   ================================================================ */

.imps.icon-only.trash.picked {
	outline: 3px solid #a40000;
	outline-offset: 3px;
}

.table_row.picked {
	background-color: #ccc;
}

/* box-num/category cells are real click targets here, unlike their
   plain-text look everywhere else -- hover cue so that's
   discoverable. Real click (no modifier) does nothing. */
.table_cell.actionable {
	cursor: pointer;
}
.table_cell.actionable:hover {
	background-color: #eee;
}
.table_row.picked .table_cell.actionable:hover {
	background-color: #ccc;
}

/* .table_cell-cat carries its own background-color, which otherwise
   paints over the row's picked background -- every other cell has no
   background of its own, so the row color already shows through
   those without this override. */
.table_row.picked .table_cell-cat {
	background-color: #ccc;
}

/* right offset is set from JS to track #itemdisplaytable's own right
   edge (see alignActionBar() in multiselect_delete.js) -- the value
   here is only what shows before that first runs. */
.batch-action-bar {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-width: 280px;
	padding: 12px 16px;
	border-radius: 8px;
	background: #000;
	color: #fff;
	font-size: 14px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 160ms ease, transform 160ms ease, right 120ms ease;
	pointer-events: none;
}

.batch-action-bar.visible {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

/* .imps:disabled's 0.3 opacity is white-background-tuned, too faint
   here. background-color can't fix it either -- the icon PNGs have
   red baked in as opaque pixels. filter reaches those pixels
   instead: grayscale(1) alone lands near-black (red's luminance is
   low), so brightness() lifts it to a visible gray. White glyph
   pixels clamp at 255 either way. */
.batch-action-bar .imps:disabled {
	opacity: 1;
	filter: grayscale(1) brightness(3.5);
}

.batch-picker {
	display: flex;
	align-items: center;
	gap: 6px;
}
.batch-picker label {
	color: #ccc;
}
/* Background/text only, no border -- input[type="text"]'s black
   border and .input-invalid's red border (both defined elsewhere in
   this file) still apply untouched. */
.batch-action-bar input[type="text"] {
	background-color: #222;
	color: #fff;
}
#batchBoxNum {
	width: 48px;
	text-align: center;
}
#batchCatName {
	width: 130px;
}

/* Cancel is deliberately not a real .imps button -- just an "x", no
   red background, so it doesn't compete with the actual actions. */
.batch-cancel {
	background: transparent;
	border: none;
	color: #ccc;
	font-size: 20px;
	height: 46px;
	line-height: 1;
	padding: 4px 10px;
	cursor: pointer;
}
.batch-cancel:hover {
	color: #fff;
}

/* ================================================================
   BOOTSTRAP-LITE UTILITY CLASSES
   ================================================================
   Bootstrap isn't linked. These rules match Bootstrap's naming and
   spacing scale for the handful of classes actually used.
   ================================================================ */

/* Layout containers -- simple flex wrappers, not Bootstrap's full
   container/grid/gutter system (nothing here uses paired gutter
   padding on .row/.col, so that complexity isn't needed). */
.container-flex {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.container-fluid {
	width: 100%;
	padding-left: 15px;
	padding-right: 15px;
	box-sizing: border-box;
}

.row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.col {
	flex: 1 0 0%;
	min-width: 0;
}

.col-2 {
	flex: 0 0 auto;
	width: 16.6667%; /* 2 of 12 grid columns, matching Bootstrap's col-2 */
}

.col-auto {
	flex: 0 0 auto;
	width: auto;
}

.align-auto-self-start {
	/* Not actually a Bootstrap class name (Bootstrap's equivalent is
	   align-self-start) -- written to match the literal class name
	   used in boxdel.html rather than silently renaming it. */
	align-self: flex-start;
}

.border {
	border: 1px solid #dee2e6;
}

/* Spacing utilities -- Bootstrap's naming (t/b/s = top/bottom/start)
   and standard scale. */
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.mt-auto { margin-top: auto; }
.mb-3 { margin-bottom: 1rem; }
.pt-3 { padding-top: 1rem; }
.pb-3 { padding-bottom: 1rem; }
.p-2 { padding: 0.5rem; }
.ps-2 { padding-left: 0.5rem; }

/* ******************************************** */
/* Control Panel > Unlinked Photo Cleanup        */
/* ******************************************** */
/* Sized up from the default ~13px checkbox and given the accent
   color so it's not easy to miss next to a thumbnail. */
.cp-orphan-checkbox {
	width: 26px;
	height: 26px;
	accent-color: #a40000;
	cursor: pointer;
}

/* Padded clickable label: bigger tap target than the 26px checkbox
   alone. */
.cp-checkbox-wrap {
	display: inline-flex;
	align-items: center;
	padding: 10px;
	cursor: pointer;
}

/* ******************************************** */
/* Control Panel > Server tab -- config display  */
/* ******************************************** */
/* dbhost/dbname/dbuser/dbpass are short values but default to
   ~20-character width, wrapping onto their own line on a phone.
   Narrowed to fit. Not applied to #imagedir/#bud, which hold long
   paths -- the stacking fallback below covers those instead. */
#dbhost, #dbname, #dbuser, #dbpass {
	width: 12ch;
}

/* Fallback for any row that still doesn't fit on one line: stacks
   label above value instead of letting flex-wrap drop it onto its
   own line. */
@media (max-width: 480px) {
	#Server .row {
		flex-direction: column;
		align-items: flex-start;
	}

	#Server .col-2 {
		width: auto;
	}
}

/* ******************************************** */
/* Context-sensitive help: button + slide-in panel */
/* ******************************************** */
/* templates/includes/header.html + static/help_panel.js. Fixed to
   the viewport, not #container. */
.help-button {
	position: fixed;
	top: 12px;
	right: 12px;
	z-index: 3;
	background: #fff;
	border: none;
	border-radius: 6px;
	padding: 4px 6px;
	cursor: pointer;
	line-height: 0;
}

.help-button:hover {
	background: #f0f0f0;
}

/* Dims the page behind the panel and, when clicked, closes it -- same
   "click outside to dismiss" pattern as the existing .modal overlay,
   just anchored to the right edge instead of centered. */
.help-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.3);
	z-index: 4;
}

.help-overlay.open {
	display: block;
}

.help-panel {
	position: fixed;
	top: 0;
	right: 0;
	width: 420px;
	max-width: 90vw;
	height: 100%;
	background: #fff;
	border-left: 1px solid #888;
	box-shadow: -2px 0 8px rgba(0, 0, 0, 0.2);
	z-index: 5;
	display: flex;
	flex-direction: column;
	/* Slid fully off-screen by default; .open slides it in. Transition
	   lives here (not on .open) so it animates both directions. */
	transform: translateX(100%);
	transition: transform 0.2s ease-out;
}

.help-panel.open {
	transform: translateX(0);
}

.help-panel-header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	border-bottom: 1px solid #ccc;
	flex: 0 0 auto;
	position: relative;
}

.help-panel-title {
	font-size: 18px;
	font-weight: bold;
	flex: 1 1 auto;
}

.help-toc-button {
	cursor: pointer;
	font-size: 13px;
	color: #333;
	background: #f2f2f2;
	border: 1px solid #ccc;
	border-radius: 4px;
	padding: 4px 10px;
	flex: 0 0 auto;
	/* Centered in the header regardless of title length or the
	   close button's width -- taken out of flex flow and centered
	   against the header itself rather than sharing leftover
	   flex space with its siblings. */
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
}

.help-toc-button:hover {
	background: #e6e6e6;
}

.help-panel-close {
	cursor: pointer;
	font-size: 26px;
	line-height: 1;
	color: #888;
	flex: 0 0 auto;
}

.help-panel-close:hover {
	color: #333;
}

.help-panel-search {
	padding: 10px 14px;
	border-bottom: 1px solid #ccc;
	flex: 0 0 auto;
	position: relative;
}

.help-search-box {
	width: 100%;
	box-sizing: border-box;
	padding: 6px 8px;
	font-size: 14px;
}

/* Dropdown of matches, floated below the search box and over the
   iframe -- .help-panel-search is position:relative so this anchors
   to the search box rather than the whole panel. */
.help-search-results {
	display: none;
	position: absolute;
	left: 14px;
	right: 14px;
	top: 100%;
	background: #fff;
	border: 1px solid #ccc;
	border-top: none;
	max-height: 60vh;
	overflow-y: auto;
	z-index: 1;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.help-search-results.open {
	display: block;
}

.help-search-result {
	padding: 8px 10px;
	border-bottom: 1px solid #eee;
	cursor: pointer;
}

.help-search-result:last-child {
	border-bottom: none;
}

.help-search-result:hover {
	background: #f5f5f5;
}

.help-search-result-title {
	font-weight: bold;
	font-size: 14px;
}

.help-search-result-snippet {
	font-size: 12px;
	color: #555;
	margin-top: 2px;
}

.help-search-empty {
	padding: 10px;
	font-size: 13px;
	color: #777;
}

.help-panel-frame {
	flex: 1 1 auto;
	width: 100%;
	border: none;
}

@media (max-width: 480px) {
	.help-panel {
		width: 100%;
		max-width: 100%;
	}
}
