/* PDFtoVoice Podcast — Custom Styles */

/* PIN-Felder Animation */
.pin-digit:focus {
    transform: scale(1.05);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

/* Progress-Bar Hover */
.progress-container:hover #progress-thumb {
    opacity: 1 !important;
}
.progress-container:hover {
    height: 5px;
}

/* Aktives (spielendes) Kapitel */
.chapter-item.playing .chapter-title {
    color: #a78bfa;
}
.chapter-item.playing .play-icon {
    color: #a78bfa;
}

/* Player smooth transition */
#player {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Kapitel-Zeile Hover */
.chapter-row:hover {
    background: rgba(139, 92, 246, 0.05);
}

/* Detail-Bereich Animation */
.chapter-details {
    overflow: hidden;
    border-top: 1px solid rgba(75, 85, 99, 0.2);
}

/* Erledigte Kapitel */
.chapter-item.completed .chapter-title {
    text-decoration: line-through;
    color: #6b7280;
}
.chapter-item.completed .chapter-row {
    opacity: 0.6;
}
.chapter-item.completed:hover .chapter-row {
    opacity: 1;
}

/* Checkbox Styling */
.chapter-checkbox {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #4b5563;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}
.chapter-checkbox:checked {
    background: #7c3aed;
    border-color: #7c3aed;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3E%3C/svg%3E");
    background-size: 100%;
    background-position: center;
    background-repeat: no-repeat;
}
.chapter-checkbox:hover {
    border-color: #7c3aed;
}

/* ============================================
   MOBILE OPTIMIERUNGEN (wie tobys-tool)
   ============================================ */

@media (max-width: 767px) {
    /* Touch-Optimierungen */
    body {
        overscroll-behavior: none;
        -webkit-tap-highlight-color: transparent;
    }

    /* Kein 300ms Touch-Delay */
    button, a, [role="button"], input, select, textarea {
        touch-action: manipulation;
    }

    /* Touch-Targets mindestens 44px (Apple HIG) */
    nav button, nav a, .touch-target {
        min-height: 44px;
        min-width: 44px;
    }

    .chapter-row {
        min-height: 56px;
    }

    /* Player ueber der Bottom-Nav positionieren */
    #player {
        bottom: 4.5rem;
    }

    /* Download-Icons immer sichtbar auf Mobile (kein Hover) */
    .chapter-download-btn {
        opacity: 1 !important;
    }

    /* Kapitel-Details weniger Padding auf Mobile */
    .chapter-details-inner {
        padding-left: 2.75rem;
    }

    /* Progress-Bar groesserer Touch-Target auf Mobile */
    .progress-container {
        height: 6px;
    }
    .progress-container #progress-thumb {
        opacity: 1 !important;
        width: 14px;
        height: 14px;
    }

    /* User-Select auf Nav sperren */
    nav {
        -webkit-user-select: none;
        user-select: none;
    }
}

/* Safe-Area Utility */
.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom);
}
