/**
 * Study360 - Single Post Audio Summary Player Styles
 * v3.1 - Refined Centering, Width, and Transparency
 */

/* Sabit oynatıcı barı için body'e boşluk ekleyecek class */
body.audio-player-active {
    padding-bottom: 90px; /* Yeni oynatıcı yüksekliği için boşluk */
    transition: padding-bottom 0.4s ease-in-out;
}

/* Oynatıcıyı saran ana container */
.audio-summary-player-container {
    position: fixed;
    bottom: 20px;
    
    /* Genişlik %70 ve ortalama */
    width: 70%;
    max-width: 900px; /* Çok geniş ekranlarda fazla büyümesin */
    left: 50%;
    
    /* Glassmorphism Etkisi (Daha şeffaf) */
    background: rgba(255, 255, 255, 0.55);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    backdrop-filter: blur(18px) saturate(180%);
    
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.12);
    z-index: 1000;
    
    /* Animasyon (yatayda ortalama ile birlikte) */
    transform: translate(-50%, 150%);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease;
}

/* Oynatıcıyı görünür kılan class */
.audio-summary-player-container.is-visible {
    transform: translate(-50%, 0);
    opacity: 1;
}

/* Oynatıcı içeriğini ortalayan yapı */
.audio-summary-player {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
}

.play-button {
    background: linear-gradient(145deg, var(--primary-color, #007BFF), #0056b3);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.play-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.play-button .play-icon,
.play-button .pause-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}

/* İkonlar için yeni ve kesin ortalama kuralları */
.play-button .play-icon {
    /* Play üçgeninin optik merkezini tam hizalamak için */
    transform: translate(-45%, -50%);
}
.play-button .pause-icon {
    transform: translate(-50%, -50%);
}

.play-button svg {
    width: 30px;
    height: 30px;
    color: #fff;
}

.player-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.player-title {
    font-weight: 600;
    font-size: 16px;
    color: #1a1a1a;
    line-height: 1;
}

.player-timeline {
    width: 100%;
    height: 6px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    cursor: pointer;
    overflow: visible; /* Scrubber başlığı için */
    transition: height 0.2s ease;
}

.player-timeline:hover {
    height: 8px; /* Üzerine gelince kalınlaşsın */
}

.progress-bar {
    position: relative;
    width: 0%;
    height: 100%;
    background: var(--primary-color, #007BFF);
    border-radius: 3px;
    transition: width 0.1s linear;
}

/* Zaman çizgisi ilerleme başlığı */
.progress-bar::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translate(50%, -50%);
    width: 14px;
    height: 14px;
    background-color: #fff;
    border: 3px solid var(--primary-color, #007BFF);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.player-timeline:hover .progress-bar::after {
    opacity: 1;
}

.player-time {
    font-size: 14px;
    color: #333;
    font-family: monospace;
    font-weight: 500;
}

/* Oynatma durumları - Kesin Hizalama ile Güncellendi */
.audio-summary-player.paused .pause-icon,
.audio-summary-player.playing .play-icon {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.7);
  
}

.audio-summary-player.paused .play-icon {
    opacity: 1;
    transform: translate(-48%, -45%) scale(1);
}

.audio-summary-player.playing .pause-icon {
    opacity: 1;
    transform: translate(-48%, -45%) scale(1);
}

/* Mobil Cihazlar */
@media (max-width: 768px) {
    .audio-summary-player-container {
        width: auto;
        max-width: none;
        left: 10px;
        right: 10px;
        bottom: 10px;
        border-radius: 15px;
        /* Mobil için yatay transformu sıfırla */
        transform: translateY(150%);
    }
    .audio-summary-player-container.is-visible {
        transform: translateY(0);
    }
    .player-time {
        display: none;
    }
    body.audio-player-active {
        padding-bottom: 80px;
    }
} 