/* === General Page Layout === */
body {
  font-family: system-ui, Arial, sans-serif;
  background: #666;
  color: #222;
  margin: 0;
  padding: 0;
}

p {
  font-family: system-ui, Arial, sans-serif;
  color: #fff;
}

/* Banner/Header */
#Banner {
  background-color: #111;
  color: #fff;
  padding: 1px 10px 2px 10px;
  margin: 0 auto;
}

/* Links */
a, #csvHeaders, label {
  color: yellow;
}
a {
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Headings */
h1 {
  margin: 0 0 12px 0;
  font-size: 20px;
}
h2 {padding-top: 0px;}
#example {
	width: 500px;
	border: solid 1px yellow;
	margin: 5px 0 0 50px;
}
h3 {
  margin-top: 20px;
  margin-bottom: 10px;
  color: white;
}
#content{padding: 0 0 0 15px;}
/* Controls Section (character name & class dropdown) */
.controls {
  margin: 5px 0;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* Group Containers */
.group {
  margin-bottom: 18px;
  background: white;
  border: 1px solid #e6e6e6;
  padding: 2px;
  border-radius: 6px;
}
.group h2 {
  margin: 0 0 8px 0;
  font-size: 16px;
}

/* Tables */
.table-wrap {
  overflow: auto;
  max-width: 100%;
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 600px;
  font-size: 13px;
}
th, td {
  border: 1px solid #eee;
  padding: 6px 8px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}
th.left, td.left {
  text-align: left;
  white-space: normal;
}
th {
  background: #fafafa;
  position: sticky;
  top: 0;
  z-index: 2;
}
th img.header-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  display: block;
  margin: 2px auto;
}
td img.cell-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
  margin: 2px auto;
  transition: filter .14s, opacity .14s, transform .14s;
}
.present img.cell-img {
  filter: none;
  opacity: 1;
  transform: scale(1.02);
}
.absent img.cell-img {
  filter: grayscale(100%) contrast(.7);
  opacity: .28;
  transform: scale(.96);
}
tr.selected {
  background: #cce5ff;
}

/* Meta/Status Info */
.meta {
  font-size: 12px;
  color: #666;
  margin-left: 6px;
}
.status {
  color: #fff;
  font-size: 13px;
}
.searchbox {
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
}
.legend {
  font-size: 13px;
  color: #444;
}

/* Placeholders */
.placeholder {
  width: 42px;
  height: 42px;
  display: block;
  background: #f0f0f0;
  border-radius: 4px;
  border: 1px dashed #ddd;
}

/* === Items (artifacts, companions, mounts, etc.) === */
.item {
  display: inline-block;
  width: 90px;
  height: 90px;
  border-radius: 12px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
  transition: filter 0.2s, transform 0.2s;
}
.deselected {
  filter: grayscale(100%);
  opacity: 0.6;
}
.item:hover {
  transform: scale(1.05);
}
.Selectables {
  padding: 0 0 0 15px;
}

/* === Output / CSV Section === */
#Output {
  margin-top: 10px;
}
textarea#csvOutput {
  width: 100%;
  max-width: 90%;
  height: 100px;
  margin-top: 2px;
  box-sizing: border-box; /* prevents padding from causing overflow */
}
#csvHeaders {
  margin-top: 10px;
  font-weight: bold;
  white-space: nowrap;
  overflow-x: auto;
  max-width: 90%; /* match CSV box width */
}

/* === Buttons === */
button {
  margin-left: 10px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #000;
  cursor: pointer;
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* === Google Sheet Section === */
.example-url {
  text-decoration: underline dotted;
}
.sheet-id {
  color: red;
}
.gid {
  color: yellow;
}

/* Copy Message */
#copyMsg {
  display: none;
  color: yellow;
  margin-left: 10px;
}


  /* overlay iframe */
  #sheetOverlay {
    display: none;                 /* hidden until button pressed */
    position: fixed;
    inset: 0;                      /* top:0;right:0;bottom:0;left:0; */
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
  }
  #sheetOverlay iframe{
    width: 90%;
    height: 80%;
    background: #fff;
    border: 2px solid #444;
    border-radius: 8px;
  }
  #closeOverlay{
    position: absolute;
    top: 12px;
    right: 20px;
    background: #c00;
    color: #fff;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    z-index: 10000;
  }
  /* small nicety for table inside iframe 
  .summary-table { border-collapse: collapse; width: 100%; }
  .summary-table th, .summary-table td { border: 1px solid #ccc; padding: 6px; text-align: left; }
  .summary-table th { background: #eee; }*/
  
  .summary-table th {
  background: linear-gradient(#0a0a0a, #1c1c1c); /* dark background */
  color: #e0a325; /* gold text */
  font-family: "Georgia", serif; /* serif font for elegance */
  font-variant: small-caps; /* small caps effect */
  font-weight: bold;
  letter-spacing: 2px;
  text-align: center;
  padding: 8px 12px;
  border: 1px solid #333; /* subtle border */
  text-shadow: 0 0 3px #000, 0 0 5px #ffcc33; /* glow */
}

.summary-table {
  border-collapse: collapse;
  width: 100%;
}

.summary-table th, 
.summary-table td {
  border: 1px solid #222;
}