/* ===== Hiding social content ===== */
.recent-activity-item-comment {
  display: none;
}

.article-votes {
  display: none;
}

.share {
  display: none;
}

.comment-overview {
  display: none;
}

.comment-callout {
  display: none;
}

/* ===== Collumns size ===== */
.container {
  max-width: 1300px !important;
}

.header {
    max-width: 1300px !important;
}

#main-content.article, .article, .article-body, #article-body {
    max-width: 100% !important;
}

.article-container a:hover,
#article-container a:hover {
    text-decoration: underline !important;
}

/* ===== Article page container ===== */
.article-container,
#article-container {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: flex-start !important;
  max-width: 1300px !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  background: transparent !important;
  gap: 40px !important;
  width: 100% !important;
  overflow-x: hidden !important;
}

/* ===== Main article ===== */
#main-content.article,
.article,
.article-body,
#article-body {
  flex: 1 1 700px !important;
  max-width: 100% !important;
  min-width: 300px !important;
  width: 100% !important;
  background: #fff !important;
  border-radius: 12px !important;
  margin: 40px 0 !important;
  font-size: 15px !important;
  line-height: 1.7 !important;
  box-sizing: border-box !important;
  overflow-wrap: break-word !important;
}

/* ===== Sidebar ===== */
.zd-sidebar,
.article-sidebar {
  max-width: 260px !important;
  width: 100% !important;
  background: #f1f5f9 !important;
  padding: 20px !important;
  border-radius: 10px !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
  margin: 40px 0 !important;
  box-sizing: border-box !important;
  overflow-wrap: break-word !important;
}

/* ===== Responsiveness ===== */
@media (max-width: 1150px) {
  .article-container,
  #article-container {
    flex-direction: column !important;
    gap: 0 !important;
    max-width: 100% !important;
  }
  #main-content.article,
  .article,
  .article-body,
  #article-body {
    max-width: 100% !important;
    padding: 18px 1vw !important;
    margin: 10px 0 !important;
    border-radius: 8px !important;
    font-size: 16px !important;
  }
  .zd-sidebar,
  .article-sidebar {
    max-width: 100% !important;
    margin: 0 0 24px 0 !important;
    border-radius: 8px !important;
  }
}

/* ===== Prevent horizontal page scroll ===== */
html,
body {
  overflow-x: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ===== General styles ===== */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  background: #fafafa !important;
  color: #222 !important;
  margin: 0 !important;
}

h1,
h2,
h3,
h4 {
  color: #004080 !important;
  font-weight: 700 !important;
  margin-top: 0.5em !important;
  margin-bottom: 0.5em !important;
}

a {
  color: #007acc !important;
  text-decoration: none !important;
  transition: color 0.3s ease !important;
}

a:hover,
a:focus {
  color: #005a99 !important;
  text-decoration: none !important;
}

p {
  margin-bottom: 1.15em !important;
  font-size: 15px !important;
  word-break: break-word !important;
}

ul,
ol {
  margin-left: 0.5em !important;
  margin-bottom: 1.1em !important;
  font-size: 15px !important;
}

ul li strong {
  color: #d9534f !important;
}

table {
  border-collapse: collapse !important;
  width: 100% !important;
  margin-bottom: 1.5em !important;
  table-layout: fixed !important;
  word-wrap: break-word !important;
}

th,
td {
  border: 1px solid #ddd !important;
  padding: 10px !important;
  text-align: left !important;
}

th {
  background-color: #007acc !important;
  color: white !important;
}

img,
.article-body img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 7px !important;
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.1) !important;
  margin: 1.5em 0 !important;
}

/* ===== Styles for <pre> blocks with copy button ===== */
pre {
  position: relative !important;
  background: #f7f9fc !important;
  border-left: 5px solid #007acc !important;
  padding: 17px 20px 17px 20px !important;
  border-radius: 5px !important;
  margin-bottom: 2em !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
  font-family: Consolas, Monaco, 'Courier New', monospace !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  overflow-x: auto !important;
  white-space: pre !important;
  word-break: break-word !important;
}

/* Copy button inside <pre> */
pre .copy-btn {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  background: none !important;
  border: none !important;
  padding: 6px !important;
  cursor: pointer !important;
  z-index: 2 !important;
  transition: background-color 0.3s ease !important;
  color: #007acc !important;
  border-radius: 4px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 16px !important;
}

pre .copy-btn:hover,
pre .copy-btn:focus {
  background-color: rgba(0, 122, 204, 0.2) !important;
  outline: none !important;
  color: #005a99 !important;
}

/* SVG icon inside the button, size and color */
pre .copy-btn svg {
  width: 20px !important;
  height: 20px !important;
  fill: currentColor !important;
}

/* ===== Responsiveness for small devices ===== */
@media (max-width: 900px) {
  #main-content.article,
  .article,
  .article-body,
  #article-body {
    padding: 10px 2vw !important;
    font-size: 16px !important;
  }
  pre {
    padding: 14px 14px 14px 14px !important;
    font-size: 14px !important;
  }
  pre .copy-btn {
    top: 8px !important;
    right: 8px !important;
    padding: 5px !important;
    font-size: 14px !important;
  }
}
