/* ===========================
   DAP Simple Audio Player
   Puedes modificar las variables de color, tamaño, etc.
   =========================== */

.dap-audio-player {
    --dap-bg: #1f1f1f;
    --dap-bg-alt: #2a2a2a;
    --dap-text: #ffffff;
    --dap-accent: #E4E1CD;
    --dap-accent-soft: rgba(228, 225, 205, 0.35);
    --dap-radius: 999px;
    --dap-padding: 12px 16px;
    --dap-font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    background: var(--dap-bg);
    color: var(--dap-text);
    border-radius: 16px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 480px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    font-family: var(--dap-font-family);
}

/* Título opcional */
.dap-audio-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

/* Controles principales */
.dap-audio-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Botón Play/Pause */
.dap-play-pause {
    -webkit-appearance: none !important;
    appearance: none !important;

    padding: 0 !important;
    margin: 0 !important;
    border: none !important;

    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;

    background: var(--dap-accent) !important; 
    color: #000 !important;
    font-size: 20px !important;
    line-height: 48px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    font-weight: 700;
    cursor: pointer;

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

/* ICONO PLAY */
.dap-play-pause::before {
    content: '►';
    display: block;
    font-size: 22px;
    margin-left: 2px;
}

/* ICONO PAUSE */
.dap-play-pause.is-playing::before {
    content: '❚❚';
    margin-left: 0;
}

.dap-play-pause:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6);
    background: #ffd24d;
}

.dap-play-pause:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.dap-play-pause.is-playing {
    background: #ffffff;
}


/* Tiempos */
.dap-time-wrapper {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-size: 0.85rem;
    opacity: 0.9;
}

.dap-current-time,
.dap-duration {
    min-width: 42px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.dap-time-separator {
    opacity: 0.7;
}

/* Barra de progreso */
.dap-progress-container {
    width: 100%;
    padding: 0 4px 2px;
    box-sizing: border-box;
}

.dap-progress-bar {
    position: relative;
    width: 100%;
    height: 6px;
    background: var(--dap-bg-alt);
    border-radius: var(--dap-radius);
    overflow: hidden;
    cursor: pointer;
}

.dap-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--dap-accent-soft), var(--dap-accent));
    border-radius: inherit;
    transition: width 0.1s linear;
}

/* Ocultamos el reproductor nativo */
.dap-audio-element {
    display: none;
}

/* Responsive pequeño */
@media (max-width: 480px) {
    .dap-audio-player {
        max-width: 100%;
        padding: 10px 12px;
    }

    .dap-play-pause {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .dap-time-wrapper {
        font-size: 0.8rem;
    }
}
