.paulcast-player {
  width: 100%;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  font-family: inherit;
  margin-bottom: 1.5rem;
}

.paulcast-player.theme-dark {
  background: #1e293b;
  border-color: #334155;
  color: #fff;
}

.paulcast-player-modern {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  gap: 1rem;
}

@media (min-width: 640px) {
  .paulcast-player-modern {
    flex-direction: row;
  }
}

.paulcast-player-image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .paulcast-player-image {
    width: 300px;
  }
}

.paulcast-player-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.paulcast-player-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.paulcast-player-title {
  font-size: 16px !important;
  font-weight: 300 !important;
  margin: 0 !important;
  padding: 0 !important;
  font-family: "Droid Sans", sans-serif !important;
  line-height: 1.5 !important;
  color: inherit !important;
}

.paulcast-player-progress .paulcast-player-title:only-child {
  margin: 0 !important;
}

.paulcast-player-duration {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 1rem;
}

.theme-dark .paulcast-player-duration {
  color: #94a3b8;
}

.paulcast-player-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 8px;
}

.theme-dark .paulcast-player-controls {
  background: #0f172a;
}

.paulcast-player-play-btn {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  border-radius: 50% !important;
  border: none !important;
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0;
  color: #fff !important;
  padding: 0 !important;
  margin: 0;
  transition: transform 0.1s ease;
  box-sizing: border-box !important;
}

.paulcast-player-play-btn:active {
  transform: scale(0.95);
}

.paulcast-player-play-btn.style-square {
  border-radius: 8px !important;
}

.paulcast-player-play-btn svg {
  width: 16px !important;
  height: 16px !important;
  fill: #fff !important;
  display: block !important;
  margin-left: 2px;
}

.paulcast-player-progress {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: center;
  gap: 0.25rem;
}

.paulcast-player-progress-bar {
  width: 100%;
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
}

.theme-dark .paulcast-player-progress-bar {
  background: #334155;
}

.paulcast-player-progress-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.1s ease;
}

.paulcast-player-time {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #64748b;
  font-family: monospace;
}

.theme-dark .paulcast-player-time {
  color: #94a3b8;
}

.paulcast-player-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.paulcast-player-action-btn {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  border-radius: 4px !important;
  border: none !important;
  background: transparent !important;
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #64748b !important;
  padding: 0 !important;
  transition: background 0.2s ease;
  box-sizing: border-box !important;
}

.paulcast-player-action-btn:hover {
  background: #e2e8f0 !important;
}

.theme-dark .paulcast-player-action-btn {
  color: #94a3b8 !important;
}

.theme-dark .paulcast-player-action-btn:hover {
  background: #334155 !important;
}

.paulcast-player-action-btn svg {
  width: 16px !important;
  height: 16px !important;
  display: block !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
}

.paulcast-player-speed-btn {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0 0.5rem;
  width: auto;
}

