/* MtG Match Tracker - Single Match Display */

.wp-block-post-title {
  text-align: center;
}

.mtgmt-match-number {
  font-size: 1.1em;
  font-weight: 600;
  color: #666666;
  margin: 0 0 1.5em 0;
  text-align: center;
}

.mtgmt-match-decks-wrapper {
  max-width: 100vw;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  padding: 0 1.5em;
  width: 100vw;
}

.mtgmt-match-decks-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5em;
  margin: 2em 0;

  @media screen and (min-width: 782px) {
    grid-template-columns: repeat(2, 1fr);
  }

  @media screen and (min-width: 1024px) {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

.mtgmt-match-deck-card {
  background-color: #f7f4d8;
  border: 2px solid #000000;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: .5em;
  position: relative;
}

.mtgmt-winner-deck {
  background-color: #9bd3ae;
  border-color: #2d8659;
  border-width: 3px;
}
.mtgmt-winner-deck::before {
  content: '🏆 Winner';
  display: block;
  font-weight: 700;
  font-size: 0.9em;
  color: #1a5a3a;
  margin-bottom: 0.5em;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: absolute;
  top: -2em;
  left: 50%;
  transform: translateX(-50%);
}

.mtgmt-deck-card-title {
  align-items: center;
  display: flex;
  flex: 1;
  font-size: 1.25em;
  font-weight: 700;
  justify-content: center;
  margin: 0 0 0.5em 0;
  text-align: center;
}

.mtgmt-deck-card-title a {
  color: #000000;
  text-decoration: none;
}

.mtgmt-deck-card-title a:hover {
  color: #0066cc;
  text-decoration: underline;
}

.mtgmt-deck-card-owner,
.mtgmt-deck-card-stat {
  font-size: 1em;
  margin: 0.75em 1.5em 0 1.5em;
  text-align: center;
}

.mtgmt-deck-card-owner {
  border-block-start: 2px solid #000000;
  margin-block-start: auto;
  padding-block-start: .5em;
  margin-inline: -0.5em;
}

.mtgmt-deck-card-owner a {
  color: #0066cc;
  text-decoration: none;
  font-weight: 600;
}

.mtgmt-deck-card-owner a:hover {
  text-decoration: underline;
}

.mtgmt-label {
  font-weight: 600;
  color: #333333;
}

.mtgmt-value {
  font-weight: 700;
  color: #000000;
  font-size: 1.1em;
}

/* Match Commentary */

.mtgmt-match-commentary-wrapper {
  background-color: #f9f9f9;
  max-width: 800px;
  padding-block-start: 4.5em;
  position: relative;

  @media screen and (min-width: 782px) {
    border-left: 4px solid #aae0fa;
  }
}

.mtgmt-match-commentary-wrapper::after {
  background-color: #f9a98f;
  content: '';
  display: none;
  height: 100%;
  position: absolute;
  top: 0;
  left: 5em;
  width: 1px;

  @media screen and (min-width: 782px) {
    display: block;
  }
}

.mtgmt-match-commentary {
  margin: 0 auto;
  padding: 0.25em 1.5em 4.5em 1.5em;
  line-height: 1.5;
  background-image: linear-gradient(to bottom, rgba(51, 51, 51, 0.15) 1px, transparent 1px);
  background-size: 100% 1.5em;
  background-repeat: repeat-y;
  position: relative;

  @media screen and (min-width: 782px) {
  padding: 0.25em 3em 4.5em 6em;
  }
}

.mtgmt-match-commentary::before {
  content: "My Notes";
  display: block;
  font-family: 'Mansalva', cursive;
  font-size: 2rem;
  height: 1px;
  left: 0;
  position: absolute;
  text-align: center;
  top: -3.5rem;
  width: 100%;

  @media screen and (min-width: 782px) {
    font-size: 3rem;
    top: -4.5rem;
  }
}

.mtgmt-match-commentary p {
  font-family: 'Mansalva', cursive;
  margin: 1.5em 0;
}

.mtgmt-match-commentary p:first-child {
  margin-top: 0;
}

.mtgmt-match-commentary p:last-child {
  margin-bottom: 0;
}

/* Match Navigation */
.mtgmt-match-navigation {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1em;

  @media screen and (min-width: 782px) {
    flex-direction: row;
  }
}

.mtgmt-nav-button {
  padding: 0.5em 1em;
  background-color: #f5f5f5;
  border: 1px solid #000000;
  color: #000000;
  text-decoration: none;
  font-weight: 500;
  text-align: center;
  transition: background-color 0.2s;
  width: 100%;

  @media screen and (min-width: 782px) {
    width: unset;
  }
}

.mtgmt-nav-button:hover {
  background-color: #e0e0e0;
  text-decoration: none;
}

.mtgmt-nav-disabled {
  background-color: transparent;
  border-color: transparent;
  cursor: default;
}

.mtgmt-back-button-wrapper {
  align-items: center;
  display: flex;
  gap: 2em;
  justify-content: center;
}

.mtgmt-back-button {
  display: inline-block;
  padding: 0.5em 1em;
  background-color: #f5f5f5;
  border: 1px solid #000000;
  color: #000000;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s;
}

.mtgmt-back-button:hover {
  background-color: #e0e0e0;
  text-decoration: none;
}

/* Comments Block */

.wp-block-comments {
  background-color: #f9f9f9;
  background-image: linear-gradient(to bottom, rgba(51, 51, 51, 0.15) 1px, transparent 1px);
  background-size: 100% 1.5em;
  background-repeat: repeat-y;  
  border-left: 4px solid #aae0fa;
  padding: .5em 1em;
  position: relative;

  @media screen and (min-width: 782px) {
    padding: .5em 0em;
  }
}

.wp-block-comments::before {
  background-color: #f9f9f9;
  content: 'Comments';
  display: block;
  font-family: 'Mansalva', cursive;
  font-size: 2em;
  text-align: center;
  height: 2em;
  margin-inline-start: -.5em;
  width: calc(100% + 1em);

  @media screen and (min-width: 782px) {
    margin-inline-start: 0;
    width: 100%;
  }
}

.wp-block-comments::after {
  background-color: #f9a98f;
  content: '';
  display: none;
  height: 100%;
  position: absolute;
  top: 0;
  left: 5em;
  width: 1px;

  @media screen and (min-width: 782px) {
    display: block;
  }
}

.wp-block-comments-title {

  @media screen and (min-width: 782px) {
    padding-inline-start: 5.5em;
  }
}

.wp-block-comment-template {
  @media screen and (min-width: 782px) {
    margin-inline-start: 2em;
  }
}

.comment-respond {
  @media screen and (min-width: 782px) {
    margin-inline-start: 5.5em;
  }
}
