/* Custom styles to override theme defaults */

* {
  border-bottom: none !important;
}

/* Remove text decoration from all links */
a {
  text-decoration: none !important;
}

/* GitHub stats table styling */
.github-stats-table {
  background-color: transparent !important;
  border-collapse: collapse !important;
  border: none !important;
}

.github-stats-table td,
.github-stats-table tr {
  background-color: transparent !important;
  border: none !important;
  padding: 5px !important;
}

/* Make sure GitHub stats images have proper background */
.github-stats-img {
  background-color: transparent !important;
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  margin: 0 auto !important;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease !important;
  cursor: zoom-in !important;
  border-radius: 6px !important;
}

.github-stats-img:hover {
  transform: scale(1.02) !important;
  box-shadow: 0 5px 15px rgba(99, 76, 158, 0.3) !important;
}

/* Container styling for GitHub stats */
.github-stats-container {
  background-color: #100f0f !important;
  border-radius: 6px !important;
  padding: 10px !important;
  min-height: 50px !important;
  position: relative !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: height 0.3s ease !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Loading failed message styling */
.github-stats-container.loading-failed::after {
  content: 'GitHub Stats Unavailable - Please check back later';
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  color: #666 !important;
  font-size: 14px !important;
  text-align: center !important;
  width: 90% !important;
  font-style: italic !important;
  opacity: 0.8 !important;
}

/* Override any theme-specific table styles */
.post-content table > tbody > tr {
  background-color: transparent !important;
}

.post-content table > tbody > tr:nth-child(odd) {
  background-color: transparent !important;
}

.post-content table > tbody > tr:hover {
  background-color: transparent !important;
}

.table-wrapper {
  margin-bottom: 0px !important;
}

.center-two-side {
  min-height: 100px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}

/* Custom emoji bullet lists */
.emoji-list {
  list-style-type: none !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
}

.emoji-list li {
  position: relative !important;
  padding-left: 2.5em !important;
  margin-bottom: 0.5em !important;
  line-height: 1.6em !important;
  min-height: 1.6em !important;
  display: block !important;
}

/* For list items with multi-line content, ensure proper spacing */
.emoji-list li:not(:has(.sub-list)) {
  padding-top: 0.1em !important;
  padding-bottom: 0.1em !important;
}

.emoji-list li .emoji-bullet {
  position: absolute !important;
  left: 0 !important;
  top: 0.45em !important;
  transform: none !important;
  width: 2em !important;
  text-align: left !important;
  font-size: 0.95em !important;
  display: inline-block !important;
  line-height: 1.6em !important;
}

.emoji-list .sub-list {
  list-style-type: none !important;
  padding-left: 2em !important;
  margin-top: 0.5em !important;
  margin-bottom: 0.5em !important;
}

.emoji-list .sub-list li {
  padding-left: 2.5em !important;
  margin-bottom: 0.3em !important;
  min-height: 1.4em !important;
}

.emoji-list .sub-list li .emoji-bullet {
  font-size: 0.85em !important;
  top: 0.4em !important;
  transform: none !important;
}

/* Fix for the Galician flag image in the bullet */
.emoji-list .sub-list li .emoji-bullet img {
  vertical-align: middle !important;
  width: 14px !important;
  height: 14px !important;
  margin: 0 !important;
}

/* For list items with nested lists, ensure proper spacing */
.emoji-list li.has-sub-list {
  padding-top: 0.1em !important;
}

/* Equal height for the side-by-side containers */
tr.center-two-side {
  display: table-row !important;
}

tr.center-two-side td {
  display: table-cell !important;
  vertical-align: top !important;
  width: 50% !important;
  padding: 10px !important;
  height: inherit !important; /* Ensure height is inherited from parent */
  box-sizing: border-box !important;
}

.github-stats-container.center-two-side {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
}

/* Make sure images maintain aspect ratio while filling container */
.github-stats-container.center-two-side .github-stats-img {
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
}

/* Additional fixes for equal height containers */
.github-stats-table table {
  height: 100% !important;
  width: 100% !important;
  table-layout: fixed !important;
}

/* Fix for nested tables */
.github-stats-table td table {
  margin-bottom: 0 !important;
}

/* Ensure images don't overflow their containers */
.github-stats-img {
  max-width: 100% !important;
}

/* Ensure proper spacing between text and sub-lists */
.emoji-list > li > .sub-list {
  margin-top: 0.3em !important;
  width: 100% !important;
}

/* Alternative for browsers that don't support :has() */
.emoji-list > li > .emoji-bullet {
  top: 0.25em !important; /* Default position for all list items */
}

/* Special handling for list items with nested lists */
.emoji-list > li.has-sub-list > .emoji-bullet {
  top: 0.25em !important; /* Keep consistent with regular list items */
}

/* Modal for zoomed images */
.image-modal {
  display: none;
  position: fixed !important;
  z-index: 1000 !important;
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background-color: rgba(0, 0, 0, 0.85) !important;
  overflow: auto !important;
  transition: all 0.3s ease !important;
  cursor: zoom-out !important;
}

.modal-content {
  display: block !important;
  position: relative !important;
  margin: auto !important;
  padding: 20px !important;
  max-width: 90% !important;
  max-height: 90% !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}

.modal-content img {
  display: block !important;
  margin: 0 auto !important;
  max-width: 100% !important;
  max-height: 90vh !important;
  object-fit: contain !important;
  box-shadow: 0 0 20px rgba(99, 76, 158, 0.5) !important;
  border-radius: 8px !important;
  cursor: default !important;
}

.close-modal {
  position: absolute !important;
  top: 15px !important;
  right: 25px !important;
  color: #f1f1f1 !important;
  font-size: 40px !important;
  font-weight: bold !important;
  cursor: pointer !important;
  z-index: 1001 !important;
  transition: color 0.3s ease !important;
}

.close-modal:hover {
  color: #634c9e !important;
}

.content a.popup {
  margin: 0 !important;
}
