.beatport-releases-widget {
    margin: 0;
}

/* Section Header */
.beatport-section-header {
    text-align: center;
    margin-bottom: 40px;
}

.beatport-section-title {
    margin: 0 0 15px 0;
    font-weight: 700;
    line-height: 1.2;
}

.beatport-section-description {
    margin: 0;
    color: #666;
    font-size: 16px;
    line-height: 1.6;
}

/* Grid Layout */
.beatport-releases-grid {
    display: grid;
    gap: 20px;
}

.beatport-release-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Hover Effects */
.beatport-hover-lift:hover {
    transform: translateY(-8px);
}

.beatport-hover-scale:hover {
    transform: scale(1.02);
}

.beatport-hover-shadow:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.beatport-hover-lift-shadow:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.beatport-hover-none:hover {
    transform: none;
    box-shadow: none;
}

/* Image Styles */
.beatport-release-image {
    position: relative;
    overflow: hidden;
    background: #e8e8e8;
    width: 100%;
    display: block;
}

/* Skeleton loading state */
.beatport-release-image.beatport-skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: beatport-skeleton-shimmer 1.5s ease-in-out infinite;
    pointer-events: none;
}

.beatport-release-image.beatport-skeleton img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.beatport-release-image:not(.beatport-skeleton) img {
    opacity: 1;
}

@keyframes beatport-skeleton-shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.beatport-release-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.4s ease;
}

/* Image Hover Effects */
.beatport-image-hover-zoom:hover img {
    transform: scale(1.1);
}

.beatport-image-hover-grayscale img {
    filter: grayscale(100%);
}

.beatport-image-hover-grayscale:hover img {
    filter: grayscale(0%);
}

.beatport-image-hover-blur img {
    filter: blur(2px);
}

.beatport-image-hover-blur:hover img {
    filter: blur(0);
}

.beatport-image-hover-none:hover img {
    transform: none;
    filter: none;
}

/* Image Sizes Control Wrapper */
/* Image Sizes Control Wrapper - Full Width */
.beatport-image-small {
    width: 100%;
}

.beatport-image-medium {
    width: 100%;
}

.beatport-image-large {
    width: 100%;
}

.beatport-image-xlarge {
    width: 100%;
}

/* Image Aspect Ratios */
.beatport-ratio-square {
    aspect-ratio: 1 / 1;
}

.beatport-ratio-portrait {
    aspect-ratio: 3 / 4;
}

.beatport-ratio-landscape {
    aspect-ratio: 4 / 3;
}

.beatport-ratio-original {
    aspect-ratio: auto;
}

/* If a ratio is applied, it overrides fixed heights and ensures coverage */
.beatport-ratio-square img,
.beatport-ratio-portrait img,
.beatport-ratio-landscape img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.beatport-ratio-original img {
    position: relative;
    height: auto;
}

/* Release Info */
.beatport-release-info {
    padding: 20px;
}

