/* TTS Posts Time - Player Styles */

.tpt-player {
    --tpt-color: #0073aa;
    --tpt-radius: 12px;
    --tpt-bg: #f8f9fa;
    --tpt-bg-hover: #e9ecef;
    --tpt-text: #333;

    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

.tpt-player-inner {
    background: var(--tpt-bg);
    border: 1px solid #e0e0e0;
    border-radius: var(--tpt-radius);
    padding: 12px 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
}

.tpt-player.tpt-active .tpt-player-inner {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-color: var(--tpt-color);
}

.tpt-player-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Bottoni */
.tpt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--tpt-text);
    padding: 0;
    font-size: 14px;
    line-height: 1;
    transition: color 0.2s ease, transform 0.15s ease;
    flex-shrink: 0;
}

.tpt-btn:hover {
    color: var(--tpt-color);
}

.tpt-btn:active {
    transform: scale(0.93);
}

/* Play / Pause */
.tpt-btn-play {
    background: var(--tpt-color);
    color: #fff;
    border-radius: 50px;
    padding: 8px 18px 8px 14px;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.02em;
    transition: background 0.2s ease, transform 0.15s ease;
}

.tpt-btn-play:hover {
    color: #fff;
    filter: brightness(1.1);
}

.tpt-btn-play:active {
    transform: scale(0.95);
}

.tpt-btn-play .tpt-icon {
    width: 18px;
    height: 18px;
}

.tpt-btn-label {
    pointer-events: none;
}

/* Stop */
.tpt-btn-stop {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--tpt-bg-hover);
    transition: background 0.2s ease;
}

.tpt-btn-stop:hover {
    background: #ddd;
    color: #c0392b;
}

/* Time */
.tpt-time {
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: #888;
    min-width: 32px;
    text-align: center;
    flex-shrink: 0;
    user-select: none;
}

/* Progress */
.tpt-progress-wrap {
    flex: 1;
    height: 6px;
    background: #ddd;
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
}

.tpt-progress-bar {
    height: 100%;
    width: 0;
    background: var(--tpt-color);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Speed */
.tpt-btn-speed {
    font-size: 12px;
    font-weight: 700;
    background: var(--tpt-bg-hover);
    border-radius: 6px;
    padding: 5px 10px;
    min-width: 42px;
    text-align: center;
    transition: background 0.2s ease;
}

.tpt-btn-speed:hover {
    background: #ddd;
}

/* Responsive */
@media (max-width: 480px) {
    .tpt-player-inner {
        padding: 10px 12px;
    }

    .tpt-btn-play {
        padding: 7px 12px 7px 10px;
        font-size: 12px;
    }

    .tpt-btn-play .tpt-icon {
        width: 16px;
        height: 16px;
    }

    .tpt-btn-stop {
        width: 30px;
        height: 30px;
    }

    .tpt-btn-speed {
        font-size: 11px;
        padding: 4px 8px;
        min-width: 36px;
    }

    .tpt-time {
        font-size: 11px;
        min-width: 28px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .tpt-player {
        --tpt-bg: #1e1e1e;
        --tpt-bg-hover: #2d2d2d;
        --tpt-text: #e0e0e0;
    }

    .tpt-player-inner {
        border-color: #333;
    }

    .tpt-progress-wrap {
        background: #444;
    }
}
