/* Dinamik Değişkenler (Fallback değerleri) */
:root {
    --ayp-pl-bg: #eaeaea;
    --ayp-pl-text: #333333;
    --ayp-pl-active-bg: #6b9aa7;
    --ayp-pl-active-text: #ffffff;
    
    --ayp-vid-bg: #f8fafc;
    --ayp-vid-text: #444444;
    --ayp-vid-active-bg: #ffe4e4;
    --ayp-vid-active-text: #444444;
    --ayp-height: 700px;
    --ayp-left-width: 220px;
    --ayp-gap: 4px;
}

.ayp-container {
    display: flex;
    align-items: flex-start;
    gap: var(--ayp-gap); /* Dinamik sütun boşluğu */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin-bottom: 30px;
}

.ayp-left-col {
    width: var(--ayp-left-width); /* Dinamik sol menü genişliği */
    flex-shrink: 0;
    max-height: var(--ayp-height);
    overflow-y: auto;
    background: transparent;
}

.ayp-title {
    margin: 0;
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    background: #fff;
    border-bottom: 1px solid #eaeaea;
    flex-shrink: 0;
}

.ayp-playlist-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.ayp-playlist-item {
    border-bottom: 1px solid #fff; /* Çok ince, şık bir beyaz ayraç */
    margin: 0 !important; /* WordPress temasının satırlar arasına koyduğu zorunlu boşlukları ezer */
    padding: 0 !important;
}

.ayp-playlist-header {
    display: flex;
    align-items: center;
    padding: 12px 10px;
    cursor: pointer;
    background: var(--ayp-pl-bg);
    color: var(--ayp-pl-text);
    transition: background 0.2s ease, filter 0.2s ease;
}

.ayp-playlist-header:hover {
    filter: brightness(0.9); /* Dinamik renklerle uyumlu hover efekti */
}

.ayp-playlist-item.open .ayp-playlist-header {
    background: var(--ayp-pl-active-bg);
    color: var(--ayp-pl-active-text);
    filter: brightness(0.95); /* Açık durumu efekti */
    border-left: 4px solid #ff0000;
    padding-left: 11px;
}

.ayp-playlist-header span {
    font-size: 15px;
    color: inherit;
    line-height: 1.3;
    font-weight: 600;
}

.ayp-playlist-videos {
    display: none;
    background: var(--ayp-vid-bg); /* Dinamik video liste arkaplanı */
    border-top: 1px solid #e2e8f0;
    padding: 10px 0;
    box-shadow: inset 0 3px 6px -3px rgba(0,0,0,0.05);
}

.ayp-playlist-item.open .ayp-playlist-videos {
    display: block;
}

.ayp-video-item {
    display: flex;
    align-items: center;
    padding: 10px 15px 10px 25px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0,0,0,0.05); /* border-color uyarlandı */
    transition: background 0.2s ease, filter 0.2s ease;
}

.ayp-video-item:last-child {
    border-bottom: none;
}

.ayp-video-item:hover {
    filter: brightness(0.95); /* Dinamik hover */
}

.ayp-video-item.active {
    background: var(--ayp-vid-active-bg); /* Dinamik aktif video rengi */
    border-right: 3px solid #ff0000;
}

.ayp-video-thumb {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 10px;
    flex-shrink: 0;
}

.ayp-video-item span {
    font-size: 13px;
    color: var(--ayp-vid-text); /* Dinamik video font rengi */
    line-height: 1.3;
}

.ayp-video-item.active span {
    color: var(--ayp-vid-active-text); /* Dinamik aktif video font rengi */
}

.ayp-right-col {
    flex-grow: 1;
    background: #f6f6f6; /* Arka plan rengi güncellendi */
    border: 1px solid #eaeaea; /* Hafif bir stroke eklendi */
    border-radius: 8px; /* Oval köşeler eklendi */
    overflow: hidden; /* İframe'in oval köşelerden dışarı taşmasını engeller */
    width: 100%;
    aspect-ratio: 16 / 9; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.06); /* Oyantıcıya derinlik katan çok hafif profesyonel gölge */
}

.ayp-player-wrapper {
    width: 100%;
    height: 100%;
}

.ayp-loading {
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* Scrollbar Styles */
.ayp-playlist-list::-webkit-scrollbar {
    width: 6px;
}
.ayp-playlist-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.ayp-playlist-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

@media (max-width: 768px) {
    .ayp-container {
        flex-direction: column;
    }
    .ayp-left-col {
        width: 100%;
        order: 2;
        max-height: 400px;
    }
    .ayp-right-col {
        width: 100%;
        order: 1;
        margin-bottom: 20px;
    }
}
