/* ----------------------------------------
   Bluemoon TV Guide — Channel Schedule Cards
   Dual HTML variants for desktop/mobile
   ---------------------------------------- */

/* when our schedule is present inside the post content */
.entry-content.has-global-padding.is-layout-constrained:has(#bmg-tvguide-schedule) {
  padding: 5px !important;
}

.bmg-controls {
  display: flex;
  align-items: center;
}

.bmg-channel-control {
  display: flex;
  align-items: center;
}

.bmg-channel-logo {
  height: 2em;          /* or whatever fits */
  margin-right: 0.5em;
  display: inline-block;
  vertical-align: middle;
}

/* make the selected value display larger */
#bmg-channel-select {
  font-size: 1.25em;    /* or whatever “big” size you want */
}

/* keep the dropdown options at the normal size */
#bmg-channel-select option {
  font-size: 0.8em;       /* your regular size */
}



.bmg-schedule-header {
  font-weight: bold;
  font-size: 1em;
  margin-bottom: 2px;
}
.bmg-schedule-date {
  font-weight: bold;
  font-size: 0.75em;
  margin-bottom: 2px;
  margin-left:2.6em;
}

#bmg-schedule-output {
  border: 1px solid #000000;
  border-radius: 4px;
  background: #fff;
  padding-left: 5px;
  margin-bottom: 0.1em;
}

/* Container: vertical stack of cards */
.bmg-schedule-cards {
  margin: 0;
  padding: 0;
  list-style: none;
  /* max-height: 600px; */ /* adjust as needed */
  overflow-y: auto;
}

/* Common card wrapper styling */
.bmg-card {
  border: 1px solid #434343;
  border-radius: 4px;
  background: #fff;
  margin-bottom: 0.1em;
  overflow: hidden;
}

/* Highlight the current programme */
.bmg-card.current {
  border-color: #002231;
  background-color: #88c7ff;
}

/* Variant toggles */
.bmg-card--desktop {
  display: flex;
}
.bmg-card--mobile {
  display: none;
}

/* Desktop variant: image column */
.bmg-card--desktop .bmg-card-image {
  flex: 0 0 120px;
  background: #f9f9f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.bmg-card--desktop .bmg-card-image img {
  width: 75%;
  height: auto;
  display: block;
}

/* Desktop variant: content column */
.bmg-card--desktop .bmg-card-content {
  flex: 1 1 auto;
  padding: 0.2em;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.bmg-card--desktop .bmg-card-title {
  font-size: 1em;
  font-weight: bold;
  color: #000000;
  margin: 0 0 0.1em;
}
.bmg-card--desktop .bmg-card-time {
  font-size: 0.8em;
  color: #252525;
  margin-bottom: 0.1em;
}
.bmg-card--desktop .bmg-card-description {
  font-size: 0.7em;
  color: #333;
  line-height: 1.2;
  flex: 1 1 auto;
  overflow-wrap: break-word;
}

/* Desktop variant: hide mobile‐specific header/body */
.bmg-card--desktop .bmg-card-header,
.bmg-card--desktop .bmg-card-body {
  display: none;
}


/* ——————————————
   Mobile-only: new one-column layout
   —————————————— */
@media (max-width: 600px) {

  /* tighter edges for schedule container */
  #bmg-schedule-output {
    padding: 0 2px;
  }

  /* outer card becomes block */
  .bmg-card {
    display: block;
    padding: 0.5em;
  }

  /* switch variants */
  .bmg-card--desktop { display: none; }
  .bmg-card--mobile  { display: block; }

  /* mobile header (title + time) */
  .bmg-card--mobile .bmg-card-header {
    margin-bottom: 0.3em;
    display: block;
  }
  .bmg-card--mobile .bmg-card-title {
    font-size: 0.85em;
    font-weight: bold;
    line-height: 1.25em;
    margin-bottom: 0.1em;
  }
  .bmg-card--mobile .bmg-card-time {
    font-size: 0.6em;
    margin-bottom: 0.1em;
  }

  /* mobile body: image floated left, description wraps */
  .bmg-card--mobile .bmg-card-body {
    overflow: hidden;
    display: block;
  }
  .bmg-card--mobile .bmg-card-image {
    float: left;
    width: 45%;
    margin-right: 0.25em;
    margin-bottom: 0.25em;
  }
  .bmg-card--mobile .bmg-card-image img {
    width: 100%;
    height: auto;
  }
  .bmg-card--mobile .bmg-card-description {
    font-size: 0.6em;
    line-height: 1.15;
  }

  /* hide desktop-only content wrapper */
  .bmg-card--mobile .bmg-card-content {
    display: none;
  }
}

/* Desktop fallback: ensure mobile variant is hidden on larger screens */
@media (min-width: 601px) {
  .bmg-card--mobile {
    display: none;
  }
}
