/* assets/css/player.css */

.tg-voice-player {
    direction: ltr;
    max-width: 400px;
    margin: 10px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.tg-voice-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #e3f2fd;
    border-radius: 18px;
    padding: 8px 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* دکمه پخش */
.tg-play-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    border: none;
    background: #4ea4f6;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    padding: 0;
}

.tg-play-btn:hover {
    background: #3b93e6;
}

.tg-play-btn svg {
    width: 18px;
    height: 18px;
}

/* بدنه صوت */
.tg-voice-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

/* ویوفرم */
.tg-waveform {
    position: relative;
    height: 32px;
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
}

.tg-waveform-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.tg-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: rgba(78, 164, 246, 0.3);
    border-radius: 4px;
    pointer-events: none;
    transition: width 0.1s linear;
}

/* زمان */
.tg-voice-time {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #6b7b8a;
    padding: 0 2px;
}

/* دکمه سرعت */
.tg-speed-btn {
    border: none;
    background: rgba(78, 164, 246, 0.15);
    color: #4ea4f6;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.tg-speed-btn:hover {
    background: rgba(78, 164, 246, 0.3);
}

/* حالت در حال پخش */
.tg-voice-player.is-playing .tg-voice-inner {
    background: #e3f2fd;
}

/* ریسپانسیو */
@media (max-width: 480px) {
    .tg-voice-player {
        max-width: 100%;
    }

    .tg-play-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

    .tg-play-btn svg {
        width: 14px;
        height: 14px;
    }
}
