/* File Uploads Addon Pro v1.0.4 — Frontend */

.wfua-upload-wrapper {
    margin: 14px 0 18px;
    font-size: 14px;
}

.wfua-upload-label {
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.wfua-required { color: #c0392b; margin-left: 3px; }

/* Upload button */
.wfua-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    background: #2271b1;
    color: #fff !important;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    border: none;
    transition: background 0.2s;
    user-select: none;
}
.wfua-upload-btn:hover { background: #135e96; }
.wfua-btn-icon { font-size: 16px; }

/* Progress bar */
.wfua-progress {
    margin-top: 12px;
    padding: 12px 14px;
    background: #f0f6fc;
    border: 1px solid #b8d4f0;
    border-radius: 6px;
}

.wfua-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
}

.wfua-progress-status {
    color: #2271b1;
    font-weight: 600;
}

.wfua-progress-pct {
    color: #2271b1;
    font-weight: 700;
    font-size: 14px;
}

.wfua-progress-bar-wrap {
    background: #d0e6f8;
    border-radius: 20px;
    height: 12px;
    overflow: hidden;
}

.wfua-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #2271b1, #135e96);
    border-radius: 20px;
    transition: width 0.2s ease;
    min-width: 0%;
}

/* File list */
.wfua-file-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wfua-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f6f7f7;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 13px;
}

.wfua-file-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
    flex-shrink: 0;
}

.wfua-file-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0e0e0;
    border-radius: 4px;
    font-size: 22px;
    flex-shrink: 0;
}

.wfua-file-info { flex: 1; min-width: 0; }
.wfua-file-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wfua-file-meta { font-size: 11px; color: #888; margin-top: 2px; }

.wfua-file-remove {
    background: none;
    border: none;
    color: #c0392b;
    cursor: pointer;
    font-size: 18px;
    padding: 2px 6px;
    border-radius: 3px;
    flex-shrink: 0;
}
.wfua-file-remove:hover { background: #fdf0ef; }

/* Error */
.wfua-error {
    margin-top: 10px;
    padding: 8px 12px;
    background: #fdf0ef;
    border: 1px solid #f5c6c2;
    border-radius: 4px;
    color: #c0392b;
    font-size: 13px;
}

/* Instructions */
.wfua-instructions-wrap { margin-top: 14px; }
.wfua-instr-label { display: block; font-weight: 600; margin-bottom: 5px; }
.wfua-instructions {
    width: 100%;
    max-width: 420px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    font-size: 13px;
    resize: vertical;
    box-sizing: border-box;
}

/* Disable add to cart while uploading */
.wfua-uploading .single_add_to_cart_button {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

@media (max-width: 600px) {
    .wfua-file-thumb, .wfua-file-icon { width: 36px; height: 36px; }
}

/* Disabled Add to Cart state */
.single_add_to_cart_button.wfua-btn-disabled,
.single_add_to_cart_button:disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}