/* Data source badges also used in frontend widget output */
.ri-badge {
    display: inline-block;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 3px;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.ri-badge-bp {
    background: #01ff95;
    color: #000;
}

.ri-badge-ts {
    background: #e32426;
    color: #fff;
}

.beatport-release-title {
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.beatport-release-title a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.beatport-release-title a:hover {
    opacity: 0.8;
}

.beatport-release-artists {
    margin-bottom: 8px;
    line-height: 1.5;
}

.beatport-release-label {
    margin-bottom: 6px;
    font-size: 13px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.beatport-release-genre {
    margin-bottom: 6px;
    font-size: 12px;
    color: #777;
}

.beatport-release-date {
    margin-bottom: 8px;
    font-size: 13px;
    color: #999;
}

.beatport-release-price {
    font-weight: 600;
    margin-bottom: 12px;
}

/* Button Styles */
.beatport-release-button-wrapper {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.beatport-release-button {
    display: inline-block;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.beatport-release-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Content Alignment */
.beatport-alignment-left .beatport-release-info {
    text-align: left;
}

.beatport-alignment-center .beatport-release-info {
    text-align: center;
}

.beatport-alignment-right .beatport-release-info {
    text-align: right;
}

.beatport-alignment-left .beatport-release-button-wrapper {
    justify-content: flex-start;
}

.beatport-alignment-center .beatport-release-button-wrapper {
    justify-content: center;
}

.beatport-alignment-right .beatport-release-button-wrapper {
    justify-content: flex-end;
}

/* List Layout */
.beatport-releases-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.beatport-layout-list .beatport-release-item {
    display: flex;
    align-items: center;
    padding: 20px;
    margin-bottom: 0;
}

.beatport-layout-list .beatport-release-image {
    width: 120px;
    flex-shrink: 0;
    margin-right: 20px;
}

.beatport-layout-list .beatport-release-image img {
    max-height: 120px;
    object-fit: cover;
}

.beatport-layout-list .beatport-release-info {
    flex: 1;
    padding: 0;
}

.beatport-layout-list.beatport-alignment-center .beatport-release-item {
    flex-direction: column;
    text-align: center;
}

.beatport-layout-list.beatport-alignment-center .beatport-release-image {
    width: 100%;
    margin-right: 0;
    margin-bottom: 15px;
}

.beatport-layout-list.beatport-alignment-right .beatport-release-item {
    flex-direction: row-reverse;
}

.beatport-layout-list.beatport-alignment-right .beatport-release-image {
    margin-right: 0;
    margin-left: 20px;
}

/* Carousel Layout */
.beatport-layout-carousel .beatport-carousel {
    overflow: hidden;
    position: relative;
}

.beatport-layout-carousel .beatport-carousel .swiper-wrapper {
    display: flex;
    align-items: stretch;
}

.beatport-layout-carousel .beatport-carousel .swiper-slide {
    height: auto;
}

.beatport-layout-carousel .beatport-carousel .swiper-slide .beatport-release-item {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.beatport-layout-carousel .beatport-carousel .swiper-slide .beatport-release-info {
    flex: 1;
}

.beatport-layout-carousel .beatport-carousel .swiper-button-prev,
.beatport-layout-carousel .beatport-carousel .swiper-button-next {
    color: #333;
}

/* Masonry Layout - Use column-count for broad browser support (grid-template-rows:masonry has limited support) */
.beatport-layout-masonry .beatport-releases-grid {
    display: block;
    column-count: 3;
    column-gap: 20px;
}

.beatport-layout-masonry .beatport-release-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 20px;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
}

@media (max-width: 900px) {
    .beatport-layout-masonry .beatport-releases-grid {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .beatport-layout-masonry .beatport-releases-grid {
        column-count: 1;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .beatport-releases-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .beatport-releases-grid {
        grid-template-columns: 1fr !important;
    }

    .beatport-layout-list .beatport-release-item {
        flex-direction: column;
        text-align: center;
    }

    .beatport-layout-list .beatport-release-image {
        width: 100%;
        margin-right: 0;
        margin-bottom: 15px;
    }

    .beatport-section-header {
        margin-bottom: 30px;
    }

    .beatport-section-title {
        font-size: 24px !important;
    }
}

/* Reduced motion: respect user preference */
@media (prefers-reduced-motion: reduce) {
    .beatport-play-button.loading::after,
    .beatport-play-button-inline.loading::after {
        animation: none;
        border-top-color: transparent;
    }
    .beatport-play-button.playing {
        animation: none;
    }
    .beatport-release-item,
    .beatport-release-image img,
    .beatport-play-button,
    .beatport-play-button-inline,
    .beatport-release-button {
        transition: none;
    }

    .beatport-releases-widget.loading .beatport-release-item {
        animation: none;
        opacity: 1;
    }

    .beatport-hover-lift:hover,
    .beatport-hover-scale:hover,
    .beatport-hover-shadow:hover,
    .beatport-hover-lift-shadow:hover {
        transform: none;
    }

    .beatport-image-hover-zoom:hover img,
    .beatport-image-hover-grayscale:hover img,
    .beatport-image-hover-blur:hover img {
        transform: none;
        filter: none;
    }
}

/* Loading Animation */
@keyframes beatport-loading {
    0% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.3;
    }
}

.beatport-releases-widget.loading .beatport-release-item {
    animation: beatport-loading 1.5s ease-in-out infinite;
}

.beatport-releases-widget.loading .beatport-release-item:nth-child(2) {
    animation-delay: 0.2s;
}

.beatport-releases-widget.loading .beatport-release-item:nth-child(3) {
    animation-delay: 0.4s;
}

.beatport-releases-widget.loading .beatport-release-item:nth-child(4) {
    animation-delay: 0.6s;
}

.beatport-releases-widget.loading .beatport-release-item:nth-child(5) {
    animation-delay: 0.8s;
}

/* Empty State */
.beatport-no-releases {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    color: #666;
    font-size: 16px;
    line-height: 1.6;
}

/* Print Styles */
@media print {
    .beatport-releases-widget {
        page-break-inside: avoid;
    }

    .beatport-release-item {
        page-break-inside: avoid;
        break-inside: avoid;
    }
}

/* Audio Play Button Overlay */
/* Waveform Container - improved visual design */
.beatport-waveform-container {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    height: auto;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    padding: 20px 24px;
}

.beatport-waveform-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.7) 100%);
    border-radius: 0;
    pointer-events: none;
}

.beatport-waveform-container.active {
    opacity: 1;
    pointer-events: auto;
}

.beatport-waveform-container.active::before {
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.beatport-waveform-container.preview-failed {
    opacity: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.beatport-waveform-container.preview-failed::before {
    background: rgba(0, 0, 0, 0.6);
}

.beatport-preview-unavailable {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
    position: relative;
    z-index: 1;
}

/* WaveSurfer region - ensure proper display within container */
.beatport-waveform-container wave {
    position: relative;
    z-index: 1;
}

/* Image Dimming when Playing */
.beatport-release-image img {
    transition: all 0.4s ease;
}

.beatport-release-item.is-playing .beatport-release-image img {
    filter: blur(5px) brightness(0.35);
    transform: scale(1.08);
}

/* Play Button - overlay */
.beatport-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 68px;
    background: rgba(1, 255, 149, 0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.92;
    padding: 0;
    font: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.beatport-play-button:focus {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.beatport-play-button:focus:not(:focus-visible) {
    outline: none;
}

.beatport-play-button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.beatport-release-image:hover .beatport-play-button {
    opacity: 1;
}

.beatport-play-button:hover {
    transform: translate(-50%, -50%) scale(1.12);
    opacity: 1;
}

/* Loading state - subtle spinner */
.beatport-play-button.loading .beatport-play-icon {
    opacity: 0;
}

.beatport-play-button.loading::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: #000;
    border-radius: 50%;
    animation: beatport-spin 0.7s linear infinite;
}

@keyframes beatport-spin {
    to {
        transform: rotate(360deg);
    }
}

.beatport-play-icon {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 13px 0 13px 22px;
    border-color: transparent transparent transparent #000;
    margin-left: 6px;
    transition: opacity 0.2s ease;
}

.beatport-play-button.playing .beatport-play-icon {
    width: 22px;
    height: 26px;
    border-width: 0;
    border-color: transparent;
    background: transparent;
    position: relative;
    border-left: 8px solid #000;
    border-right: 8px solid #000;
    margin-left: 0;
}

.beatport-play-button.playing .beatport-play-icon {
    opacity: 1;
}

/* Bottom Audio Player - styled container */
.beatport-audio-player-bottom {
    margin-top: 12px;
    padding: 12px 14px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.06) 100%);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.beatport-audio-player-bottom audio {
    width: 100%;
    height: 40px;
    display: block;
}

.beatport-audio-player-bottom audio::-webkit-media-controls-panel {
    background: transparent;
}

/* Inline Play Button (Next to Buy Button) */
.beatport-play-button-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    background-color: #01ff95;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.beatport-play-button-inline:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.beatport-play-button-inline:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(1, 255, 149, 0.4);
}

.beatport-play-icon-small {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 9px 0 9px 14px;
    border-color: transparent transparent transparent #000;
    margin-left: 4px;
    transition: opacity 0.2s ease;
}

.beatport-play-button-inline.playing .beatport-play-icon-small {
    width: 16px;
    height: 18px;
    border-width: 0;
    background: transparent;
    position: relative;
    border-left: 5px solid #000;
    border-right: 5px solid #000;
    margin-left: 0;
}

.beatport-play-button-inline.loading .beatport-play-icon-small {
    opacity: 0;
}

.beatport-play-button-inline.loading::after {
    content: '';
    display: block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: #000;
    border-radius: 50%;
    animation: beatport-spin 0.7s linear infinite;
}

@keyframes beatport-pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35), 0 0 0 0 rgba(1, 255, 149, 0.5);
    }

    70% {
        transform: translate(-50%, -50%) scale(1.08);
        box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4), 0 0 0 12px rgba(1, 255, 149, 0);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35), 0 0 0 0 rgba(1, 255, 149, 0.5);
    }
}

.beatport-play-button.playing {
    animation: beatport-pulse 2s infinite;
    opacity: 1;
}

.beatport-play-button-inline.playing {
    position: relative;
    box-shadow: 0 4px 16px rgba(1, 255, 149, 0.5);
}

.beatport-play-button-inline.loading {
    opacity: 0.8;
    cursor: wait;
}