/* ========================================
   DROP ZONE COMPONENT
   Used in: webp2png, eightmb, mp3extract
   ======================================== */

.drop-zone {
    border: 2px dashed #444;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: #7aa2f7;
    background: rgba(122, 162, 247, 0.1);
}

.drop-zone.has-file {
    border-color: #66bb6a;
    border-style: solid;
}

.drop-zone input[type="file"] {
    display: none;
}

/* ========================================
   UPLOAD PROGRESS BAR
   Used in: eightmb, mp3extract
   ======================================== */

.upload-bar {
    margin-top: 12px;
    height: 8px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
    display: none;
}

.upload-bar::before {
    content: "";
    display: block;
    height: 100%;
    width: 40%;
    background: #42a5f5;
    animation: indeterminate 1.2s infinite linear;
}

@keyframes indeterminate {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(250%); }
}

/* ========================================
   VIDEO PREVIEW
   Used in: mp3extract
   ======================================== */

.video-preview {
    display: none;
    margin-top: 20px;
}

.video-preview video {
    width: 100%;
    max-width: 500px;
    border-radius: 8px;
    background: #000;
}

/* ========================================
   TRIM CONTROLS
   Used in: mp3extract
   ======================================== */

.trim-controls {
    display: none;
    margin-top: 20px;
    padding: 15px;
    background: rgba(122, 162, 247, 0.05);
    border-radius: 8px;
    border: 1px solid #444;
}

.trim-controls h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 500;
}

.trim-row {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 12px;
}

.trim-row label {
    min-width: 80px;
    font-weight: 500;
}

.trim-row input[type="range"] {
    flex: 1;
    height: 6px;
    background: #333;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.trim-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #7aa2f7;
    border-radius: 50%;
    cursor: pointer;
}

.trim-row input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #7aa2f7;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.trim-row input[type="number"] {
    width: 80px;
    padding: 6px 10px;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    color: #c0caf5;
    font-family: monospace;
}

.duration-info {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

/* ========================================
   QUALITY DROPDOWN
   Used in: ytdl
   ======================================== */

.quality-dropdown {
    position: relative;
    display: inline-block;
}

.quality-selected {
    padding: 10px 12px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px;
    cursor: pointer;
    min-width: 180px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quality-selected:hover {
    border-color: #7aa2f7;
}

.quality-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px;
    margin-top: 4px;
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
}

.quality-menu.open {
    display: block;
}

.quality-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
}

.quality-option:hover:not(.locked) {
    background: #333;
}

.quality-option.locked {
    color: #666;
    cursor: not-allowed;
}

.quality-option.locked .quality-label {
    color: #666;
}

.quality-label {
    flex: 1;
}

.badge-small {
    font-size: 9px;
    padding: 2px 6px;
    background: #7aa2f7;
    color: #000;
    border-radius: 3px;
    font-weight: 500;
}
