/* Styles for the trade averages table */
.trade-averages-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-family: Arial, sans-serif;
  font-size: 14px;
  color: #333;
}

.trade-averages-table th,
.trade-averages-table td {
  padding: 10px;
  text-align: center;
  border: 1px solid #ddd;
}

.trade-averages-table th {
  background-color: #f4f4f4;
  font-weight: bold;
  color: #333;
}

.trade-averages-table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

.trade-averages-table tbody tr:nth-child(odd) {
  background-color: #fff;
}

.trade-averages-table tbody tr:hover {
  background-color: #f1f1f1;
}

.trade-averages-table td {
  padding: 10px;
}

/* Base table styling for desktop */
.trade-averages-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-family: Arial, sans-serif;
  font-size: 14px;
  color: #333;
}

.trade-averages-table th,
.trade-averages-table td {
  padding: 10px;
  text-align: center;
  border: 1px solid #ddd;
}

.trade-averages-table th {
  background-color: #f4f4f4;
  font-weight: bold;
  color: #333;
}

.trade-averages-table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

.trade-averages-table tbody tr:nth-child(odd) {
  background-color: #fff;
}

.trade-averages-table tbody tr:hover {
  background-color: #f1f1f1;
}

/* Responsive styling for mobile devices */
@media (max-width: 768px) {

  .trade-averages-table,
  .trade-averages-table thead,
  .trade-averages-table tbody,
  .trade-averages-table th,
  .trade-averages-table td,
  .trade-averages-table tr {
    display: block;
    width: 100%;
  }

  .trade-averages-table thead tr {
    display: none;
    /* Hide the table header */
  }

  .trade-averages-table tbody tr {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    padding: 10px;
    background-color: #fff;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  }

  .trade-averages-table td {
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    text-align: left;
    border: none;
    border-bottom: 1px solid #eee;
  }

  .trade-averages-table td:before {
    content: attr(data-label);
    font-weight: bold;
    flex: 1;
    color: #333;
  }

  .trade-averages-table td:last-child {
    border-bottom: none;
  }
}

/* Optional: Add a slight shadow for a floating effect */
.trade-averages-table {
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {

  .tradejournal-table th,
  .tradejournal-table td {
    display: block;
    /* Stack columns on smaller screens */
    width: 100%;
  }

  .tradejournal-table th {
    display: none;
    /* Hide table headers on small screens */
  }

  .tradejournal-table td:before {
    content: attr(data-label);
    /* Show the table header as a label before the content */
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
  }
}

.tradejournal-thumbnail {
  width: 100px;
  /* Set a fixed width */
  height: auto;
  border-radius: 5px;
  /* Optional: rounded corners */
}

/* Container for the Isotope grid */
.tradejournal-posts {
  width: 100%;
  margin: 0 auto;
  container-type: inline-size;
  /* Enable container query support */
}

/* Individual post item */
.tradejournal-post {
  background: #fff;
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 8px;
  box-sizing: border-box;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
  margin-bottom: 20px;
  /* Vertical space between items */
}

.tradejournal-post:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Featured image full width */
.tradejournal-thumbnail {
  width: 100%;
  height: auto;
  margin-bottom: 15px;
  border-radius: 8px;
}

/* For larger screens (3 columns) */
@container (min-width: 900px) {
  .tradejournal-post {
    width: calc(33.33% - 20px);
    /* 3 columns with space for gutter */
  }
}

/* For medium screens (2 columns) */
@container (min-width: 600px) and (max-width: 899px) {
  .tradejournal-post {
    width: calc(50% - 15px);
    /* 2 columns with space for gutter */
  }
}

/* For smaller screens (1 column) */
@container (max-width: 599px) {
  .tradejournal-post {
    width: 100%;
  }
}

.tradejournal-post {
  cursor: pointer;
  /* Changes the cursor to a hand */
}

/* Center the profit container and style it as a button */
.profit-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  border-radius: 5px;
  color: #fff;
  text-align: center;
  margin-top: 10px;
  margin: 10px auto;
  /* Center horizontally */
  max-width: 200px;
  /* Set the max width */
}

.positive-profit {
  background-color: #4caf50;
  /* Green for positive profit */
}

.negative-profit {
  background-color: #f44336;
  /* Red for negative profit */
}

.zero-profit {
  background-color: #ff9800;
  /* Orange for zero profit */
}

.profit-container strong {
  margin-right: 5px;
  /* Adjust the space between PROFIT: and the value */
}

/* Make FooTable always take up 100% width */
.footable,
.footable table {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto;
  /* Center table if needed */
}

.tjwp-post-navigation {
  display: flex;
  justify-content: center;
  gap: 2rem;
  /* Adds space between the links */
  margin: 2rem 0;
  /* Adds vertical spacing around the navigation */
  font-size: 1rem;
  /* Optional: Adjust the font size */
}

.tjwp-post-navigation .nav-previous,
.tjwp-post-navigation .nav-next {
  text-align: center;
}

.tjwp-post-navigation a {
  text-decoration: none;
  color: #0073aa;
  /* Matches WordPress link color */
  transition: color 0.3s ease;
}

.tjwp-post-navigation a:hover {
  color: #005177;
  /* Darker shade for hover effect */
}