/* Envanter Medya Seslendirme Oynatıcısı */
.em-tts-player {
    --em-tts-color: #0a3d62;
    --em-tts-bg: #f5f7fa;
    --em-tts-text: #1a2330;
    --em-tts-muted: #6b7785;
    --em-tts-border: #e1e6ed;
    --em-tts-radius: 12px;

    background: var(--em-tts-bg);
    border: 1px solid var(--em-tts-border);
    border-left: 4px solid var(--em-tts-color);
    border-radius: var(--em-tts-radius);
    padding: 14px 16px;
    margin: 18px 0 24px;
    font-family: inherit;
    color: var(--em-tts-text);
    box-shadow: 0 1px 3px rgba(10, 61, 98, 0.04);
    transition: box-shadow .2s ease;
}
.em-tts-player:hover {
    box-shadow: 0 2px 12px rgba(10, 61, 98, 0.08);
}

.em-tts-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.em-tts-play {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--em-tts-color);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease;
    box-shadow: 0 2px 6px rgba(10, 61, 98, 0.25);
}
.em-tts-play:hover { transform: scale(1.06); }
.em-tts-play:focus-visible { outline: 2px solid var(--em-tts-color); outline-offset: 3px; }
.em-tts-play.is-loading {
    background: var(--em-tts-muted);
    cursor: wait;
}

.em-tts-meta {
    flex: 1 1 240px;
    min-width: 200px;
}
.em-tts-title {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.2;
    margin-bottom: 4px;
    color: var(--em-tts-text);
}
.em-tts-sub {
    font-size: 13px;
    color: var(--em-tts-muted);
    font-variant-numeric: tabular-nums;
    margin-bottom: 8px;
}
.em-tts-sub .em-tts-sep { margin: 0 4px; opacity: .6; }

.em-tts-progress {
    width: 100%;
    height: 6px;
    background: var(--em-tts-border);
    border-radius: 3px;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}
.em-tts-progress-fill {
    width: 0%;
    height: 100%;
    background: var(--em-tts-color);
    border-radius: 3px;
    transition: width .1s linear;
}
.em-tts-progress:focus-visible { outline: 2px solid var(--em-tts-color); outline-offset: 2px; }

.em-tts-controls {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 4px;
}
.em-tts-controls button,
.em-tts-controls a {
    background: transparent;
    border: 1px solid transparent;
    color: var(--em-tts-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
    line-height: 0;
}
.em-tts-controls button:hover,
.em-tts-controls a:hover {
    background: rgba(10, 61, 98, 0.08);
    color: var(--em-tts-color);
}
.em-tts-speed {
    font-size: 12px;
    font-weight: 700;
    min-width: 32px;
    line-height: 1 !important;
    padding: 6px 8px !important;
}

.em-tts-status {
    margin-top: 8px;
    font-size: 12px;
    color: var(--em-tts-muted);
    min-height: 16px;
}

/* --- Sticky mini-player --- */
.em-tts-sticky {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 9999;
    width: 320px;
    max-width: calc(100vw - 32px);
    margin: 0;
    box-shadow: 0 8px 28px rgba(10, 61, 98, 0.25);
    animation: em-tts-slide-in .25s ease;
    background: #fff;
}
.em-tts-sticky .em-tts-title { font-size: 13px; }
@keyframes em-tts-slide-in {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

/* Sticky mode'da orijinal oynatıcıyı görünmez yap */
.em-tts-player.is-stickied-source {
    opacity: 0.4;
    pointer-events: none;
}

/* Karanlık mod desteği */
@media (prefers-color-scheme: dark) {
    .em-tts-player {
        --em-tts-bg: #1a2330;
        --em-tts-text: #e8edf3;
        --em-tts-muted: #8a96a4;
        --em-tts-border: #2c3849;
    }
    .em-tts-sticky {
        background: #1a2330;
    }
}

/* Mobil */
@media (max-width: 600px) {
    .em-tts-row { gap: 10px; }
    .em-tts-play { width: 42px; height: 42px; }
    .em-tts-controls { order: 3; width: 100%; justify-content: flex-start; }
    .em-tts-meta { flex-basis: calc(100% - 56px); }
    .em-tts-sticky { width: calc(100vw - 24px); right: 12px; bottom: 12px; }
}
