/* Sust Media Feed — Stylesheet */

.smf-media-feed {
  font-family: inherit;
  max-width: 100%;
}

/* Section title */
.smf-section {
  margin-bottom: 48px;
}

.smf-section-title {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
  color: inherit;
}

/* Notice */
.smf-notice {
  text-align: center;
  color: #666;
  padding: 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

/* Grid: 2 columns */
.smf-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 600px) {
  .smf-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================
   CARD BASE
   ======================== */
.smf-card {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: #111;
  cursor: pointer;
}

.smf-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.smf-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Embed iframe replaces thumbnail */
.smf-embed-wrap {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: #000;
}

.smf-embed-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.smf-hidden {
  display: none !important;
}

/* ========================
   YOUTUBE CARD
   ======================== */

/* Dark gradient overlay at top and bottom */
.smf-yt-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, transparent 35%, transparent 60%, rgba(0,0,0,0.7) 100%);
  pointer-events: none;
  z-index: 1;
}

.smf-channel-row {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
}

.smf-channel-name {
  color: #fff;
  font-size: 0.78rem;
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

/* YouTube play button */
.smf-yt-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 68px;
  height: 48px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 3;
  padding: 0;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.smf-yt-play:hover {
  transform: scale(1.08);
  opacity: 0.9;
}

.smf-yt-play svg {
  width: 68px;
  height: 48px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}

/* Bottom bar */
.smf-yt-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 4;
}

.smf-action-icons {
  display: flex;
  gap: 8px;
}

.smf-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #fff;
  opacity: 0.85;
  transition: opacity 0.15s;
  display: flex;
  align-items: center;
}

.smf-icon-btn:hover {
  opacity: 1;
}

.smf-icon-btn svg {
  width: 18px;
  height: 18px;
}

.smf-watch-on-yt {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #fff;
  text-decoration: none;
  font-size: 0.72rem;
  opacity: 0.9;
  transition: opacity 0.15s;
}

.smf-watch-on-yt:hover {
  opacity: 1;
}

/* ========================
   SPOTIFY CARD
   ======================== */

.smf-spotify-card .smf-thumb-wrap {
  background: #111;
}

/* Semi-transparent overlay */
.smf-sp-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.65) 0%, transparent 45%, transparent 55%, rgba(0,0,0,0.3) 100%);
  z-index: 1;
  pointer-events: none;
}

.smf-sp-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  z-index: 2;
  pointer-events: all;
}

.smf-sp-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.smf-sp-show-icon {
  width: 32px;
  height: 32px;
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
}

.smf-sp-title {
  display: block;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.smf-sp-publisher {
  display: block;
  color: rgba(255,255,255,0.7);
  font-size: 0.65rem;
  margin-top: 2px;
}

.smf-sp-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  pointer-events: all;
}

.smf-sp-save {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.smf-sp-save:hover {
  color: #1DB954;
}

/* Spotify play button */
.smf-sp-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 56px;
  height: 56px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 3;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.smf-sp-play:hover {
  transform: scale(1.08);
}

.smf-sp-play svg {
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.5));
}

/* ========================
   SPOTIFY ROW CARD
   ======================== */

.smf-row-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  background: #111;
  border-radius: 6px;
  padding: 16px;
  margin-top: 12px;
  color: #fff;
}

.smf-row-card .smf-embed-wrap {
  position: relative;
  grid-column: 1 / -1;
  width: 100%;
  aspect-ratio: 16 / 5;
  border-radius: 4px;
  overflow: hidden;
}

.smf-row-cover {
  width: 90px;
  height: 90px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.smf-row-body {
  min-width: 0;
}

.smf-row-title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 6px;
  line-height: 1.3;
}

.smf-row-meta {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.55);
  margin: 0 0 10px;
}

.smf-row-save {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(255,255,255,0.7);
  font-size: 0.78rem;
  text-decoration: none;
  transition: color 0.15s;
}

.smf-row-save:hover {
  color: #1DB954;
}

.smf-row-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.smf-row-duration {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
}

.smf-row-play {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.smf-row-play:hover {
  transform: scale(1.1);
}

@media (max-width: 500px) {
  .smf-row-card {
    grid-template-columns: auto 1fr;
  }
  .smf-row-right {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-end;
  }
}

/* ========================
   SPOTIFY CHANNEL EMBED
   ======================== */
.smf-show-embed {
  margin-top: 16px;
  border-radius: 12px;
  overflow: hidden;
}

.smf-show-embed iframe {
  display: block;
  width: 100%;
  border: none;
  border-radius: 12px;
}
