/* Dark Mode Item Card Styling - Only for search-items pages */
/* The JavaScript file adds the 'search-items-page' class to the body */

body.search-items-page .rst-content .section {
  max-width: 650px;
  background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
  border: 2px solid #5a5a5a;
  border-radius: 0;
  padding: 20px;
  color: #d0d0d0;
  font-family: 'Palatino Linotype', 'Palatino', serif;
  font-size: 14px;
  line-height: 2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  font-style: italic;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

body.search-items-page .rst-content .section h1 {
  color: #ffffff;
  font-size: 20px;
  margin: 0 0 0 0;
  font-weight: bold;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  border: none;
  padding: 0;
  font-style: italic;
  text-transform: capitalize;
}

body.search-items-page .rst-content .section > ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

body.search-items-page .rst-content .section > ul > li {
  padding: 0;
  margin: 0;
  font-size: 14px;
  line-height: 2;
  color: #d0d0d0;
  font-style: italic;
  display: block;
}

/* First few lines (Damage/Protection, Weapon/Armor type, Related skill) */
body.search-items-page .rst-content .section > ul > li:nth-child(1),
body.search-items-page .rst-content .section > ul > li:nth-child(2),
body.search-items-page .rst-content .section > ul > li:nth-child(3) {
  margin-bottom: 0;
}

/* Stat bonuses - add space between groups */
body.search-items-page .rst-content .section > ul > li:nth-child(n+4) {
  margin-bottom: 0;
}

body.search-items-page .rst-content .section > ul {
  position: relative;
}

/* Item level and equip level - on same line with space */
body.search-items-page .rst-content .section > ul > li:nth-last-child(2) {
  display: inline;
  margin-bottom: 0;
  margin-right: 0;
  border-top: 1px solid #3a3a3a;
  padding-top: 10px;
  margin-top: 0;
  padding-bottom: 10px;
}

body.search-items-page .rst-content .section > ul > li:nth-last-child(2)::before {
  content: "";
  display: block;
  margin-top: 10px;
}

body.search-items-page .rst-content .section > ul > li:nth-last-child(2)::after {
  content: " ";
  margin-right: 20px;
}

body.search-items-page .rst-content .section > ul > li:nth-last-child(1) {
  display: inline;
  margin-bottom: 0;
}

/* Requirements paragraph - only first line (Requires) is blue */
body.search-items-page .rst-content .section > p {
  color: #d0d0d0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  margin-left: 20px !important;
  margin-right: 0 !important;
  font-style: italic;
  font-size: 14px;
  line-height: 2;
  white-space: pre-wrap;
  clear: both;
  display: block;
}

/* Item ID line - remove special formatting */
body.search-items-page .rst-content .section > p:nth-of-type(1) {
  color: #d0d0d0 !important;
  margin-left: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 20px !important;
  font-style: italic !important;
  font-size: 12px !important;
}

/* Remove blue color from first line of ID paragraph */
body.search-items-page .rst-content .section > p:nth-of-type(1)::first-line {
  color: #d0d0d0 !important;
}

body.search-items-page .rst-content .section > p::first-line {
  color: #6495ed !important;
}

/* Sales Statistics section - add spacing and horizontal rule above it */
/* Target the paragraph that contains "Sales Statistics" */
body.search-items-page .rst-content .section > p:nth-of-type(2) {
  margin-top: 30px !important;
  padding-top: 20px !important;
  border-top: 2px solid #5a5a5a !important;
  color: #d0d0d0 !important;
  font-size: 16px !important;
  font-weight: normal !important;
  font-style: italic !important;
  letter-spacing: 1px !important;
  margin-left: 0 !important;
}

/* Make first line of Sales Statistics paragraph bold and green */
body.search-items-page .rst-content .section > p:nth-of-type(2)::first-line {
  font-weight: bold !important;
  color: #00cc00 !important;
}

/* Sales Statistics data lines */
body.search-items-page .rst-content .section > p:nth-of-type(n+3) {
  color: #d0d0d0 !important;
  margin-left: 20px !important;
}

/* Currency color classes - override paragraph color with higher specificity */
body.search-items-page .rst-content .section > p:nth-of-type(n+3) .currency-plat {
  color: #87ceeb !important; /* Light blue */
}

body.search-items-page .rst-content .section > p:nth-of-type(n+3) .currency-gold {
  color: #d4af37 !important; /* Gold */
}

body.search-items-page .rst-content .section > p:nth-of-type(n+3) .currency-silver {
  color: #c0c0c0 !important; /* Silver */
}

body.search-items-page .rst-content .section > p:nth-of-type(n+3) .currency-copper {
  color: #b8704f !important; /* Brownish orange */
}

/* Hide the Edit on GitHub link - readthedocs theme */
a.edit-button {
  display: none !important;
}

a.edit-on-github {
  display: none !important;
}

.rst-content .edit-button {
  display: none !important;
}

a[href*="github.com"] i.fa-github {
  display: none !important;
}

/* Hide edit links in general */
a.fa-github {
  display: none !important;
}

/* Responsive design */
@media (max-width: 768px) {
  body.search-items-page .rst-content .section {
    padding: 16px;
    max-width: 100%;
  }
  
  body.search-items-page .rst-content .section h1 {
    font-size: 16px;
  }
  
  body.search-items-page .rst-content .section > ul > li {
    font-size: 12px;
  }
}

