/* ══════════════════════════════════════════════════════════
   dropzone.css — Zona de drag & drop para subida de archivos
   Usa prefijo "dz-" para evitar colisiones con otras clases.
   ══════════════════════════════════════════════════════════ */

/* ── Aviso de zona deshabilitada ─────────────────────────── */
.dz-disabled-hint {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    margin-bottom: 0.75rem;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 8px;
    color: #795548;
    font-size: 0.85rem;
}

/* ── Contenedor principal de la zona de drop ─────────────── */
.dz-container {
    position: relative;
    border: 2px dashed #bdbdbd;
    border-radius: 12px;
    background: #fafafa;
    min-height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
    overflow: hidden;
    margin-bottom: 1rem;
}

.dz-container:hover {
    border-color: #6e8b3d;
    background: #f1f5e9;
}

.dz-container.dz-active {
    border-color: #4caf50;
    background: #e8f5e9;
}

.dz-container.dz-locked {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Input file invisible que cubre toda la zona ─────────── */
.dz-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.dz-input:disabled {
    cursor: not-allowed;
}

/* ── Label visible con ícono y textos ────────────────────── */
.dz-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1.5rem;
    cursor: pointer;
    z-index: 1;
    text-align: center;
}

.dz-label-disabled {
    cursor: not-allowed;
}

.dz-icon {
    font-size: 2rem;
    color: #6e8b3d;
    margin-bottom: 0.25rem;
}

.dz-text-primary {
    font-size: 0.95rem;
    font-weight: 600;
    color: #424242;
}

.dz-text-secondary {
    font-size: 0.78rem;
    color: #757575;
}

/* ── Grilla de previsualización ──────────────────────────── */
.dz-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

/* ── Ítem individual de preview ──────────────────────────── */
.dz-preview-item {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
    background: #f5f5f5;
    flex-shrink: 0;
}

.dz-preview-item.dz-uploading {
    border-color: #aaa;
}

/* ── Imagen thumbnail ────────────────────────────────────── */
.dz-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Video placeholder ───────────────────────────────────── */
.dz-video-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #263238;
    gap: 0.3rem;
    padding: 0.4rem;
}

.dz-video-icon {
    font-size: 1.8rem;
    color: #90a4ae;
}

.dz-video-name {
    font-size: 0.6rem;
    color: #b0bec5;
    text-align: center;
    word-break: break-all;
    max-height: 2.5rem;
    overflow: hidden;
}

/* ── Spinner overlay durante la subida ───────────────────── */
.dz-spinner-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Botón eliminar (X) ──────────────────────────────────── */
.dz-btn-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    line-height: 1;
    padding: 0;
    transition: background 0.15s;
}

.dz-btn-remove:hover {
    background: #e53935;
}

/* ── Botones de reordenamiento (izquierda / derecha) ─────── */
.dz-btn-reorder {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 4px;
    z-index: 3;
}

.dz-btn-move {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: background 0.15s;
}

.dz-btn-move:hover:not(:disabled) {
    background: var(--primary, #4caf50);
}

.dz-btn-move--disabled,
.dz-btn-move:disabled {
    opacity: 0.25;
    cursor: default;
}

/* ── Badge PORTADA ───────────────────────────────────────── */
.dz-cover-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(110, 139, 61, 0.85);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    text-align: center;
    padding: 2px 0;
    letter-spacing: 0.04em;
}

/* ── Estado vacío ────────────────────────────────────────── */
.dz-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 1.5rem;
    border: 1px dashed #bdbdbd;
    border-radius: 10px;
    background: #f9f9f9;
    margin-top: 0.5rem;
    text-align: center;
}

.dz-empty-icon {
    font-size: 2rem;
    color: #bdbdbd;
}

.dz-empty-text {
    margin: 0;
    font-size: 0.88rem;
    color: #757575;
    font-weight: 500;
}

.dz-empty-hint {
    margin: 0;
    font-size: 0.78rem;
    color: #9e9e9e;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
    .dz-preview-item {
        width: 85px;
        height: 85px;
    }
}

/* ── Badge VIDEO ─────────────────────────────────────────── */
.dz-video-badge {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(33, 150, 243, 0.85);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    text-align: center;
    padding: 2px 0;
    letter-spacing: 0.04em;
}

/* ── Progreso de compresión de video ─────────────────────── */
.dz-compressing {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    margin-top: 0.5rem;
    border-radius: 10px;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
}

.dz-compressing-icon .spinner-border {
    width: 1.5rem;
    height: 1.5rem;
}

.dz-compressing-text {
    font-size: 0.85rem;
    color: #2e7d32;
}

.dz-progress-bar {
    width: 100%;
    height: 6px;
    background: #c8e6c9;
    border-radius: 3px;
    overflow: hidden;
}

.dz-progress-fill {
    height: 100%;
    background: #4caf50;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.dz-progress-pct {
    font-size: 0.75rem;
    font-weight: 600;
    color: #388e3c;
}

/* ── Progreso de subida de archivos (azul) ───────────────── */
.dz-uploading-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    margin-top: 0.5rem;
    border-radius: 10px;
    background: #e3f2fd;
    border: 1px solid #bbdefb;
}

.dz-uploading-bar-icon .spinner-border {
    width: 1.5rem;
    height: 1.5rem;
}

.dz-uploading-bar-text {
    font-size: 0.85rem;
    color: #1565c0;
}

.dz-progress-bar--blue {
    background: #bbdefb;
}

.dz-progress-fill--blue {
    background: #1976d2;
}

.dz-progress-pct--blue {
    color: #1565c0;
}

/* ── Placeholder para videos en el grid ──────────────────── */
.dz-video-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #263238;
    color: #fff;
    gap: 0.25rem;
}

.dz-video-icon {
    font-size: 1.5rem;
    opacity: 0.8;
}

.dz-video-name {
    font-size: 0.55rem;
    opacity: 0.7;
    text-align: center;
    padding: 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}
