/* All selectors are scoped to this plugin. */
.tr-temp-radio,
.tr-temp-radio * { box-sizing: border-box; }
.tr-temp-radio {
  --tr-temp-pink: #ef0c61;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  width: 128px;
  min-height: 100px;
  padding: 10px;
  border: 1px solid #ededed;
  border-radius: 12px;
  background: #fff;
  color: #181818;
  font-family: Arial, Helvetica, sans-serif;
}
.tr-temp-radio__heading { font-size: 11px; line-height: 1.25; font-weight: 700; }
.tr-temp-radio__frequency { color: var(--tr-temp-pink); font-size: 12px; line-height: 1.3; white-space: nowrap; }
.tr-temp-radio__play-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 34px;
  margin-top: auto;
  border-radius: 6px;
  background: var(--tr-temp-pink);
  color: #fff;
  text-decoration: none;
}
.tr-temp-radio__play-link:visited,
.tr-temp-radio__play-link:hover { color: #fff; }
.tr-temp-radio__play-link:hover { background: #d90755; }
.tr-temp-radio__play-link:focus-visible { outline: 2px solid #181818; outline-offset: 3px; }
.tr-temp-radio__play-link svg { display: block; width: 18px; height: 18px; }

/* The desktop Gutenberg card already owns the heading, frequency and frame. */
@media (min-width: 1025px) {
  .wp-block-group.gray:has(> .tr-temp-radio) {
    box-sizing: border-box;
    width: 160px;
    max-width: 100%;
    padding: 10px 11px;
    border: 1px solid #ededed;
    border-radius: 15px;
    background: #fff;
  }
  .wp-block-group.gray:has(> .tr-temp-radio) > .wp-block-heading {
    margin: 0;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 700;
  }
  .wp-block-group.gray:has(> .tr-temp-radio) > .wp-block-paragraph {
    margin: 7px 0 0;
    color: #ef0c61;
    font-size: 12px;
    line-height: 1.3;
  }
  .wp-block-group.gray > .tr-temp-radio {
    display: block;
    width: 100%;
    min-height: 0;
    margin: 8px 0 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .wp-block-group.gray > .tr-temp-radio > .tr-temp-radio__heading,
  .wp-block-group.gray > .tr-temp-radio > .tr-temp-radio__frequency { display: none; }
  .wp-block-group.gray > .tr-temp-radio > .tr-temp-radio__play-link {
    width: 100%;
    min-height: 40px;
    margin: 0;
  }
}

/* Gutenberg shows this header only through 1024px and supplies its own FM text. */
@media (min-width: 782px) and (max-width: 1024px) {
  .stickyfm .tr-temp-radio { align-self: center; }
  .stickyfm .tr-temp-radio__frequency { display: none; }
}

@media (max-width: 781px) {
  .tr-temp-radio {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-height: 46px;
    padding: 4px 8px;
    border: 1px solid #ededed;
    border-radius: 0;
  }
  .tr-temp-radio__heading { display: none; }
  .tr-temp-radio__frequency { font-size: 12px; }
  .tr-temp-radio__play-link {
    flex: 0 0 30px;
    width: 30px;
    min-height: 30px;
    margin: 0;
    border-radius: 50%;
  }
  .tr-temp-radio__play-link svg { width: 16px; height: 16px; }

  /* Only the header placement uses Gutenberg's existing frequency and row. */
  .stickyfm .tr-temp-radio {
    flex: 0 0 auto;
    width: auto;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .stickyfm .tr-temp-radio__frequency { display: none; }
  .stickyfm .tr-temp-radio__play-link {
    width: 30px;
    min-height: 30px;
  }
  .stickyfm:has(.tr-temp-radio) .fm {
    flex-shrink: 0;
    margin: 0;
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
  }
}
