/* Spotify Podcast Layout
   Ported from hatch/sm plugin (Fase 9 of migration).
*/

.spotify-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.spotify-left {
    flex: 2;
    max-width: 250px;
}

.spotify-left .last-episode {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.spotify-left .last-episode img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    position: relative;
    border-radius: 5px;
}

.spotify-left .last-episode .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.spotify-left .last-episode .play-button:before {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 15px solid white;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
}

.spotify-left .last-episode h4 {
    margin: 10px 0;
    font-size: 20px;
    color: #333;
}

.spotify-left .last-episode .info-line {
    display: flex;
    gap: 10px;
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

.spotify-left .last-episode .summary {
    font-size: 14px;
    color: #555;
    margin-top: 10px;
}

.spotify-right {
    flex: 3;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.episode-card {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    height: 80px;
}

.episode-image {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.episode-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px 0 0 8px;
}

.episode-image .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.episode-image .play-button:before {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 10px solid white;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.episode-details {
    padding: 10px;
    flex: 1;
}

.episode-details h3 {
    margin: 0;
    font-size: 16px !important;
    color: #333;
    line-height: 1.2;
}

.episode-details .info-line {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
    display: flex;
    gap: 10px;
}

.episode-details .info-line span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Mobile Layout */
.spotify-mobile-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 10px;
}

.last-episode-mobile {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.last-episode-mobile img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    position: relative;
}

.last-episode-mobile .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.last-episode-mobile .play-button:before {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 15px solid white;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
}

.last-episode-mobile h3 {
    margin: 10px 0;
    font-size: 18px;
    color: #333;
    text-align: left;
}

.last-episode-mobile .info-line {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    text-align: left;
}

.episode-list-mobile {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.episode-card-mobile {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    padding: 10px;
    position: relative;
}

.episode-card-mobile img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.episode-card-mobile .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.episode-card-mobile .play-button:before {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 10px solid white;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.episode-card-mobile .episode-details-mobile {
    flex: 1;
}

.episode-card-mobile .episode-details-mobile h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.episode-card-mobile .episode-details-mobile .info-line {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Common Popup */
.spotify-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.spotify-popup iframe {
    width: 90%;
    max-width: 640px;
    height: 360px;
    border: none;
    border-radius: 8px;
}

.spotify-popup .spotify-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background-color: white;
    color: black;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

@media (min-width: 768px) {
    .spotify-popup iframe {
        width: 40%;
        height: 60%;
    }
}
