/* ============================================================
   CF7 Drag & Drop Multi-File Upload — front-end styles
   ============================================================ */

/* ── Wrapper ──────────────────────────────────────────────── */
.cf7ddu-wrapper {
    font-family: inherit;
    font-size: 0.9rem;
    color: inherit;
    line-height: 1.5;
}

/* ── Drop zone ────────────────────────────────────────────── */
.cf7ddu-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 2rem 1.5rem;
    border: 2px dashed #b0bec5;
    border-radius: 10px;
    background: #f8fafc;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    text-align: center;
    outline-offset: 3px;
    user-select: none;
}

.cf7ddu-dropzone:hover,
.cf7ddu-dropzone:focus-visible {
    border-color: #000;
    background: #eef0fd;
}

.cf7ddu-dropzone.is-dragover {
    border-color: #000;
    background: #e8eaf6;
    box-shadow: 0 0 0 4px rgba(63, 81, 181, 0.15);
}

.cf7ddu-dropzone.is-full {
    pointer-events: none;
    opacity: 0.55;
    cursor: not-allowed;
}

/* Cloud-upload icon */
.cf7ddu-icon {
    width: 3rem;
    height: 3rem;
    color: #000;
    opacity: 0.8;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.cf7ddu-dropzone.is-dragover .cf7ddu-icon {
    transform: translateY(-4px) scale(1.1);
}

.cf7ddu-drop-label {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    color: #000;
}

.cf7ddu-drop-label span {
    color: #000;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cf7ddu-drop-meta {
    margin: 0;
    font-size: 0.78rem;
    color: #000;
}

/* ── File list ────────────────────────────────────────────── */
.cf7ddu-file-list {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.cf7ddu-file-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    animation: cf7ddu-slide-in 0.18s ease;
}

@keyframes cf7ddu-slide-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.cf7ddu-file-icon {
    width: 1.4rem;
    height: 1.4rem;
    flex-shrink: 0;
    color: #000;
}

.cf7ddu-file-icon svg {
    width: 100%;
    height: 100%;
}

.cf7ddu-file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.875rem;
    color: #1f2937;
    font-weight: 500;
}

.cf7ddu-file-size {
    font-size: 0.78rem;
    color: #000
    flex-shrink: 0;
}

.cf7ddu-remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    color: #fff;
    padding: 0 0.15rem;
    border-radius: 4px;
    transition: color 0.15s ease, background 0.15s ease;
    flex-shrink: 0;
}

.cf7ddu-remove:hover,
.cf7ddu-remove:focus-visible {
    color: #ef4444;
    background: #fee2e2;
    outline: none;
}

/* ── Inline error messages ────────────────────────────────── */
.cf7ddu-error-list {
    list-style: none;
    margin: 0.6rem 0 0;
    padding: 0.65rem 0.85rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 7px;
    color: #b91c1c;
    font-size: 0.82rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* CF7 validation error tip */
.cf7ddu-wrapper .wpcf7-not-valid-tip {
    display: block;
    margin-top: 0.4rem;
    color: #dc2626;
    font-size: 0.82rem;
}

/* ── Dark-mode support ────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
    .cf7ddu-dropzone {
        border-color: #374151;
        background: rgba(0,0,0,0.04);
    }

    .cf7ddu-dropzone:hover,
    .cf7ddu-dropzone:focus-visible {
        background: rgba(0, 0, 0, 0.15);
        border-color: #374151;
    }

    .cf7ddu-dropzone.is-dragover {
        background: rgba(0, 0, 0, 0.15);
    }

    .cf7ddu-drop-label { color: #f3f4f6; }
    .cf7ddu-drop-meta  { color: #000; }

    .cf7ddu-file-item {
        background: rgba(0, 0, 0, 0.15);
        border-color: #374151;
    }

    .cf7ddu-file-name { color: #000; }
}

/* ── Reduced-motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .cf7ddu-dropzone,
    .cf7ddu-icon,
    .cf7ddu-remove,
    .cf7ddu-file-item {
        transition: none;
        animation: none;
    }
}