.paulcast-player-subscribe {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.paulcast-player-subscribe-link {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.paulcast-player-subscribe-link:hover {
  opacity: 0.8;
}

.paulcast-player-subscribe-link.apple {
  background: #f3e8ff;
  color: #7c3aed;
}

.paulcast-player-subscribe-link.spotify {
  background: #dcfce7;
  color: #16a34a;
}

.paulcast-player-subscribe-link.google {
  background: #dbeafe;
  color: #2563eb;
}

.paulcast-player-subscribe-link.amazon {
  background: #cffafe;
  color: #0891b2;
}

.paulcast-player-subscribe-link.rss {
  background: #ffedd5;
  color: #ea580c;
}

.paulcast-player-minimal {
  padding: 0.75rem 1rem;
}

.paulcast-content-section {
  margin-top: 1rem;
  overflow: hidden;
}

.paulcast-content-image {
  float: left;
  width: 300px;
  max-width: 100%;
  margin-right: 1rem;
  margin-bottom: 0.5rem;
}

.paulcast-content-image img {
  width: 300px;
  height: 300px;
  max-width: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

@media (max-width: 639px) {
  .paulcast-content-image {
    float: none;
    width: 100%;
    max-width: 300px;
    margin-right: 0;
    margin-bottom: 1rem;
  }
  
  .paulcast-content-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }
}

/* Responsive styles for episode image block (imported with minimal_image layout) */
.paulcast-episode-image.alignleft {
  margin-right: 1.5rem;
  margin-bottom: 1rem;
}

.paulcast-episode-image.alignleft img {
  border-radius: 8px;
}

/* Mobile responsive: clear float on all left-aligned images after player */
@media (max-width: 639px) {
  .paulcast-episode-image.alignleft,
  .paulcast-episode-image.wp-block-image.alignleft,
  .wp-block-image.alignleft.is-resized,
  figure.alignleft.is-resized {
    float: none !important;
    width: 100% !important;
    max-width: 300px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 1rem !important;
    clear: both !important;
  }
  
  .paulcast-episode-image.alignleft img,
  .paulcast-episode-image.wp-block-image.alignleft img,
  .wp-block-image.alignleft.is-resized img,
  figure.alignleft.is-resized img {
    width: 100% !important;
    height: auto !important;
  }
}

.paulcast-player-catalogue {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
}

.paulcast-player-catalogue .paulcast-player-image {
  width: 64px;
  height: 64px;
}

.tob-podcast-error {
  padding: 1rem;
  background: #fef2f2;
  color: #dc2626;
  border-radius: 8px;
  text-align: center;
}

/* Sticky Player Styles */
.paulcast-sticky-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  transition: transform 0.3s ease;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.paulcast-sticky-player.minimized {
  transform: translateY(calc(100% - 40px));
}

.paulcast-sticky-player-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  max-width: 1400px;
  margin: 0 auto;
}

.paulcast-sticky-player-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.paulcast-sticky-player-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.paulcast-sticky-player-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.paulcast-sticky-player-skip-back,
.paulcast-sticky-player-skip-forward {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  padding: 0;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.paulcast-sticky-player-skip-back:hover,
.paulcast-sticky-player-skip-forward:hover {
  background: #f1f5f9;
}

.paulcast-sticky-player-skip-back svg,
.paulcast-sticky-player-skip-forward svg {
  width: 20px;
  height: 20px;
}

.paulcast-sticky-player-play {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  border-radius: 50% !important;
  border: none !important;
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #fff !important;
  padding: 0 !important;
  transition: transform 0.1s ease;
  flex-shrink: 0;
}

.paulcast-sticky-player-play:hover {
  transform: scale(1.05);
}

.paulcast-sticky-player-play:active {
  transform: scale(0.95);
}

.paulcast-sticky-player-play svg {
  width: 18px !important;
  height: 18px !important;
  fill: #fff !important;
}

.paulcast-sticky-player-progress {
  flex: 2;
  min-width: 100px;
  max-width: 300px;
}

.paulcast-sticky-player-progress-bar {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  cursor: pointer;
  overflow: hidden;
}

.paulcast-sticky-player-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.1s ease;
  width: 0;
}

.paulcast-sticky-player-time {
  font-size: 0.75rem;
  color: #64748b;
  font-family: monospace;
  white-space: nowrap;
  flex-shrink: 0;
}

.paulcast-sticky-player-separator {
  margin: 0 0.25rem;
}

.paulcast-sticky-player-speed,
.paulcast-sticky-player-share {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  padding: 0;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.paulcast-sticky-player-speed:hover,
.paulcast-sticky-player-share:hover {
  background: #f1f5f9;
}

.paulcast-sticky-player-share svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.paulcast-sticky-player-toggle {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  padding: 0;
  border-radius: 4px;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.paulcast-sticky-player-toggle:hover {
  background: #f1f5f9;
}

.paulcast-sticky-player-toggle svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

/* Mobile responsive styles for sticky player */
@media (max-width: 639px) {
  .paulcast-sticky-player-inner {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
  }
  
  .paulcast-sticky-player-info {
    order: 1;
    flex: 1 1 100%;
    margin-bottom: 0.25rem;
  }
  
  .paulcast-sticky-player-controls {
    order: 2;
  }
  
  .paulcast-sticky-player-progress {
    order: 3;
    flex: 1;
    min-width: 80px;
    max-width: none;
  }
  
  .paulcast-sticky-player-time {
    order: 4;
  }
  
  .paulcast-sticky-player-speed {
    order: 5;
  }
  
  .paulcast-sticky-player-share {
    display: none;
  }
  
  .paulcast-sticky-player-toggle {
    order: 6;
  }
  
  .paulcast-sticky-player-skip-back,
  .paulcast-sticky-player-skip-forward {
    width: 28px;
    height: 28px;
  }
  
  .paulcast-sticky-player-skip-back svg,
  .paulcast-sticky-player-skip-forward svg {
    width: 16px;
    height: 16px;
  }
  
  .paulcast-sticky-player-play {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
  }
  
  .paulcast-sticky-player-play svg {
    width: 16px !important;
    height: 16px !important;
  }
}

/* WordPress admin bar offset */
.admin-bar .paulcast-sticky-player {
  /* No offset needed - sticky player is at bottom */
}
